[all-commits] [llvm/llvm-project] 5cf37d: [Sema] -Wformat: recognize %lb for the printf/scan...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Thu Apr 20 09:34:48 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5cf37d8bd5c05ef84fba6d6fd9d4ac8b9905c7cb
https://github.com/llvm/llvm-project/commit/5cf37d8bd5c05ef84fba6d6fd9d4ac8b9905c7cb
Author: Fangrui Song <i at maskray.me>
Date: 2023-04-20 (Thu, 20 Apr 2023)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/AST/FormatString.cpp
M clang/test/Sema/format-strings-fixit.c
M clang/test/Sema/format-strings.c
Log Message:
-----------
[Sema] -Wformat: recognize %lb for the printf/scanf family of functions
Fix https://github.com/llvm/llvm-project/issues/62247
D131057 added `bArg` and `BArg` in the `AsLongLong` label in
`FormatSpecifier::hasValidLengthModifier`, but missed the `AsLong` label,
therefore `%llb` is allowed while `%lb` (e.g. `printf("%lb", (long)10)`) has a
spurious warning. Add the missing case labels.
Reviewed By: aaron.ballman, enh
Differential Revision: https://reviews.llvm.org/D148779
More information about the All-commits
mailing list