Issue |
150343
|
Summary |
clang-tidy modernize-use-std-format breaks enums when used with '%x', and fails replacements when signed stdint types are used.
|
Labels |
clang-tidy
|
Assignees |
|
Reporter |
DaveBrantonCTCT
|
These examples illustrate the two problems
```
int8_t int_8_value;
printf("%d", int_8_value) ;
```
Will fail to replace correctly. The int8_t will cause this error message, and the replacement will be skipped.
```
Unknown corresponding signed type for non-BuiltinType 'int8_t'
```
```
SomeEnum enum_value;
printf("%x %d", enum_value) ;
```
This example will proceed with the replacement, but will fail to add the necessary cast to the enum's underlying type, and so the format string will break your build.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs