[clang-tools-extra] [clang-tidy] Fix identifier-naming style lookup in macro arguments (PR #206809)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 12 07:09:08 PDT 2026


================
@@ -1395,7 +1395,8 @@ IdentifierNamingCheck::getDeclFailureInfo(const NamedDecl *Decl,
     return std::nullopt;
 
   const SourceLocation Loc = Decl->getLocation();
-  const FileStyle &FileStyle = getStyleForFile(SM.getFilename(Loc));
+  const SourceLocation ConfigLoc = SM.getSpellingLoc(Loc);
----------------
vbvictor wrote:

```suggestion
  const SourceLocation SpellingLoc = SM.getSpellingLoc(Loc);
```

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


More information about the cfe-commits mailing list