diff options
author | Juan Besa <juanbesa@gmail.com> | 2025-07-28 16:20:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-28 18:20:02 +0300 |
commit | 4d259de2ae88fb022acc722dedd60260a870eb8b (patch) | |
tree | 73000cec75d052d4c94a538e70dc3dcc884e0903 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 5f2092dae36486f428485e47b9a694463c855a4e (diff) | |
download | llvm-4d259de2ae88fb022acc722dedd60260a870eb8b.zip llvm-4d259de2ae88fb022acc722dedd60260a870eb8b.tar.gz llvm-4d259de2ae88fb022acc722dedd60260a870eb8b.tar.bz2 |
[clang-tidy] Add `IgnoreAliasing` option to `readability-qualified-auto check` (#147060)
`readability-qualified-auto` check currently looks at the unsugared
type, skipping any typedefs, to determine if the variable is a
pointer-type. This may not be the desired behaviour, in particular when
the type depends on compilation flags.
For example
```
#if CONDITION
using Handler = int *;
#else
using Handler = uint64_t;
#endif
```
A more common example is some implementations of `std::array` use
pointers as iterators.
This introduces the IgnoreAliasing option so that
`readability-qualified-auto` does not look beyond typedefs.
---------
Co-authored-by: juanbesa <juanbesa@devvm33299.lla0.facebook.com>
Co-authored-by: Kazu Hirata <kazu@google.com>
Co-authored-by: EugeneZelenko <eugene.zelenko@gmail.com>
Co-authored-by: Baranov Victor <bar.victor.2002@gmail.com>
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions