[clang-tools-extra] [clang-tidy] Add readability-redundant-casting check (PR #70595)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 29 06:54:05 PDT 2023


PiotrZSL wrote:

431 issues found in llvm.

Example:
```
clang/lib/Sema/SemaAttr.cpp:332:21: warning: redundant explicit casting to the same type 'Expr *' as the sub-expression, remove this casting [readability-redundant-casting]
 332 |   Expr *Alignment = static_cast<Expr *>(alignment);
     |                     ^~~~~~~~~~~~~~~~~~~~         ~
clang/lib/Sema/SemaAttr.cpp:323:55: note: source type originates from referencing this parameter
 323 |                            StringRef SlotLabel, Expr *alignment) {
     |                                                 ~~~~~~^
```

https://github.com/llvm/llvm-project/pull/70595


More information about the cfe-commits mailing list