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

            Bug ID: 16413
           Summary: ccc-analyzer filters too many compiler flags for
                    Pre-Compiled Headers
           Product: clang
           Version: 3.2
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Created attachment 10735
  --> http://llvm.org/bugs/attachment.cgi?id=10735&action=edit
ccc-analyzer patch to resolve this bug

If ccc-analyzer is run as part of a compilation which includes pre-compiled
header files, the analyze clang invocation fails with errors like these:

error: const-qualified string support was enabled in PCH file but is currently
disabled
error: __OPTIMIZE__ predefined macro was enabled in PCH file but is currently
disabled
error: exception handling was disabled in PCH file but is currently enabled
error: run-time type information was disabled in PCH file but is currently
enabled

To solve these problems, ccc-analyzer needs to pass along the following flags:
-Wwrite-string (since this actually implies -fconst-strings)
any -O level
all -f flags

This is perhaps not an exhaustive list, but I am able to complete an analysis
of WebKit by including these flags.

I have attached a diff (generated by git) against ccc-analyzer (clang-3.2)
which should fix these issues.

I believe clang-3.3 suffers from the same issues, but other bugs are preventing
me from fully testing it currently.

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