Skip to content
Commit 563a23c8 authored by Alex Brachet's avatar Alex Brachet
Browse files

[clang][Sema] Add fixit for scoped enum format error

This helps transition code bases to handle the new warning added in 3632e2f5

Before:
```
clang/test/FixIt/format.cpp:10:16: warning: format specifies type 'int' but the argument has type 'N::E' [-Wformat]
   10 |   printf("%d", N::E::One); // expected-warning{{format specifies type 'int' but the argument has type 'N::E'}}
      |           ~~   ^~~~~~~~~
      |           %d
```
After:
```
clang/test/FixIt/format.cpp:10:16: warning: format specifies type 'int' but the argument has type 'N::E' [-Wformat]
   10 |   printf("%d", N::E::One); // expected-warning{{format specifies type 'int' but the argument has type 'N::E'}}
      |           ~~   ^~~~~~~~~
      |                static_cast<int>( )
```

Differential Revision: https://reviews.llvm.org/D153623
parent 3c0a136c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment