Skip to content
Commit 5cf37d8b authored by Fangrui Song's avatar Fangrui Song
Browse files

[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
parent 3b067796
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment