https://llvm.org/bugs/show_bug.cgi?id=23958

            Bug ID: 23958
           Summary: Simple construct that is otherwise diagnosed is not
                    found when class is split up into source and header
           Product: clang
           Version: 3.6
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

For instance, this code:
    struct SomeClass { SomeClass(); };
    SomeClass::SomeClass() {
        int *i = 0;
        *i = 0;
    }
yields the following error, as expected: "someclass.cpp:5:8: warning:
Dereference of null pointer (loaded from variable 'i')"

However, if you put the declaration of SomeClass into a header and the
implementation into a source file (see attachment), then nothing gets diagnosed
anymore.

-- 
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