[PATCH] D22853: [clang-rename] add support for template parameter renaming

Kirill Bobyrev via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 1 10:41:54 PDT 2016

omtcyfz added inline comments.

Comment at: clang-rename/USRFinder.cpp:80
@@ -79,1 +79,3 @@
         TypeBeginLoc, 0, Context.getSourceManager(), Context.getLangOpts());
+    if (const auto *TemplateTypeParm = dyn_cast<TemplateTypeParmType>(Loc.getType())) {
+      return setResult(TemplateTypeParm->getDecl(), TypeBeginLoc, TypeEndLoc);
alexfh wrote:
> It's not common to use braces around single-line `if` bodies in LLVM/Clang code.
I do that literally everywhere :D LLVM Code Style isn't against it and I thinks it is good in terms of readability.


More information about the cfe-commits mailing list