[PATCH] D19482: [include-fixer] Add a find-all-symbols tool for include-fixer.

Benjamin Kramer via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 26 07:55:35 PDT 2016


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

lg with some minor comments remaining.


================
Comment at: include-fixer/find-all-symbols/FindAllSymbols.cpp:47
@@ +46,3 @@
+      const auto *RD = llvm::dyn_cast<clang::RecordDecl>(Context);
+      assert(RD && "Unexpected ContextDecl!");
+      Symbol->Contexts.emplace_back(SymbolInfo::Record, RD->getName().str());
----------------
Just use llvm::cast instead of llvm::dyn_cast, it includes the assert.

================
Comment at: include-fixer/find-all-symbols/FindAllSymbols.h:24
@@ +23,3 @@
+  public:
+    virtual ~ResultReporter(){};
+
----------------
nit: use = default instead of {}

================
Comment at: include-fixer/find-all-symbols/FindAllSymbols.h:38
@@ +37,3 @@
+private:
+  ResultReporter *const Reporter;
+};
----------------
nit: move const to the start of the line.


http://reviews.llvm.org/D19482





More information about the cfe-commits mailing list