Skip to content

Commit

Permalink
[clang][Sema] Enable the kprintf format attribute (llvm#100669)
Browse files Browse the repository at this point in the history
  • Loading branch information
brad0 authored Dec 20, 2024
1 parent 52574b5 commit cc7d084
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions clang/lib/Sema/SemaChecking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8103,8 +8103,9 @@ static void CheckFormatString(
}

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, APK,
Expand All @@ -8113,7 +8114,7 @@ static void CheckFormatString(

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,
Expand Down

0 comments on commit cc7d084

Please sign in to comment.