[PATCH] D22853: [clang-rename] add support for template parameter renaming
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 2 02:29:58 PDT 2016
alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.
LG
================
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())) {
----------------
I'm not saying it's prohibited by the LLVM coding guidelines, I'm saying that the other convention seems to be substantially more popular across the LLVM project. The difference in how readable the two styles are is not large, however, mixing the styles may actually hurt readability.
It looks like the use of braces for single-line if/for/... bodies is more common in the files being changed in this patch, so being locally consistent wrt. brace usage here is probably more valuable than pursuing consistency with LLVM code in general.
However, please be careful when changing code that prevalently uses the other style (no braces for single-line if/... bodies). Introducing inconsistencies is not good in terms of readability.
https://reviews.llvm.org/D22853
More information about the cfe-commits
mailing list