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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51168 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp
index bbf4311..4f996ed 100644
--- a/lib/Sema/SemaChecking.cpp
+++ b/lib/Sema/SemaChecking.cpp
@@ -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;
}