diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-08-07 19:21:55 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-08-07 19:21:55 +0000 |
commit | 663d1c76c856c2a244418e2a7ad3565ad9f98329 (patch) | |
tree | c095ff77b146fa3ec4ccc3e45a6cfb4d468c51f8 /gnu | |
parent | c74baac1ad89d8d9eabede65ca33b7e50ff1e920 (diff) |
Actually enable the kprintf format attribute.
ok florian@
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/llvm/tools/clang/lib/Sema/SemaChecking.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gnu/llvm/tools/clang/lib/Sema/SemaChecking.cpp b/gnu/llvm/tools/clang/lib/Sema/SemaChecking.cpp index 800193795e2..a94f93bbd42 100644 --- a/gnu/llvm/tools/clang/lib/Sema/SemaChecking.cpp +++ b/gnu/llvm/tools/clang/lib/Sema/SemaChecking.cpp @@ -6352,8 +6352,9 @@ static void CheckFormatString(Sema &S, const FormatStringLiteral *FExpr, } if (Type == Sema::FST_Printf || Type == Sema::FST_NSString || - Type == Sema::FST_FreeBSDKPrintf || Type == Sema::FST_OSLog || - Type == Sema::FST_OSTrace || Type == Sema::FST_Syslog) { + Type == Sema::FST_Kprintf || Type == Sema::FST_FreeBSDKPrintf || + Type == Sema::FST_OSLog || Type == Sema::FST_OSTrace || + Type == Sema::FST_Syslog) { CheckPrintfHandler H( S, FExpr, OrigFormatExpr, Type, firstDataArg, numDataArgs, (Type == Sema::FST_NSString || Type == Sema::FST_OSTrace), Str, @@ -6363,7 +6364,7 @@ static void CheckFormatString(Sema &S, const FormatStringLiteral *FExpr, if (!analyze_format_string::ParsePrintfString(H, Str, Str + StrLen, S.getLangOpts(), S.Context.getTargetInfo(), - Type == Sema::FST_FreeBSDKPrintf)) + Type == Sema::FST_Kprintf || Type == Sema::FST_FreeBSDKPrintf)) H.DoneProcessing(); } else if (Type == Sema::FST_Scanf) { CheckScanfHandler H(S, FExpr, OrigFormatExpr, Type, firstDataArg, |