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

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 20 06:23:43 PDT 2017


ioeric added inline comments.


================
Comment at: lib/Tooling/Refactoring/Rename/USRLocFinder.cpp:227
+    SourceLocation EndLoc = Expr->hasExplicitTemplateArgs()
+                                ? Expr->getLAngleLoc().getLocWithOffset(-1)
+                                : Expr->getLocEnd();
----------------
hokein wrote:
> 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.
Could you add a test for this? Thanks!


https://reviews.llvm.org/D39120





More information about the cfe-commits mailing list