[cfe-commits] r51168 - /cfe/trunk/lib/Sema/SemaChecking.cpp

Ted Kremenek kremenek at apple.com
Thu May 15 15:24:50 PDT 2008


Author: kremenek
Date: Thu May 15 17:24:49 2008
New Revision: 51168

URL: http://llvm.org/viewvc/llvm-project?rev=51168&view=rev
Log:
Fixed another regression introduced by r51113 caused by some refactoring
in Sema::CheckFunctionCall:

  http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080512/005706.html
  
The bug was that the logic from the helper methods used by CheckFunctionCall
were being inverted (a subtle bug).  This would cause the parser to discard
any valid AST nodes involving several builtins (see patch).

This removes the last regression failure I'm seeing in the test suite: Analysis-Apple/NoReturn.

Modified:
    cfe/trunk/lib/Sema/SemaChecking.cpp

Modified: cfe/trunk/lib/Sema/SemaChecking.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaChecking.cpp?rev=51168&r1=51167&r2=51168&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaChecking.cpp (original)
+++ cfe/trunk/lib/Sema/SemaChecking.cpp Thu May 15 17:24:49 2008
@@ -40,13 +40,13 @@
   case Builtin::BI__builtin___CFStringMakeConstantString:
     assert(TheCall->getNumArgs() == 1 &&
            "Wrong # arguments to builtin CFStringMakeConstantString");
-    if (!CheckBuiltinCFStringArgument(TheCall->getArg(0))) {
+    if (CheckBuiltinCFStringArgument(TheCall->getArg(0))) {
       delete TheCall;
       return true;
     }
     return TheCall;
   case Builtin::BI__builtin_va_start:
-    if (!SemaBuiltinVAStart(TheCall)) {
+    if (SemaBuiltinVAStart(TheCall)) {
       delete TheCall;
       return true;
     }
@@ -57,7 +57,7 @@
   case Builtin::BI__builtin_islessequal:
   case Builtin::BI__builtin_islessgreater:
   case Builtin::BI__builtin_isunordered:
-    if (!SemaBuiltinUnorderedCompare(TheCall)) {
+    if (SemaBuiltinUnorderedCompare(TheCall)) {
       delete TheCall;
       return true;
     }





More information about the cfe-commits mailing list