summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-05-15 22:24:49 +0000
committerTed Kremenek <kremenek@apple.com>2008-05-15 22:24:49 +0000
commitdd547b1ce936a4134429e8267d7c6c538032c9ef (patch)
tree1cba1d98acb7947b65209f9e6f363561a3dd4bb1 /clang/lib/Sema
parent2918b0ec2f104a9e98e59088f51c024e4bfa9c4e (diff)
downloadbcm5719-llvm-dd547b1ce936a4134429e8267d7c6c538032c9ef.tar.gz
bcm5719-llvm-dd547b1ce936a4134429e8267d7c6c538032c9ef.zip
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. llvm-svn: 51168
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaChecking.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index bbf43113ee7..4f996edf2fd 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -40,13 +40,13 @@ Sema::CheckFunctionCall(FunctionDecl *FDecl, CallExpr *TheCall) {
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 @@ Sema::CheckFunctionCall(FunctionDecl *FDecl, CallExpr *TheCall) {
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;
}
OpenPOWER on IntegriCloud