[PATCH] D26423: [clang-move] Support template class.

Eric Liu via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 9 11:18:42 PST 2016


ioeric accepted this revision.
ioeric added a comment.
This revision is now accepted and ready to land.

Lg with a few nits.



================
Comment at: clang-move/ClangMove.cpp:417
+      if (const auto *FTD = CMD->getDescribedFunctionTemplate())
+        UnremovedDeclsInOldHeader.erase(FTD);
+      else
----------------
`erase(FTD ? FTD : CMD)`


================
Comment at: clang-move/ClangMove.cpp:430
+    // class template.
+    if (const auto * TC = CD->getDescribedClassTemplate())
+      MovedDecls.emplace_back(TC, &Result.Context->getSourceManager());
----------------
`emplace_back(TC ? TC : CD, ...)`


================
Comment at: clang-move/ClangMove.cpp:440
     if (RemovedDecls.empty()) {
-      if (const auto *DCT = FWD->getDescribedClassTemplate()) {
+      if (const auto *DCT = FWD->getDescribedClassTemplate())
         MovedDecls.emplace_back(DCT, &Result.Context->getSourceManager());
----------------
Similarly.


https://reviews.llvm.org/D26423





More information about the cfe-commits mailing list