[LLVMbugs] [Bug 21740] New: Boolean operation always lvalue

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Dec 3 19:30:11 PST 2014


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

            Bug ID: 21740
           Summary: Boolean operation always lvalue
           Product: clang
           Version: 3.5
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: llvm+bugzilla at stefan.konink.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

#include <stdio.h>
#include <stdbool.h>

int main() {
    bool expression_true = true;
    bool always_false = false;

    always_false &= expression_true;

    printf ("%d\n", always_false);

    return 0;
}

Should trigger a warning on the always_false operation. Bug 11510 refers to a
similar issue.

-- 
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/20141204/09c5bd92/attachment.html>


More information about the llvm-bugs mailing list