http://llvm.org/bugs/show_bug.cgi?id=7045
Summary: Analyzer should honor __attribute__((const))
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Created an attachment (id=4821)
--> (http://llvm.org/bugs/attachment.cgi?id=4821)
Minimal test case
Hi,
clang static analyzer should honor __attribute__((const)) - see the attached
test case.
tested with ANALYZER BUILD: checker-240 (2010-04-11 10:44:34)
Attaching a minimal test case. The real case (from which the test case is
derived) had "strcmp" as the "const" function. Since in string.h, strcmp is not
tagged as "const", this raises another and separate problem and that is tagging
all "const" functions accordingly (using the macro __pure2, like I have seen),
so that the proposed functionality becomes usable.
Attribute "pure" might also be worth looking at, but I am not sure it's OK to
do the same thing with it as I proposed with "const".
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- 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