[clang-tools-extra] [clang-tidy] added `RespectOpaqueTypes` option to `readability-qualified-auto check` (PR #147060)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 4 10:16:23 PDT 2025


================
@@ -174,6 +176,21 @@ void QualifiedAutoCheck::registerMatchers(MatchFinder *Finder) {
 
 void QualifiedAutoCheck::check(const MatchFinder::MatchResult &Result) {
   if (const auto *Var = Result.Nodes.getNodeAs<VarDecl>("auto")) {
+    if (RespectOpaqueTypes) {
----------------
vbvictor wrote:

I believe we could place this option logic inside ASTMatchers, that is the preferred way.
You could write something like `RespectOpaqueTypes ? pointerType(), hasUnqualifiedDesugaredType(pointerType())`.

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


More information about the cfe-commits mailing list