diff options
Diffstat (limited to 'clang-tools-extra/include-fixer/find-all-symbols/FindAllSymbols.h')
-rw-r--r-- | clang-tools-extra/include-fixer/find-all-symbols/FindAllSymbols.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/clang-tools-extra/include-fixer/find-all-symbols/FindAllSymbols.h b/clang-tools-extra/include-fixer/find-all-symbols/FindAllSymbols.h index 1d84cc40337..fca849f5e48 100644 --- a/clang-tools-extra/include-fixer/find-all-symbols/FindAllSymbols.h +++ b/clang-tools-extra/include-fixer/find-all-symbols/FindAllSymbols.h @@ -32,18 +32,24 @@ class HeaderMapCollector; /// through the class. #include fixer only needs the class name to find /// headers. /// -class FindAllSymbols : public clang::ast_matchers::MatchFinder::MatchCallback { +class FindAllSymbols : public ast_matchers::MatchFinder::MatchCallback { public: explicit FindAllSymbols(SymbolReporter *Reporter, HeaderMapCollector *Collector = nullptr) : Reporter(Reporter), Collector(Collector) {} - void registerMatchers(clang::ast_matchers::MatchFinder *MatchFinder); + void registerMatchers(ast_matchers::MatchFinder *MatchFinder); - void - run(const clang::ast_matchers::MatchFinder::MatchResult &result) override; + void run(const ast_matchers::MatchFinder::MatchResult &result) override; + +protected: + void onEndOfTranslationUnit() override; private: + // Current source file being processed, filled by first symbol found. + std::string Filename; + // Findings for the current source file, flushed on onEndOfTranslationUnit. + SymbolInfo::SignalMap FileSymbols; // Reporter for SymbolInfo. SymbolReporter *const Reporter; // A remapping header file collector allowing clients include a different |