[clang-tools-extra] [clang-tidy] Add readability-use-builtin-literals check (PR #76065)
    Piotr Zegar via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Fri Jan  5 03:31:44 PST 2024
    
    
  
https://github.com/PiotrZSL requested changes to this pull request.
Overall what is now is +- working.
Few fixes are still needed to tests, code, maybe some tiny refactoring and code formatting.
Consider adding support for implicit casts:
```
unsigned X = 10;
`-VarDecl <line:1:1, col:14> col:10 X 'unsigned int' cinit
  `-ImplicitCastExpr <col:14> 'unsigned int' <IntegralCast>
    `-IntegerLiteral <col:14> 'int' 10
```
To:
```
unsigned X = 10U;
`-VarDecl <line:1:1, col:14> col:10 X 'unsigned int' cinit
  `-IntegerLiteral <col:14> 'unsigned int' 10
```
I worry also a little bit about integer overflow issues.
https://github.com/llvm/llvm-project/pull/76065
    
    
More information about the cfe-commits
mailing list