[LLVMbugs] [Bug 11020] New: Report constant expressions used in if stmts and loop conditions

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Sep 26 20:00:40 PDT 2011


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

           Summary: Report constant expressions used in if stmts and loop
                    conditions
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: arjunsingri at gmail.com
                CC: llvmbugs at cs.uiuc.edu


If an if statement or a loop has a constant expression as its condition, then
it is possible that there is a bug.

Ex:

int x = 10;
int y = 30;

if (x + 20 == y)
    ...;

I am not sure if this is already caught in clang and if there is a need to
provide support in the static analyzer.

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



More information about the llvm-bugs mailing list