[LLVMbugs] [Bug 22286] New: Provide strict check for pure attribute

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jan 21 14:27:49 PST 2015


            Bug ID: 22286
           Summary: Provide strict check for pure attribute
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: fizzbooze at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Currently an impure function can be attributed as 'pure' and still compile
correctly with no warnings or errors. i.e.:

int global = 0;

void foo() {
    global += 1; // this obviously violates the pure attribute

int main() {

It would be nice to be able to enable some sort of warning or error for code
like this.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150121/7914284e/attachment.html>

More information about the llvm-bugs mailing list