diff options
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 74ca197b8de..e45f2e53337 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -3518,8 +3518,9 @@ bool CheckScanfHandler::HandleScanfSpecifier( const analyze_format_string::ArgType &AT = FS.getArgType(S.Context); if (AT.isValid() && !AT.matchesType(S.Context, Ex->getType())) { ScanfSpecifier fixedFS = FS; - bool success = fixedFS.fixType(Ex->getType(), S.getLangOpts(), - S.Context); + bool success = fixedFS.fixType(Ex->getType(), + Ex->IgnoreImpCasts()->getType(), + S.getLangOpts(), S.Context); if (success) { // Get the fix string from the fixed format specifier. |