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

            Bug ID: 15774
           Summary: BoolAssignmentChecker not catching literals
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

I'm not sure if this is by design, but it doesn't seem like the bool assignment
checker is reporting a bug for the use of integer literals. For example, cases
like this don't produce warnings:

void test_cppbool_initialization() {
  bool x = 2;  // expected warning
  x = 3; // expected-warning
}

I thought that the current structure with getting as a DefinedSVal would catch
literal assignment, but that doesn't seem to be the case.

If someone could point me in the right direction, I would be interested in
fixing/extending this behavior.

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