[LLVMbugs] [Bug 12983] New: Checker for identical subexpressions that are suspect for copy-paste error

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue May 29 11:10:52 PDT 2012


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

             Bug #: 12983
           Summary: Checker for identical subexpressions that are suspect
                    for copy-paste error
           Product: clang
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: akyrtzi at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


PVS-Studio tool found several suspected issues where there were identical
subexpressions used, probably via copy-paste.
See details here: http://llvm.org/bugs/show_bug.cgi?id=12357

a couple of samples from that PR:

----------
[...]
          (Ty2->isIntegerType() && Ty2->isIntegerType())
[...]
---------

  if (convertBlockPointerToFunctionPointer(QT))
    QT.getAsStringInternal(ParamStr, Context->getPrintingPolicy());
  else
    QT.getAsStringInternal(ParamStr, Context->getPrintingPolicy());      
-----------


We should have such kind of checker 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