Few simple tweaks allow template parameters to be renamed. See TemplateTypenameFindBy{TemplateParam|TypeInside}.cpp for example how it works.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
clang-rename/USRFinder.cpp | ||
---|---|---|
80 ↗ | (On Diff #66095) | It's not common to use braces around single-line if bodies in LLVM/Clang code. |
clang-rename/USRLocFinder.cpp | ||
104 ↗ | (On Diff #66095) | nit: const auto * |
test/clang-rename/TemplateTypenameFindByTemplateParam.cpp | ||
1 ↗ | (On Diff #66095) | As noted elsewhere, this way of testing is wrong. |
test/clang-rename/TemplateTypenameFindByTypeInside.cpp | ||
1 ↗ | (On Diff #66095) | ditto |
clang-rename/USRFinder.cpp | ||
---|---|---|
80 ↗ | (On Diff #66095) | 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 ↗ | (On Diff #66373) | 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.