[PATCH] D39120: [rename] Don't overwrite the template argument when renaming a template function.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 20 06:03:20 PDT 2017


hokein added inline comments.


================
Comment at: lib/Tooling/Refactoring/Rename/USRLocFinder.cpp:227
+    SourceLocation EndLoc = Expr->hasExplicitTemplateArgs()
+                                ? Expr->getLAngleLoc().getLocWithOffset(-1)
+                                : Expr->getLocEnd();
----------------
ioeric wrote:
> I wonder what would happen if we have `foo       <int>()`?
There will be a blank left like `bar <int>();` if we don't format the apply replacement, but I don't think this case really matters because we often format the placements before applying them.


https://reviews.llvm.org/D39120





More information about the cfe-commits mailing list