diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-10-02 01:49:54 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-10-02 01:49:54 +0000 |
commit | 66360e224689dc23a0acd8a6705ba50bec13bc97 (patch) | |
tree | c981faf916a2c7a6d349e101842670575be60c16 /lib/Sema/SemaChecking.cpp | |
parent | d62505677555fd4fae731232d7308a91c2bb10a2 (diff) |
-Wformat: Don't check format strings in uninstantiated templates.
Also applies to -Wnonnull, -Wtype-safety, and -Wnon-pod-varargs.
All of these can be better checked at instantiation time.
This change does not actually affect regular CallExpr function calls,
since the checks there only happen after overload resolution.
However, it will affect Objective-C method calls.
<rdar://problem/12373934>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164984 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index ebb6cd1065..7498d34892 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -495,9 +495,8 @@ void Sema::checkCall(NamedDecl *FDecl, Expr **Args, SourceLocation Loc, SourceRange Range, VariadicCallType CallType) { - // FIXME: This mechanism should be abstracted to be less fragile and - // more efficient. For example, just map function ids to custom - // handlers. + if (CurContext->isDependentContext()) + return; // Printf and scanf checking. bool HandledFormatString = false; |