aboutsummaryrefslogtreecommitdiff
path: root/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2007-08-17 15:44:17 +0000
committerAnders Carlsson <andersca@mac.com>2007-08-17 15:44:17 +0000
commit9cdc4d3834f203dcde3ff274b8928e4620a914d5 (patch)
tree308782d3ddef432abf8fe2dc7009b34ee865fc01 /Sema/SemaChecking.cpp
parent71993dd85eed9cc42c6b2fa61ee5c53026b74817 (diff)
Return true in case of error, which is what other functions do.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41140 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Sema/SemaChecking.cpp')
-rw-r--r--Sema/SemaChecking.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Sema/SemaChecking.cpp b/Sema/SemaChecking.cpp
index ed4c898349..1917d6317d 100644
--- a/Sema/SemaChecking.cpp
+++ b/Sema/SemaChecking.cpp
@@ -47,7 +47,7 @@ Sema::CheckFunctionCall(Expr *Fn,
// Search the KnownFunctionIDs for the identifier.
unsigned i = 0, e = id_num_known_functions;
for (; i != e; ++i) { if (KnownFunctionIDs[i] == FnInfo) break; }
- if (i == e) return true;
+ if (i == e) return false;
// Printf checking.
if (i <= id_vprintf) {
@@ -74,7 +74,7 @@ Sema::CheckFunctionCall(Expr *Fn,
FDecl, format_idx, Args, NumArgsInCall);
}
- return true;
+ return false;
}
/// CheckBuiltinCFStringArgument - Checks that the argument to the builtin
@@ -90,7 +90,7 @@ bool Sema::CheckBuiltinCFStringArgument(Expr* Arg)
Diag(Arg->getLocStart(),
diag::err_cfstring_literal_not_string_constant,
Arg->getSourceRange());
- return false;
+ return true;
}
const char *Data = Literal->getStrData();
@@ -112,7 +112,7 @@ bool Sema::CheckBuiltinCFStringArgument(Expr* Arg)
}
}
- return true;
+ return false;
}
/// CheckPrintfArguments - Check calls to printf (and similar functions) for