[PATCH] D13081: [clang-tidy] Implement FixitHints for identifier references in IdentifierNamingCheck

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 1 02:20:04 PDT 2015


alexfh added inline comments.

================
Comment at: clang-tidy/readability/IdentifierNamingCheck.cpp:548
@@ +547,3 @@
+  }
+
+  if (const auto *Loc = Result.Nodes.getNodeAs<TypeLoc>("typeLoc")) {
----------------
alexfh wrote:
> Note, that I suggested to use `Loc->getType()->getDecl()`, which uses `TypeLoc::getType()` and `Type::getDecl()`.
Ah, I see now: the problem is not `TypeLoc` here, it's that there's no `Type::getDecl`. So your version is probably the best we can do here.


http://reviews.llvm.org/D13081





More information about the cfe-commits mailing list