[cfe-commits] r138875 - /cfe/trunk/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp

Jordy Rose jediknil at belkadan.com
Wed Aug 31 11:33:45 PDT 2011


Author: jrose
Date: Wed Aug 31 13:33:45 2011
New Revision: 138875

URL: http://llvm.org/viewvc/llvm-project?rev=138875&view=rev
Log:
[analyzer] Fix varargs helper to only use POD types even for named arguments. Thanks, Joerg.

Modified:
    cfe/trunk/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp?rev=138875&r1=138874&r2=138875&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp Wed Aug 31 13:33:45 2011
@@ -79,14 +79,14 @@
     C.generateSink(CE);
 }
 
-static bool END_WITH_NULL isMultiArgSelector(Selector Sel, ...) {
+static bool END_WITH_NULL isMultiArgSelector(const Selector *Sel, ...) {
   va_list argp;
   va_start(argp, Sel);
 
   unsigned Slot = 0;
   const char *Arg;
   while ((Arg = va_arg(argp, const char *))) {
-    if (!Sel.getNameForSlot(Slot).equals(Arg))
+    if (!Sel->getNameForSlot(Slot).equals(Arg))
       break; // still need to va_end!
     ++Slot;
   }
@@ -124,12 +124,12 @@
   default:
     return;
   case 4:
-    if (!isMultiArgSelector(Sel, "handleFailureInFunction", "file",
+    if (!isMultiArgSelector(&Sel, "handleFailureInFunction", "file",
                             "lineNumber", "description", NULL))
       return;
     break;
   case 5:
-    if (!isMultiArgSelector(Sel, "handleFailureInMethod", "object", "file",
+    if (!isMultiArgSelector(&Sel, "handleFailureInMethod", "object", "file",
                             "lineNumber", "description", NULL))
       return;
     break;





More information about the cfe-commits mailing list