http://llvm.org/bugs/show_bug.cgi?id=15831

            Bug ID: 15831
           Summary: Python bindings don't report errors in get_size
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

In plain libclang, the clang_Type_getSizeOf function returns either a size or a
negative enum value taken from CXTypeLayoutError. The Python wrapper, get_size,
simply casts the value to an unsigned 64-bit integer. This means that if
get_size is called for a variable whose size isn't known (e.g. a
variable-length array), then a very large number (0xffffffffffffffc, in the
case of a VLA) is returned instead of an error.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to