Few simple tweaks allow template parameters to be renamed. See TemplateTypenameFindBy{TemplateParam|TypeInside}.cpp for example how it works.
Details
Diff Detail
Event Timeline
clang-rename/USRFinder.cpp | ||
---|---|---|
80 | It's not common to use braces around single-line if bodies in LLVM/Clang code. | |
clang-rename/USRLocFinder.cpp | ||
107 | nit: const auto * | |
test/clang-rename/TemplateTypenameFindByTemplateParam.cpp | ||
4–5 | As noted elsewhere, this way of testing is wrong. | |
test/clang-rename/TemplateTypenameFindByTypeInside.cpp | ||
4–5 | ditto |
clang-rename/USRFinder.cpp | ||
---|---|---|
80 | I do that literally everywhere :D LLVM Code Style isn't against it and I thinks it is good in terms of readability. |
LG
clang-rename/USRFinder.cpp | ||
---|---|---|
80 | 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. |
Seems a couple of tests would be incompatible to -fdelayed-template-parsing. Appeased in r277452.
It's not common to use braces around single-line if bodies in LLVM/Clang code.