diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-05-15 22:24:49 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-05-15 22:24:49 +0000 |
commit | 3e9d2530c4118e0e8207de24f9059cb3a8eb8cf4 (patch) | |
tree | c532e670e3d6bc418b11a6812e1372dff3787ad4 /lib/Sema/SemaChecking.cpp | |
parent | 774e4af13a0b7683563a22c6b99e4dda45334cc8 (diff) |
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
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index bbf43113ee..4f996edf2f 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/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; } |