[PATCH] D74216: [clang-rename] Fix the missing template constructors.
Kirill Bobyrev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 10 05:43:56 PST 2020
kbobyrev added inline comments.
================
Comment at: clang-tools-extra/clangd/unittests/RenameTests.cpp:144
+ template<typename T>
+ [[Foo]]();
+
----------------
nit: Maybe also add `^` to this one and the one below?
================
Comment at: clang/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp:140
+ if (RecordDecl->hasUserDeclaredConstructor())
+ for (const auto *MD : RecordDecl->decls())
+ if (const auto *FTD = dyn_cast<FunctionTemplateDecl>(MD))
----------------
nit: The naming is slightly confusing, this probably suggests MethodDecl instance, but it's not spelled anywhere and may be better to call it just `D`.
================
Comment at: clang/test/clang-rename/TemplateCtor.cpp:1
+class Foo { // CHECK: class Bar {
+public:
----------------
Nit: not sure if the new file is necessary, maybe just put this under .../Ctor.cpp?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74216/new/
https://reviews.llvm.org/D74216
More information about the cfe-commits
mailing list