Index: include-fixer/find-all-symbols/FindAllSymbolsAction.h =================================================================== --- include-fixer/find-all-symbols/FindAllSymbolsAction.h +++ include-fixer/find-all-symbols/FindAllSymbolsAction.h @@ -25,7 +25,7 @@ public: explicit FindAllSymbolsAction( SymbolReporter *Reporter, - const HeaderMapCollector::HeaderMap *PostfixMap = nullptr); + const HeaderMapCollector::RegexHeaderMap *RegexHeaderMap = nullptr); std::unique_ptr CreateASTConsumer(clang::CompilerInstance &Compiler, @@ -43,16 +43,16 @@ public: FindAllSymbolsActionFactory( SymbolReporter *Reporter, - const HeaderMapCollector::HeaderMap *PostfixMap = nullptr) - : Reporter(Reporter), PostfixMap(PostfixMap) {} + const HeaderMapCollector::RegexHeaderMap *RegexHeaderMap = nullptr) + : Reporter(Reporter), RegexHeaderMap(RegexHeaderMap) {} virtual clang::FrontendAction *create() override { - return new FindAllSymbolsAction(Reporter, PostfixMap); + return new FindAllSymbolsAction(Reporter, RegexHeaderMap); } private: SymbolReporter *const Reporter; - const HeaderMapCollector::HeaderMap *const PostfixMap; + const HeaderMapCollector::RegexHeaderMap *const RegexHeaderMap; }; } // namespace find_all_symbols Index: include-fixer/find-all-symbols/FindAllSymbolsAction.cpp =================================================================== --- include-fixer/find-all-symbols/FindAllSymbolsAction.cpp +++ include-fixer/find-all-symbols/FindAllSymbolsAction.cpp @@ -13,8 +13,9 @@ namespace find_all_symbols { FindAllSymbolsAction::FindAllSymbolsAction( - SymbolReporter *Reporter, const HeaderMapCollector::HeaderMap *PostfixMap) - : Reporter(Reporter), Collector(PostfixMap), Handler(&Collector), + SymbolReporter *Reporter, + const HeaderMapCollector::RegexHeaderMap *RegexHeaderMap) + : Reporter(Reporter), Collector(RegexHeaderMap), Handler(&Collector), Matcher(Reporter, &Collector) { Matcher.registerMatchers(&MatchFinder); } Index: include-fixer/find-all-symbols/HeaderMapCollector.h =================================================================== --- include-fixer/find-all-symbols/HeaderMapCollector.h +++ include-fixer/find-all-symbols/HeaderMapCollector.h @@ -11,29 +11,32 @@ #define LLVM_CLANG_TOOLS_EXTRA_FIND_ALL_SYMBOLS_HEADER_MAP_COLLECTOR_H #include "llvm/ADT/StringMap.h" +#include "llvm/Support/Regex.h" #include namespace clang { namespace find_all_symbols { /// \brief HeaderMappCollector collects all remapping header files. This maps -/// complete header names or postfixes of header names to header names. +/// complete header names or header name regex patterns to header names. class HeaderMapCollector { public: typedef llvm::StringMap HeaderMap; + typedef std::vector> + RegexHeaderMap; - HeaderMapCollector() : PostfixMappingTable(nullptr) {} + HeaderMapCollector() : RegexHeaderMappingTable(nullptr) {} - explicit HeaderMapCollector(const HeaderMap *PostfixMap) - : PostfixMappingTable(PostfixMap) {} + explicit HeaderMapCollector(const RegexHeaderMap *RegexHeaderMappingTable) + : RegexHeaderMappingTable(RegexHeaderMappingTable) {} void addHeaderMapping(llvm::StringRef OrignalHeaderPath, llvm::StringRef MappingHeaderPath) { HeaderMappingTable[OrignalHeaderPath] = MappingHeaderPath; }; - /// Check if there is a mapping from \p Header or its postfix to another - /// header name. + /// Check if there is a mapping from \p Header or a regex pattern that matches + /// it to another header name. /// \param Header A header name. /// \return \p Header itself if there is no mapping for it; otherwise, return /// a mapped header name. @@ -43,9 +46,9 @@ /// A string-to-string map saving the mapping relationship. HeaderMap HeaderMappingTable; - // A postfix-to-header name map. + // A map from header patterns to header names. // This is a reference to a hard-coded map. - const HeaderMap *const PostfixMappingTable; + const RegexHeaderMap *const RegexHeaderMappingTable; }; } // namespace find_all_symbols Index: include-fixer/find-all-symbols/HeaderMapCollector.cpp =================================================================== --- include-fixer/find-all-symbols/HeaderMapCollector.cpp +++ include-fixer/find-all-symbols/HeaderMapCollector.cpp @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "HeaderMapCollector.h" +#include "llvm/Support/Regex.h" namespace clang { namespace find_all_symbols { @@ -18,12 +19,10 @@ if (Iter != HeaderMappingTable.end()) return Iter->second; // If there is no complete header name mapping for this header, check the - // postfix mapping. - // FIXME: this is not very efficient. Change PostfixMappingTable to use - // postfix tree if necessary. - if (PostfixMappingTable) { - for (const auto &Entry : *PostfixMappingTable) { - if (Header.endswith(Entry.first())) + // regex header mapping. + if (RegexHeaderMappingTable) { + for (const auto &Entry : *RegexHeaderMappingTable) { + if (llvm::Regex(Entry.first).match(Header)) return Entry.second; } } Index: include-fixer/find-all-symbols/STLPostfixHeaderMap.h =================================================================== --- include-fixer/find-all-symbols/STLPostfixHeaderMap.h +++ include-fixer/find-all-symbols/STLPostfixHeaderMap.h @@ -15,7 +15,7 @@ namespace clang { namespace find_all_symbols { -const HeaderMapCollector::HeaderMap* getSTLPostfixHeaderMap(); +const HeaderMapCollector::RegexHeaderMap *getSTLPostfixHeaderMap(); } // namespace find_all_symbols } // namespace clang Index: include-fixer/find-all-symbols/STLPostfixHeaderMap.cpp =================================================================== --- include-fixer/find-all-symbols/STLPostfixHeaderMap.cpp +++ include-fixer/find-all-symbols/STLPostfixHeaderMap.cpp @@ -12,636 +12,636 @@ namespace clang { namespace find_all_symbols { -const HeaderMapCollector::HeaderMap *getSTLPostfixHeaderMap() { - static const HeaderMapCollector::HeaderMap STLPostfixHeaderMap = { - {"include/__stddef_max_align_t.h", ""}, - {"include/__wmmintrin_aes.h", ""}, - {"include/__wmmintrin_pclmul.h", ""}, - {"include/adxintrin.h", ""}, - {"include/ammintrin.h", ""}, - {"include/avx2intrin.h", ""}, - {"include/avx512bwintrin.h", ""}, - {"include/avx512cdintrin.h", ""}, - {"include/avx512dqintrin.h", ""}, - {"include/avx512erintrin.h", ""}, - {"include/avx512fintrin.h", ""}, - {"include/avx512ifmaintrin.h", ""}, - {"include/avx512ifmavlintrin.h", ""}, - {"include/avx512pfintrin.h", ""}, - {"include/avx512vbmiintrin.h", ""}, - {"include/avx512vbmivlintrin.h", ""}, - {"include/avx512vlbwintrin.h", ""}, - {"include/avx512vlcdintrin.h", ""}, - {"include/avx512vldqintrin.h", ""}, - {"include/avx512vlintrin.h", ""}, - {"include/avxintrin.h", ""}, - {"include/bmi2intrin.h", ""}, - {"include/bmiintrin.h", ""}, - {"include/emmintrin.h", ""}, - {"include/f16cintrin.h", ""}, - {"include/float.h", ""}, - {"include/fma4intrin.h", ""}, - {"include/fmaintrin.h", ""}, - {"include/fxsrintrin.h", ""}, - {"include/ia32intrin.h", ""}, - {"include/immintrin.h", ""}, - {"include/inttypes.h", ""}, - {"include/limits.h", ""}, - {"include/lzcntintrin.h", ""}, - {"include/mm3dnow.h", ""}, - {"include/mm_malloc.h", ""}, - {"include/mmintrin.h", ""}, - {"include/mwaitxintrin.h", ""}, - {"include/pkuintrin.h", ""}, - {"include/pmmintrin.h", ""}, - {"include/popcntintrin.h", ""}, - {"include/prfchwintrin.h", ""}, - {"include/rdseedintrin.h", ""}, - {"include/rtmintrin.h", ""}, - {"include/shaintrin.h", ""}, - {"include/smmintrin.h", ""}, - {"include/stdalign.h", ""}, - {"include/stdarg.h", ""}, - {"include/stdbool.h", ""}, - {"include/stddef.h", ""}, - {"include/stdint.h", ""}, - {"include/tbmintrin.h", ""}, - {"include/tmmintrin.h", ""}, - {"include/wmmintrin.h", ""}, - {"include/x86intrin.h", ""}, - {"include/xmmintrin.h", ""}, - {"include/xopintrin.h", ""}, - {"include/xsavecintrin.h", ""}, - {"include/xsaveintrin.h", ""}, - {"include/xsaveoptintrin.h", ""}, - {"include/xsavesintrin.h", ""}, - {"include/xtestintrin.h", ""}, - {"include/_G_config.h", ""}, - {"include/assert.h", ""}, - {"algorithm", ""}, - {"array", ""}, - {"atomic", ""}, - {"backward/auto_ptr.h", ""}, - {"backward/binders.h", ""}, - {"bits/algorithmfwd.h", ""}, - {"bits/alloc_traits.h", ""}, - {"bits/allocator.h", ""}, - {"bits/atomic_base.h", ""}, - {"bits/atomic_lockfree_defines.h", ""}, - {"bits/basic_ios.h", ""}, - {"bits/basic_ios.tcc", ""}, - {"bits/basic_string.h", ""}, - {"bits/basic_string.tcc", ""}, - {"bits/char_traits.h", ""}, - {"bits/codecvt.h", ""}, - {"bits/concept_check.h", ""}, - {"bits/cpp_type_traits.h", ""}, - {"bits/cxxabi_forced.h", ""}, - {"bits/deque.tcc", ""}, - {"bits/exception_defines.h", ""}, - {"bits/exception_ptr.h", ""}, - {"bits/forward_list.h", ""}, - {"bits/forward_list.tcc", ""}, - {"bits/fstream.tcc", ""}, - {"bits/functexcept.h", ""}, - {"bits/functional_hash.h", ""}, - {"bits/gslice.h", ""}, - {"bits/gslice_array.h", ""}, - {"bits/hash_bytes.h", ""}, - {"bits/hashtable.h", ""}, - {"bits/hashtable_policy.h", ""}, - {"bits/indirect_array.h", ""}, - {"bits/ios_base.h", ""}, - {"bits/istream.tcc", ""}, - {"bits/list.tcc", ""}, - {"bits/locale_classes.h", ""}, - {"bits/locale_classes.tcc", ""}, - {"bits/locale_facets.h", ""}, - {"bits/locale_facets.tcc", ""}, - {"bits/locale_facets_nonio.h", ""}, - {"bits/locale_facets_nonio.tcc", ""}, - {"bits/localefwd.h", ""}, - {"bits/mask_array.h", ""}, - {"bits/memoryfwd.h", ""}, - {"bits/move.h", ""}, - {"bits/nested_exception.h", ""}, - {"bits/ostream.tcc", ""}, - {"bits/ostream_insert.h", ""}, - {"bits/postypes.h", ""}, - {"bits/ptr_traits.h", ""}, - {"bits/random.h", ""}, - {"bits/random.tcc", ""}, - {"bits/range_access.h", ""}, - {"bits/regex.h", ""}, - {"bits/regex_compiler.h", ""}, - {"bits/regex_constants.h", ""}, - {"bits/regex_cursor.h", ""}, - {"bits/regex_error.h", ""}, - {"bits/regex_grep_matcher.h", ""}, - {"bits/regex_grep_matcher.tcc", ""}, - {"bits/regex_nfa.h", ""}, - {"bits/shared_ptr.h", ""}, - {"bits/shared_ptr_base.h", ""}, - {"bits/slice_array.h", ""}, - {"bits/sstream.tcc", ""}, - {"bits/stl_algo.h", ""}, - {"bits/stl_algobase.h", ""}, - {"bits/stl_bvector.h", ""}, - {"bits/stl_construct.h", ""}, - {"bits/stl_deque.h", ""}, - {"bits/stl_function.h", ""}, - {"bits/stl_heap.h", ""}, - {"bits/stl_iterator.h", ""}, - {"bits/stl_iterator_base_funcs.h", ""}, - {"bits/stl_iterator_base_types.h", ""}, - {"bits/stl_list.h", ""}, - {"bits/stl_map.h", ""}, - {"bits/stl_multimap.h", ""}, - {"bits/stl_multiset.h", ""}, - {"bits/stl_numeric.h", ""}, - {"bits/stl_pair.h", ""}, - {"bits/stl_queue.h", ""}, - {"bits/stl_raw_storage_iter.h", ""}, - {"bits/stl_relops.h", ""}, - {"bits/stl_set.h", ""}, - {"bits/stl_stack.h", ""}, - {"bits/stl_tempbuf.h", ""}, - {"bits/stl_tree.h", ""}, - {"bits/stl_uninitialized.h", ""}, - {"bits/stl_vector.h", ""}, - {"bits/stream_iterator.h", ""}, - {"bits/streambuf.tcc", ""}, - {"bits/streambuf_iterator.h", ""}, - {"bits/stringfwd.h", ""}, - {"bits/unique_ptr.h", ""}, - {"bits/unordered_map.h", ""}, - {"bits/unordered_set.h", ""}, - {"bits/uses_allocator.h", ""}, - {"bits/valarray_after.h", ""}, - {"bits/valarray_array.h", ""}, - {"bits/valarray_array.tcc", ""}, - {"bits/valarray_before.h", ""}, - {"bits/vector.tcc", ""}, - {"bitset", ""}, - {"ccomplex", ""}, - {"cctype", ""}, - {"cerrno", ""}, - {"cfenv", ""}, - {"cfloat", ""}, - {"chrono", ""}, - {"cinttypes", ""}, - {"climits", ""}, - {"clocale", ""}, - {"cmath", ""}, - {"complex", ""}, - {"complex.h", ""}, - {"condition_variable", ""}, - {"csetjmp", ""}, - {"csignal", ""}, - {"cstdalign", ""}, - {"cstdarg", ""}, - {"cstdbool", ""}, - {"cstdint", ""}, - {"cstdio", ""}, - {"cstdlib", ""}, - {"cstring", ""}, - {"ctgmath", ""}, - {"ctime", ""}, - {"cwchar", ""}, - {"cwctype", ""}, - {"cxxabi.h", ""}, - {"debug/debug.h", ""}, - {"deque", ""}, - {"exception", ""}, - {"ext/alloc_traits.h", ""}, - {"ext/atomicity.h", ""}, - {"ext/concurrence.h", ""}, - {"ext/new_allocator.h", ""}, - {"ext/numeric_traits.h", ""}, - {"ext/string_conversions.h", ""}, - {"ext/type_traits.h", ""}, - {"fenv.h", ""}, - {"forward_list", ""}, - {"fstream", ""}, - {"functional", ""}, - {"future", ""}, - {"initializer_list", ""}, - {"iomanip", ""}, - {"ios", ""}, - {"iosfwd", ""}, - {"iostream", ""}, - {"istream", ""}, - {"iterator", ""}, - {"limits", ""}, - {"list", ""}, - {"locale", ""}, - {"map", ""}, - {"memory", ""}, - {"mutex", ""}, - {"new", ""}, - {"numeric", ""}, - {"ostream", ""}, - {"queue", ""}, - {"random", ""}, - {"ratio", ""}, - {"regex", ""}, - {"scoped_allocator", ""}, - {"set", ""}, - {"sstream", ""}, - {"stack", ""}, - {"stdexcept", ""}, - {"streambuf", ""}, - {"string", ""}, - {"system_error", ""}, - {"tgmath.h", ""}, - {"thread", ""}, - {"tuple", ""}, - {"type_traits", ""}, - {"typeindex", ""}, - {"typeinfo", ""}, - {"unordered_map", ""}, - {"unordered_set", ""}, - {"utility", ""}, - {"valarray", ""}, - {"vector", ""}, - {"include/complex.h", ""}, - {"include/ctype.h", ""}, - {"include/errno.h", ""}, - {"include/fenv.h", ""}, - {"include/inttypes.h", ""}, - {"include/libio.h", ""}, - {"include/limits.h", ""}, - {"include/locale.h", ""}, - {"include/math.h", ""}, - {"include/setjmp.h", ""}, - {"include/signal.h", ""}, - {"include/stdint.h", ""}, - {"include/stdio.h", ""}, - {"include/stdlib.h", ""}, - {"include/string.h", ""}, - {"include/time.h", ""}, - {"include/wchar.h", ""}, - {"include/wctype.h", ""}, - {"bits/cmathcalls.h", ""}, - {"bits/errno.h", ""}, - {"bits/fenv.h", ""}, - {"bits/huge_val.h", ""}, - {"bits/huge_valf.h", ""}, - {"bits/huge_vall.h", ""}, - {"bits/inf.h", ""}, - {"bits/local_lim.h", ""}, - {"bits/locale.h", ""}, - {"bits/mathcalls.h", ""}, - {"bits/mathdef.h", ""}, - {"bits/nan.h", ""}, - {"bits/posix1_lim.h", ""}, - {"bits/posix2_lim.h", ""}, - {"bits/setjmp.h", ""}, - {"bits/sigaction.h", ""}, - {"bits/sigcontext.h", ""}, - {"bits/siginfo.h", ""}, - {"bits/signum.h", ""}, - {"bits/sigset.h", ""}, - {"bits/sigstack.h", ""}, - {"bits/stdio_lim.h", ""}, - {"bits/sys_errlist.h", ""}, - {"bits/time.h", ""}, - {"bits/timex.h", ""}, - {"bits/typesizes.h", ""}, - {"bits/wchar.h", ""}, - {"bits/wordsize.h", ""}, - {"bits/xopen_lim.h", ""}, - {"include/xlocale.h", ""}, - {"bits/atomic_word.h", ""}, - {"bits/basic_file.h", ""}, - {"bits/c++allocator.h", ""}, - {"bits/c++config.h", ""}, - {"bits/c++io.h", ""}, - {"bits/c++locale.h", ""}, - {"bits/cpu_defines.h", ""}, - {"bits/ctype_base.h", ""}, - {"bits/cxxabi_tweaks.h", ""}, - {"bits/error_constants.h", ""}, - {"bits/gthr-default.h", ""}, - {"bits/gthr.h", ""}, - {"bits/opt_random.h", ""}, - {"bits/os_defines.h", ""}, +const HeaderMapCollector::RegexHeaderMap *getSTLPostfixHeaderMap() { + static const HeaderMapCollector::RegexHeaderMap STLPostfixHeaderMap = { + {"include/__stddef_max_align_t.h$", ""}, + {"include/__wmmintrin_aes.h$", ""}, + {"include/__wmmintrin_pclmul.h$", ""}, + {"include/adxintrin.h$", ""}, + {"include/ammintrin.h$", ""}, + {"include/avx2intrin.h$", ""}, + {"include/avx512bwintrin.h$", ""}, + {"include/avx512cdintrin.h$", ""}, + {"include/avx512dqintrin.h$", ""}, + {"include/avx512erintrin.h$", ""}, + {"include/avx512fintrin.h$", ""}, + {"include/avx512ifmaintrin.h$", ""}, + {"include/avx512ifmavlintrin.h$", ""}, + {"include/avx512pfintrin.h$", ""}, + {"include/avx512vbmiintrin.h$", ""}, + {"include/avx512vbmivlintrin.h$", ""}, + {"include/avx512vlbwintrin.h$", ""}, + {"include/avx512vlcdintrin.h$", ""}, + {"include/avx512vldqintrin.h$", ""}, + {"include/avx512vlintrin.h$", ""}, + {"include/avxintrin.h$", ""}, + {"include/bmi2intrin.h$", ""}, + {"include/bmiintrin.h$", ""}, + {"include/emmintrin.h$", ""}, + {"include/f16cintrin.h$", ""}, + {"include/float.h$", ""}, + {"include/fma4intrin.h$", ""}, + {"include/fmaintrin.h$", ""}, + {"include/fxsrintrin.h$", ""}, + {"include/ia32intrin.h$", ""}, + {"include/immintrin.h$", ""}, + {"include/inttypes.h$", ""}, + {"include/limits.h$", ""}, + {"include/lzcntintrin.h$", ""}, + {"include/mm3dnow.h$", ""}, + {"include/mm_malloc.h$", ""}, + {"include/mmintrin.h$", ""}, + {"include/mwaitxintrin.h$", ""}, + {"include/pkuintrin.h$", ""}, + {"include/pmmintrin.h$", ""}, + {"include/popcntintrin.h$", ""}, + {"include/prfchwintrin.h$", ""}, + {"include/rdseedintrin.h$", ""}, + {"include/rtmintrin.h$", ""}, + {"include/shaintrin.h$", ""}, + {"include/smmintrin.h$", ""}, + {"include/stdalign.h$", ""}, + {"include/stdarg.h$", ""}, + {"include/stdbool.h$", ""}, + {"include/stddef.h$", ""}, + {"include/stdint.h$", ""}, + {"include/tbmintrin.h$", ""}, + {"include/tmmintrin.h$", ""}, + {"include/wmmintrin.h$", ""}, + {"include/x86intrin.h$", ""}, + {"include/xmmintrin.h$", ""}, + {"include/xopintrin.h$", ""}, + {"include/xsavecintrin.h$", ""}, + {"include/xsaveintrin.h$", ""}, + {"include/xsaveoptintrin.h$", ""}, + {"include/xsavesintrin.h$", ""}, + {"include/xtestintrin.h$", ""}, + {"include/_G_config.h$", ""}, + {"include/assert.h$", ""}, + {"algorithm$", ""}, + {"array$", ""}, + {"atomic$", ""}, + {"backward/auto_ptr.h$", ""}, + {"backward/binders.h$", ""}, + {"bits/algorithmfwd.h$", ""}, + {"bits/alloc_traits.h$", ""}, + {"bits/allocator.h$", ""}, + {"bits/atomic_base.h$", ""}, + {"bits/atomic_lockfree_defines.h$", ""}, + {"bits/basic_ios.h$", ""}, + {"bits/basic_ios.tcc$", ""}, + {"bits/basic_string.h$", ""}, + {"bits/basic_string.tcc$", ""}, + {"bits/char_traits.h$", ""}, + {"bits/codecvt.h$", ""}, + {"bits/concept_check.h$", ""}, + {"bits/cpp_type_traits.h$", ""}, + {"bits/cxxabi_forced.h$", ""}, + {"bits/deque.tcc$", ""}, + {"bits/exception_defines.h$", ""}, + {"bits/exception_ptr.h$", ""}, + {"bits/forward_list.h$", ""}, + {"bits/forward_list.tcc$", ""}, + {"bits/fstream.tcc$", ""}, + {"bits/functexcept.h$", ""}, + {"bits/functional_hash.h$", ""}, + {"bits/gslice.h$", ""}, + {"bits/gslice_array.h$", ""}, + {"bits/hash_bytes.h$", ""}, + {"bits/hashtable.h$", ""}, + {"bits/hashtable_policy.h$", ""}, + {"bits/indirect_array.h$", ""}, + {"bits/ios_base.h$", ""}, + {"bits/istream.tcc$", ""}, + {"bits/list.tcc$", ""}, + {"bits/locale_classes.h$", ""}, + {"bits/locale_classes.tcc$", ""}, + {"bits/locale_facets.h$", ""}, + {"bits/locale_facets.tcc$", ""}, + {"bits/locale_facets_nonio.h$", ""}, + {"bits/locale_facets_nonio.tcc$", ""}, + {"bits/localefwd.h$", ""}, + {"bits/mask_array.h$", ""}, + {"bits/memoryfwd.h$", ""}, + {"bits/move.h$", ""}, + {"bits/nested_exception.h$", ""}, + {"bits/ostream.tcc$", ""}, + {"bits/ostream_insert.h$", ""}, + {"bits/postypes.h$", ""}, + {"bits/ptr_traits.h$", ""}, + {"bits/random.h$", ""}, + {"bits/random.tcc$", ""}, + {"bits/range_access.h$", ""}, + {"bits/regex.h$", ""}, + {"bits/regex_compiler.h$", ""}, + {"bits/regex_constants.h$", ""}, + {"bits/regex_cursor.h$", ""}, + {"bits/regex_error.h$", ""}, + {"bits/regex_grep_matcher.h$", ""}, + {"bits/regex_grep_matcher.tcc$", ""}, + {"bits/regex_nfa.h$", ""}, + {"bits/shared_ptr.h$", ""}, + {"bits/shared_ptr_base.h$", ""}, + {"bits/slice_array.h$", ""}, + {"bits/sstream.tcc$", ""}, + {"bits/stl_algo.h$", ""}, + {"bits/stl_algobase.h$", ""}, + {"bits/stl_bvector.h$", ""}, + {"bits/stl_construct.h$", ""}, + {"bits/stl_deque.h$", ""}, + {"bits/stl_function.h$", ""}, + {"bits/stl_heap.h$", ""}, + {"bits/stl_iterator.h$", ""}, + {"bits/stl_iterator_base_funcs.h$", ""}, + {"bits/stl_iterator_base_types.h$", ""}, + {"bits/stl_list.h$", ""}, + {"bits/stl_map.h$", ""}, + {"bits/stl_multimap.h$", ""}, + {"bits/stl_multiset.h$", ""}, + {"bits/stl_numeric.h$", ""}, + {"bits/stl_pair.h$", ""}, + {"bits/stl_queue.h$", ""}, + {"bits/stl_raw_storage_iter.h$", ""}, + {"bits/stl_relops.h$", ""}, + {"bits/stl_set.h$", ""}, + {"bits/stl_stack.h$", ""}, + {"bits/stl_tempbuf.h$", ""}, + {"bits/stl_tree.h$", ""}, + {"bits/stl_uninitialized.h$", ""}, + {"bits/stl_vector.h$", ""}, + {"bits/stream_iterator.h$", ""}, + {"bits/streambuf.tcc$", ""}, + {"bits/streambuf_iterator.h$", ""}, + {"bits/stringfwd.h$", ""}, + {"bits/unique_ptr.h$", ""}, + {"bits/unordered_map.h$", ""}, + {"bits/unordered_set.h$", ""}, + {"bits/uses_allocator.h$", ""}, + {"bits/valarray_after.h$", ""}, + {"bits/valarray_array.h$", ""}, + {"bits/valarray_array.tcc$", ""}, + {"bits/valarray_before.h$", ""}, + {"bits/vector.tcc$", ""}, + {"bitset$", ""}, + {"ccomplex$", ""}, + {"cctype$", ""}, + {"cerrno$", ""}, + {"cfenv$", ""}, + {"cfloat$", ""}, + {"chrono$", ""}, + {"cinttypes$", ""}, + {"climits$", ""}, + {"clocale$", ""}, + {"cmath$", ""}, + {"complex$", ""}, + {"complex.h$", ""}, + {"condition_variable$", ""}, + {"csetjmp$", ""}, + {"csignal$", ""}, + {"cstdalign$", ""}, + {"cstdarg$", ""}, + {"cstdbool$", ""}, + {"cstdint$", ""}, + {"cstdio$", ""}, + {"cstdlib$", ""}, + {"cstring$", ""}, + {"ctgmath$", ""}, + {"ctime$", ""}, + {"cwchar$", ""}, + {"cwctype$", ""}, + {"cxxabi.h$", ""}, + {"debug/debug.h$", ""}, + {"deque$", ""}, + {"exception$", ""}, + {"ext/alloc_traits.h$", ""}, + {"ext/atomicity.h$", ""}, + {"ext/concurrence.h$", ""}, + {"ext/new_allocator.h$", ""}, + {"ext/numeric_traits.h$", ""}, + {"ext/string_conversions.h$", ""}, + {"ext/type_traits.h$", ""}, + {"fenv.h$", ""}, + {"forward_list$", ""}, + {"fstream$", ""}, + {"functional$", ""}, + {"future$", ""}, + {"initializer_list$", ""}, + {"iomanip$", ""}, + {"ios$", ""}, + {"iosfwd$", ""}, + {"iostream$", ""}, + {"istream$", ""}, + {"iterator$", ""}, + {"limits$", ""}, + {"list$", ""}, + {"locale$", ""}, + {"map$", ""}, + {"memory$", ""}, + {"mutex$", ""}, + {"new$", ""}, + {"numeric$", ""}, + {"ostream$", ""}, + {"queue$", ""}, + {"random$", ""}, + {"ratio$", ""}, + {"regex$", ""}, + {"scoped_allocator$", ""}, + {"set$", ""}, + {"sstream$", ""}, + {"stack$", ""}, + {"stdexcept$", ""}, + {"streambuf$", ""}, + {"string$", ""}, + {"system_error$", ""}, + {"tgmath.h$", ""}, + {"thread$", ""}, + {"tuple$", ""}, + {"type_traits$", ""}, + {"typeindex$", ""}, + {"typeinfo$", ""}, + {"unordered_map$", ""}, + {"unordered_set$", ""}, + {"utility$", ""}, + {"valarray$", ""}, + {"vector$", ""}, + {"include/complex.h$", ""}, + {"include/ctype.h$", ""}, + {"include/errno.h$", ""}, + {"include/fenv.h$", ""}, + {"include/inttypes.h$", ""}, + {"include/libio.h$", ""}, + {"include/limits.h$", ""}, + {"include/locale.h$", ""}, + {"include/math.h$", ""}, + {"include/setjmp.h$", ""}, + {"include/signal.h$", ""}, + {"include/stdint.h$", ""}, + {"include/stdio.h$", ""}, + {"include/stdlib.h$", ""}, + {"include/string.h$", ""}, + {"include/time.h$", ""}, + {"include/wchar.h$", ""}, + {"include/wctype.h$", ""}, + {"bits/cmathcalls.h$", ""}, + {"bits/errno.h$", ""}, + {"bits/fenv.h$", ""}, + {"bits/huge_val.h$", ""}, + {"bits/huge_valf.h$", ""}, + {"bits/huge_vall.h$", ""}, + {"bits/inf.h$", ""}, + {"bits/local_lim.h$", ""}, + {"bits/locale.h$", ""}, + {"bits/mathcalls.h$", ""}, + {"bits/mathdef.h$", ""}, + {"bits/nan.h$", ""}, + {"bits/posix1_lim.h$", ""}, + {"bits/posix2_lim.h$", ""}, + {"bits/setjmp.h$", ""}, + {"bits/sigaction.h$", ""}, + {"bits/sigcontext.h$", ""}, + {"bits/siginfo.h$", ""}, + {"bits/signum.h$", ""}, + {"bits/sigset.h$", ""}, + {"bits/sigstack.h$", ""}, + {"bits/stdio_lim.h$", ""}, + {"bits/sys_errlist.h$", ""}, + {"bits/time.h$", ""}, + {"bits/timex.h$", ""}, + {"bits/typesizes.h$", ""}, + {"bits/wchar.h$", ""}, + {"bits/wordsize.h$", ""}, + {"bits/xopen_lim.h$", ""}, + {"include/xlocale.h$", ""}, + {"bits/atomic_word.h$", ""}, + {"bits/basic_file.h$", ""}, + {"bits/c++allocator.h$", ""}, + {"bits/c++config.h$", ""}, + {"bits/c++io.h$", ""}, + {"bits/c++locale.h$", ""}, + {"bits/cpu_defines.h$", ""}, + {"bits/ctype_base.h$", ""}, + {"bits/cxxabi_tweaks.h$", ""}, + {"bits/error_constants.h$", ""}, + {"bits/gthr-default.h$", ""}, + {"bits/gthr.h$", ""}, + {"bits/opt_random.h$", ""}, + {"bits/os_defines.h$", ""}, // GNU C headers - {"include/aio.h", ""}, - {"include/aliases.h", ""}, - {"include/alloca.h", ""}, - {"include/ar.h", ""}, - {"include/argp.h", ""}, - {"include/argz.h", ""}, - {"include/arpa/nameser.h", ""}, - {"include/arpa/nameser_compat.h", ""}, - {"include/byteswap.h", ""}, - {"include/cpio.h", ""}, - {"include/crypt.h", ""}, - {"include/dirent.h", ""}, - {"include/dlfcn.h", ""}, - {"include/elf.h", ""}, - {"include/endian.h", ""}, - {"include/envz.h", ""}, - {"include/err.h", ""}, - {"include/error.h", ""}, - {"include/execinfo.h", ""}, - {"include/fcntl.h", ""}, - {"include/features.h", ""}, - {"include/fenv.h", ""}, - {"include/fmtmsg.h", ""}, - {"include/fnmatch.h", ""}, - {"include/fstab.h", ""}, - {"include/fts.h", ""}, - {"include/ftw.h", ""}, - {"include/gconv.h", ""}, - {"include/getopt.h", ""}, - {"include/glob.h", ""}, - {"include/grp.h", ""}, - {"include/gshadow.h", ""}, - {"include/iconv.h", ""}, - {"include/ifaddrs.h", ""}, - {"include/kdb.h", ""}, - {"include/langinfo.h", ""}, - {"include/libgen.h", ""}, - {"include/libintl.h", ""}, - {"include/link.h", ""}, - {"include/malloc.h", ""}, - {"include/mcheck.h", ""}, - {"include/memory.h", ""}, - {"include/mntent.h", ""}, - {"include/monetary.h", ""}, - {"include/mqueue.h", ""}, - {"include/netdb.h", ""}, - {"include/netinet/in.h", ""}, - {"include/nl_types.h", ""}, - {"include/nss.h", ""}, - {"include/obstack.h", ""}, - {"include/panel.h", ""}, - {"include/paths.h", ""}, - {"include/printf.h", ""}, - {"include/profile.h", ""}, - {"include/pthread.h", ""}, - {"include/pty.h", ""}, - {"include/pwd.h", ""}, - {"include/re_comp.h", ""}, - {"include/regex.h", ""}, - {"include/regexp.h", ""}, - {"include/resolv.h", ""}, - {"include/rpc/netdb.h", ""}, - {"include/sched.h", ""}, - {"include/search.h", ""}, - {"include/semaphore.h", ""}, - {"include/sgtty.h", ""}, - {"include/shadow.h", ""}, - {"include/spawn.h", ""}, - {"include/stab.h", ""}, - {"include/stdc-predef.h", ""}, - {"include/stdio_ext.h", ""}, - {"include/strings.h", ""}, - {"include/stropts.h", ""}, - {"include/sudo_plugin.h", ""}, - {"include/sysexits.h", ""}, - {"include/tar.h", ""}, - {"include/tcpd.h", ""}, - {"include/term.h", ""}, - {"include/term_entry.h", ""}, - {"include/termcap.h", ""}, - {"include/termios.h", ""}, - {"include/thread_db.h", ""}, - {"include/tic.h", ""}, - {"include/ttyent.h", ""}, - {"include/uchar.h", ""}, - {"include/ucontext.h", ""}, - {"include/ulimit.h", ""}, - {"include/unctrl.h", ""}, - {"include/unistd.h", ""}, - {"include/utime.h", ""}, - {"include/utmp.h", ""}, - {"include/utmpx.h", ""}, - {"include/values.h", ""}, - {"include/wordexp.h", ""}, - {"fpu_control.h", ""}, - {"ieee754.h", ""}, - {"include/xlocale.h", ""}, - {"gnu/lib-names.h", ""}, - {"gnu/libc-version.h", ""}, - {"gnu/option-groups.h", ""}, - {"gnu/stubs-32.h", ""}, - {"gnu/stubs-64.h", ""}, - {"gnu/stubs-x32.h", ""}, - {"include/rpc/auth_des.h", ""}, - {"include/rpc/rpc_msg.h", ""}, - {"include/rpc/pmap_clnt.h", ""}, - {"include/rpc/rpc.h", ""}, - {"include/rpc/types.h", ""}, - {"include/rpc/auth_unix.h", ""}, - {"include/rpc/key_prot.h", ""}, - {"include/rpc/pmap_prot.h", ""}, - {"include/rpc/auth.h", ""}, - {"include/rpc/svc_auth.h", ""}, - {"include/rpc/xdr.h", ""}, - {"include/rpc/pmap_rmt.h", ""}, - {"include/rpc/des_crypt.h", ""}, - {"include/rpc/svc.h", ""}, - {"include/rpc/rpc_des.h", ""}, - {"include/rpc/clnt.h", ""}, - {"include/scsi/scsi.h", ""}, - {"include/scsi/sg.h", ""}, - {"include/scsi/scsi_ioctl.h", ""}, - {"include/netrose/rose.h", ""}, - {"include/nfs/nfs.h", ""}, - {"include/netatalk/at.h", ""}, - {"include/netinet/ether.h", ""}, - {"include/netinet/icmp6.h", ""}, - {"include/netinet/if_ether.h", ""}, - {"include/netinet/if_fddi.h", ""}, - {"include/netinet/if_tr.h", ""}, - {"include/netinet/igmp.h", ""}, - {"include/netinet/in.h", ""}, - {"include/netinet/in_systm.h", ""}, - {"include/netinet/ip.h", ""}, - {"include/netinet/ip6.h", ""}, - {"include/netinet/ip_icmp.h", ""}, - {"include/netinet/tcp.h", ""}, - {"include/netinet/udp.h", ""}, - {"include/netrom/netrom.h", ""}, - {"include/protocols/routed.h", ""}, - {"include/protocols/rwhod.h", ""}, - {"include/protocols/talkd.h", ""}, - {"include/protocols/timed.h", ""}, - {"include/rpcsvc/klm_prot.x", ""}, - {"include/rpcsvc/rstat.h", ""}, - {"include/rpcsvc/spray.x", ""}, - {"include/rpcsvc/nlm_prot.x", ""}, - {"include/rpcsvc/nis_callback.x", ""}, - {"include/rpcsvc/yp.h", ""}, - {"include/rpcsvc/yp.x", ""}, - {"include/rpcsvc/nfs_prot.h", ""}, - {"include/rpcsvc/rex.h", ""}, - {"include/rpcsvc/yppasswd.h", ""}, - {"include/rpcsvc/rex.x", ""}, - {"include/rpcsvc/nis_tags.h", ""}, - {"include/rpcsvc/nis_callback.h", ""}, - {"include/rpcsvc/nfs_prot.x", ""}, - {"include/rpcsvc/bootparam_prot.x", ""}, - {"include/rpcsvc/rusers.x", ""}, - {"include/rpcsvc/rquota.x", ""}, - {"include/rpcsvc/nis.h", ""}, - {"include/rpcsvc/nislib.h", ""}, - {"include/rpcsvc/ypupd.h", ""}, - {"include/rpcsvc/bootparam.h", ""}, - {"include/rpcsvc/spray.h", ""}, - {"include/rpcsvc/key_prot.h", ""}, - {"include/rpcsvc/klm_prot.h", ""}, - {"include/rpcsvc/sm_inter.h", ""}, - {"include/rpcsvc/nlm_prot.h", ""}, - {"include/rpcsvc/yp_prot.h", ""}, - {"include/rpcsvc/ypclnt.h", ""}, - {"include/rpcsvc/rstat.x", ""}, - {"include/rpcsvc/rusers.h", ""}, - {"include/rpcsvc/key_prot.x", ""}, - {"include/rpcsvc/sm_inter.x", ""}, - {"include/rpcsvc/rquota.h", ""}, - {"include/rpcsvc/nis.x", ""}, - {"include/rpcsvc/bootparam_prot.h", ""}, - {"include/rpcsvc/mount.h", ""}, - {"include/rpcsvc/mount.x", ""}, - {"include/rpcsvc/nis_object.x", ""}, - {"include/rpcsvc/yppasswd.x", ""}, - {"sys/acct.h", ""}, - {"sys/auxv.h", ""}, - {"sys/cdefs.h", ""}, - {"sys/debugreg.h", ""}, - {"sys/dir.h", ""}, - {"sys/elf.h", ""}, - {"sys/epoll.h", ""}, - {"sys/eventfd.h", ""}, - {"sys/fanotify.h", ""}, - {"sys/file.h", ""}, - {"sys/fsuid.h", ""}, - {"sys/gmon.h", ""}, - {"sys/gmon_out.h", ""}, - {"sys/inotify.h", ""}, - {"sys/io.h", ""}, - {"sys/ioctl.h", ""}, - {"sys/ipc.h", ""}, - {"sys/kd.h", ""}, - {"sys/kdaemon.h", ""}, - {"sys/klog.h", ""}, - {"sys/mman.h", ""}, - {"sys/mount.h", ""}, - {"sys/msg.h", ""}, - {"sys/mtio.h", ""}, - {"sys/param.h", ""}, - {"sys/pci.h", ""}, - {"sys/perm.h", ""}, - {"sys/personality.h", ""}, - {"sys/poll.h", ""}, - {"sys/prctl.h", ""}, - {"sys/procfs.h", ""}, - {"sys/profil.h", ""}, - {"sys/ptrace.h", ""}, - {"sys/queue.h", ""}, - {"sys/quota.h", ""}, - {"sys/raw.h", ""}, - {"sys/reboot.h", ""}, - {"sys/reg.h", ""}, - {"sys/resource.h", ""}, - {"sys/select.h", ""}, - {"sys/sem.h", ""}, - {"sys/sendfile.h", ""}, - {"sys/shm.h", ""}, - {"sys/signalfd.h", ""}, - {"sys/socket.h", ""}, - {"sys/stat.h", ""}, - {"sys/statfs.h", ""}, - {"sys/statvfs.h", ""}, - {"sys/swap.h", ""}, - {"sys/syscall.h", ""}, - {"sys/sysctl.h", ""}, - {"sys/sysinfo.h", ""}, - {"sys/syslog.h", ""}, - {"sys/sysmacros.h", ""}, - {"sys/termios.h", ""}, - {"sys/time.h", ""}, - {"sys/timeb.h", ""}, - {"sys/timerfd.h", ""}, - {"sys/times.h", ""}, - {"sys/timex.h", ""}, - {"sys/ttychars.h", ""}, - {"sys/ttydefaults.h", ""}, - {"sys/types.h", ""}, - {"sys/ucontext.h", ""}, - {"sys/uio.h", ""}, - {"sys/un.h", ""}, - {"sys/user.h", ""}, - {"sys/ustat.h", ""}, - {"sys/utsname.h", ""}, - {"sys/vlimit.h", ""}, - {"sys/vm86.h", ""}, - {"sys/vtimes.h", ""}, - {"sys/wait.h", ""}, - {"sys/xattr.h", ""}, - {"bits/epoll.h", ""}, - {"bits/eventfd.h", ""}, - {"bits/inotify.h", ""}, - {"bits/ipc.h", ""}, - {"bits/ipctypes.h", ""}, - {"bits/mman-linux.h", ""}, - {"bits/mman.h", ""}, - {"bits/msq.h", ""}, - {"bits/resource.h", ""}, - {"bits/sem.h", ""}, - {"bits/shm.h", ""}, - {"bits/signalfd.h", ""}, - {"bits/statfs.h", ""}, - {"bits/statvfs.h", ""}, - {"bits/timerfd.h", ""}, - {"bits/utsname.h", ""}, - {"bits/auxv.h", ""}, - {"bits/byteswap-16.h", ""}, - {"bits/byteswap.h", ""}, - {"bits/confname.h", ""}, - {"bits/dirent.h", ""}, - {"bits/dlfcn.h", ""}, - {"bits/elfclass.h", ""}, - {"bits/endian.h", ""}, - {"bits/environments.h", ""}, - {"bits/fcntl-linux.h", ""}, - {"bits/fcntl.h", ""}, - {"bits/in.h", ""}, - {"bits/ioctl-types.h", ""}, - {"bits/ioctls.h", ""}, - {"bits/link.h", ""}, - {"bits/mqueue.h", ""}, - {"bits/netdb.h", ""}, - {"bits/param.h", ""}, - {"bits/poll.h", ""}, - {"bits/posix_opt.h", ""}, - {"bits/pthreadtypes.h", ""}, - {"bits/sched.h", ""}, - {"bits/select.h", ""}, - {"bits/semaphore.h", ""}, - {"bits/sigthread.h", ""}, - {"bits/sockaddr.h", ""}, - {"bits/socket.h", ""}, - {"bits/socket_type.h", ""}, - {"bits/stab.def", ""}, - {"bits/stat.h", ""}, - {"bits/stropts.h", ""}, - {"bits/syscall.h", ""}, - {"bits/syslog-path.h", ""}, - {"bits/termios.h", ""}, - {"bits/types.h", ""}, - {"bits/typesizes.h", ""}, - {"bits/uio.h", ""}, - {"bits/ustat.h", ""}, - {"bits/utmp.h", ""}, - {"bits/utmpx.h", ""}, - {"bits/waitflags.h", ""}, - {"bits/waitstatus.h", ""}, - {"bits/xtitypes.h", ""}, + {"include/aio.h$", ""}, + {"include/aliases.h$", ""}, + {"include/alloca.h$", ""}, + {"include/ar.h$", ""}, + {"include/argp.h$", ""}, + {"include/argz.h$", ""}, + {"include/arpa/nameser.h$", ""}, + {"include/arpa/nameser_compat.h$", ""}, + {"include/byteswap.h$", ""}, + {"include/cpio.h$", ""}, + {"include/crypt.h$", ""}, + {"include/dirent.h$", ""}, + {"include/dlfcn.h$", ""}, + {"include/elf.h$", ""}, + {"include/endian.h$", ""}, + {"include/envz.h$", ""}, + {"include/err.h$", ""}, + {"include/error.h$", ""}, + {"include/execinfo.h$", ""}, + {"include/fcntl.h$", ""}, + {"include/features.h$", ""}, + {"include/fenv.h$", ""}, + {"include/fmtmsg.h$", ""}, + {"include/fnmatch.h$", ""}, + {"include/fstab.h$", ""}, + {"include/fts.h$", ""}, + {"include/ftw.h$", ""}, + {"include/gconv.h$", ""}, + {"include/getopt.h$", ""}, + {"include/glob.h$", ""}, + {"include/grp.h$", ""}, + {"include/gshadow.h$", ""}, + {"include/iconv.h$", ""}, + {"include/ifaddrs.h$", ""}, + {"include/kdb.h$", ""}, + {"include/langinfo.h$", ""}, + {"include/libgen.h$", ""}, + {"include/libintl.h$", ""}, + {"include/link.h$", ""}, + {"include/malloc.h$", ""}, + {"include/mcheck.h$", ""}, + {"include/memory.h$", ""}, + {"include/mntent.h$", ""}, + {"include/monetary.h$", ""}, + {"include/mqueue.h$", ""}, + {"include/netdb.h$", ""}, + {"include/netinet/in.h$", ""}, + {"include/nl_types.h$", ""}, + {"include/nss.h$", ""}, + {"include/obstack.h$", ""}, + {"include/panel.h$", ""}, + {"include/paths.h$", ""}, + {"include/printf.h$", ""}, + {"include/profile.h$", ""}, + {"include/pthread.h$", ""}, + {"include/pty.h$", ""}, + {"include/pwd.h$", ""}, + {"include/re_comp.h$", ""}, + {"include/regex.h$", ""}, + {"include/regexp.h$", ""}, + {"include/resolv.h$", ""}, + {"include/rpc/netdb.h$", ""}, + {"include/sched.h$", ""}, + {"include/search.h$", ""}, + {"include/semaphore.h$", ""}, + {"include/sgtty.h$", ""}, + {"include/shadow.h$", ""}, + {"include/spawn.h$", ""}, + {"include/stab.h$", ""}, + {"include/stdc-predef.h$", ""}, + {"include/stdio_ext.h$", ""}, + {"include/strings.h$", ""}, + {"include/stropts.h$", ""}, + {"include/sudo_plugin.h$", ""}, + {"include/sysexits.h$", ""}, + {"include/tar.h$", ""}, + {"include/tcpd.h$", ""}, + {"include/term.h$", ""}, + {"include/term_entry.h$", ""}, + {"include/termcap.h$", ""}, + {"include/termios.h$", ""}, + {"include/thread_db.h$", ""}, + {"include/tic.h$", ""}, + {"include/ttyent.h$", ""}, + {"include/uchar.h$", ""}, + {"include/ucontext.h$", ""}, + {"include/ulimit.h$", ""}, + {"include/unctrl.h$", ""}, + {"include/unistd.h$", ""}, + {"include/utime.h$", ""}, + {"include/utmp.h$", ""}, + {"include/utmpx.h$", ""}, + {"include/values.h$", ""}, + {"include/wordexp.h$", ""}, + {"fpu_control.h$", ""}, + {"ieee754.h$", ""}, + {"include/xlocale.h$", ""}, + {"gnu/lib-names.h$", ""}, + {"gnu/libc-version.h$", ""}, + {"gnu/option-groups.h$", ""}, + {"gnu/stubs-32.h$", ""}, + {"gnu/stubs-64.h$", ""}, + {"gnu/stubs-x32.h$", ""}, + {"include/rpc/auth_des.h$", ""}, + {"include/rpc/rpc_msg.h$", ""}, + {"include/rpc/pmap_clnt.h$", ""}, + {"include/rpc/rpc.h$", ""}, + {"include/rpc/types.h$", ""}, + {"include/rpc/auth_unix.h$", ""}, + {"include/rpc/key_prot.h$", ""}, + {"include/rpc/pmap_prot.h$", ""}, + {"include/rpc/auth.h$", ""}, + {"include/rpc/svc_auth.h$", ""}, + {"include/rpc/xdr.h$", ""}, + {"include/rpc/pmap_rmt.h$", ""}, + {"include/rpc/des_crypt.h$", ""}, + {"include/rpc/svc.h$", ""}, + {"include/rpc/rpc_des.h$", ""}, + {"include/rpc/clnt.h$", ""}, + {"include/scsi/scsi.h$", ""}, + {"include/scsi/sg.h$", ""}, + {"include/scsi/scsi_ioctl.h$", ""}, + {"include/netrose/rose.h$", ""}, + {"include/nfs/nfs.h$", ""}, + {"include/netatalk/at.h$", ""}, + {"include/netinet/ether.h$", ""}, + {"include/netinet/icmp6.h$", ""}, + {"include/netinet/if_ether.h$", ""}, + {"include/netinet/if_fddi.h$", ""}, + {"include/netinet/if_tr.h$", ""}, + {"include/netinet/igmp.h$", ""}, + {"include/netinet/in.h$", ""}, + {"include/netinet/in_systm.h$", ""}, + {"include/netinet/ip.h$", ""}, + {"include/netinet/ip6.h$", ""}, + {"include/netinet/ip_icmp.h$", ""}, + {"include/netinet/tcp.h$", ""}, + {"include/netinet/udp.h$", ""}, + {"include/netrom/netrom.h$", ""}, + {"include/protocols/routed.h$", ""}, + {"include/protocols/rwhod.h$", ""}, + {"include/protocols/talkd.h$", ""}, + {"include/protocols/timed.h$", ""}, + {"include/rpcsvc/klm_prot.x$", ""}, + {"include/rpcsvc/rstat.h$", ""}, + {"include/rpcsvc/spray.x$", ""}, + {"include/rpcsvc/nlm_prot.x$", ""}, + {"include/rpcsvc/nis_callback.x$", ""}, + {"include/rpcsvc/yp.h$", ""}, + {"include/rpcsvc/yp.x$", ""}, + {"include/rpcsvc/nfs_prot.h$", ""}, + {"include/rpcsvc/rex.h$", ""}, + {"include/rpcsvc/yppasswd.h$", ""}, + {"include/rpcsvc/rex.x$", ""}, + {"include/rpcsvc/nis_tags.h$", ""}, + {"include/rpcsvc/nis_callback.h$", ""}, + {"include/rpcsvc/nfs_prot.x$", ""}, + {"include/rpcsvc/bootparam_prot.x$", ""}, + {"include/rpcsvc/rusers.x$", ""}, + {"include/rpcsvc/rquota.x$", ""}, + {"include/rpcsvc/nis.h$", ""}, + {"include/rpcsvc/nislib.h$", ""}, + {"include/rpcsvc/ypupd.h$", ""}, + {"include/rpcsvc/bootparam.h$", ""}, + {"include/rpcsvc/spray.h$", ""}, + {"include/rpcsvc/key_prot.h$", ""}, + {"include/rpcsvc/klm_prot.h$", ""}, + {"include/rpcsvc/sm_inter.h$", ""}, + {"include/rpcsvc/nlm_prot.h$", ""}, + {"include/rpcsvc/yp_prot.h$", ""}, + {"include/rpcsvc/ypclnt.h$", ""}, + {"include/rpcsvc/rstat.x$", ""}, + {"include/rpcsvc/rusers.h$", ""}, + {"include/rpcsvc/key_prot.x$", ""}, + {"include/rpcsvc/sm_inter.x$", ""}, + {"include/rpcsvc/rquota.h$", ""}, + {"include/rpcsvc/nis.x$", ""}, + {"include/rpcsvc/bootparam_prot.h$", ""}, + {"include/rpcsvc/mount.h$", ""}, + {"include/rpcsvc/mount.x$", ""}, + {"include/rpcsvc/nis_object.x$", ""}, + {"include/rpcsvc/yppasswd.x$", ""}, + {"sys/acct.h$", ""}, + {"sys/auxv.h$", ""}, + {"sys/cdefs.h$", ""}, + {"sys/debugreg.h$", ""}, + {"sys/dir.h$", ""}, + {"sys/elf.h$", ""}, + {"sys/epoll.h$", ""}, + {"sys/eventfd.h$", ""}, + {"sys/fanotify.h$", ""}, + {"sys/file.h$", ""}, + {"sys/fsuid.h$", ""}, + {"sys/gmon.h$", ""}, + {"sys/gmon_out.h$", ""}, + {"sys/inotify.h$", ""}, + {"sys/io.h$", ""}, + {"sys/ioctl.h$", ""}, + {"sys/ipc.h$", ""}, + {"sys/kd.h$", ""}, + {"sys/kdaemon.h$", ""}, + {"sys/klog.h$", ""}, + {"sys/mman.h$", ""}, + {"sys/mount.h$", ""}, + {"sys/msg.h$", ""}, + {"sys/mtio.h$", ""}, + {"sys/param.h$", ""}, + {"sys/pci.h$", ""}, + {"sys/perm.h$", ""}, + {"sys/personality.h$", ""}, + {"sys/poll.h$", ""}, + {"sys/prctl.h$", ""}, + {"sys/procfs.h$", ""}, + {"sys/profil.h$", ""}, + {"sys/ptrace.h$", ""}, + {"sys/queue.h$", ""}, + {"sys/quota.h$", ""}, + {"sys/raw.h$", ""}, + {"sys/reboot.h$", ""}, + {"sys/reg.h$", ""}, + {"sys/resource.h$", ""}, + {"sys/select.h$", ""}, + {"sys/sem.h$", ""}, + {"sys/sendfile.h$", ""}, + {"sys/shm.h$", ""}, + {"sys/signalfd.h$", ""}, + {"sys/socket.h$", ""}, + {"sys/stat.h$", ""}, + {"sys/statfs.h$", ""}, + {"sys/statvfs.h$", ""}, + {"sys/swap.h$", ""}, + {"sys/syscall.h$", ""}, + {"sys/sysctl.h$", ""}, + {"sys/sysinfo.h$", ""}, + {"sys/syslog.h$", ""}, + {"sys/sysmacros.h$", ""}, + {"sys/termios.h$", ""}, + {"sys/time.h$", ""}, + {"sys/timeb.h$", ""}, + {"sys/timerfd.h$", ""}, + {"sys/times.h$", ""}, + {"sys/timex.h$", ""}, + {"sys/ttychars.h$", ""}, + {"sys/ttydefaults.h$", ""}, + {"sys/types.h$", ""}, + {"sys/ucontext.h$", ""}, + {"sys/uio.h$", ""}, + {"sys/un.h$", ""}, + {"sys/user.h$", ""}, + {"sys/ustat.h$", ""}, + {"sys/utsname.h$", ""}, + {"sys/vlimit.h$", ""}, + {"sys/vm86.h$", ""}, + {"sys/vtimes.h$", ""}, + {"sys/wait.h$", ""}, + {"sys/xattr.h$", ""}, + {"bits/epoll.h$", ""}, + {"bits/eventfd.h$", ""}, + {"bits/inotify.h$", ""}, + {"bits/ipc.h$", ""}, + {"bits/ipctypes.h$", ""}, + {"bits/mman-linux.h$", ""}, + {"bits/mman.h$", ""}, + {"bits/msq.h$", ""}, + {"bits/resource.h$", ""}, + {"bits/sem.h$", ""}, + {"bits/shm.h$", ""}, + {"bits/signalfd.h$", ""}, + {"bits/statfs.h$", ""}, + {"bits/statvfs.h$", ""}, + {"bits/timerfd.h$", ""}, + {"bits/utsname.h$", ""}, + {"bits/auxv.h$", ""}, + {"bits/byteswap-16.h$", ""}, + {"bits/byteswap.h$", ""}, + {"bits/confname.h$", ""}, + {"bits/dirent.h$", ""}, + {"bits/dlfcn.h$", ""}, + {"bits/elfclass.h$", ""}, + {"bits/endian.h$", ""}, + {"bits/environments.h$", ""}, + {"bits/fcntl-linux.h$", ""}, + {"bits/fcntl.h$", ""}, + {"bits/in.h$", ""}, + {"bits/ioctl-types.h$", ""}, + {"bits/ioctls.h$", ""}, + {"bits/link.h$", ""}, + {"bits/mqueue.h$", ""}, + {"bits/netdb.h$", ""}, + {"bits/param.h$", ""}, + {"bits/poll.h$", ""}, + {"bits/posix_opt.h$", ""}, + {"bits/pthreadtypes.h$", ""}, + {"bits/sched.h$", ""}, + {"bits/select.h$", ""}, + {"bits/semaphore.h$", ""}, + {"bits/sigthread.h$", ""}, + {"bits/sockaddr.h$", ""}, + {"bits/socket.h$", ""}, + {"bits/socket_type.h$", ""}, + {"bits/stab.def$", ""}, + {"bits/stat.h$", ""}, + {"bits/stropts.h$", ""}, + {"bits/syscall.h$", ""}, + {"bits/syslog-path.h$", ""}, + {"bits/termios.h$", ""}, + {"bits/types.h$", ""}, + {"bits/typesizes.h$", ""}, + {"bits/uio.h$", ""}, + {"bits/ustat.h$", ""}, + {"bits/utmp.h$", ""}, + {"bits/utmpx.h$", ""}, + {"bits/waitflags.h$", ""}, + {"bits/waitstatus.h$", ""}, + {"bits/xtitypes.h$", ""}, }; return &STLPostfixHeaderMap; } Index: unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp =================================================================== --- unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp +++ unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp @@ -66,15 +66,15 @@ std::string FileName = "symbol.cc"; - const std::string InternalHeader = "internal/internal.h"; + const std::string InternalHeader = "internal/internal_header.h"; const std::string TopHeader = ""; // Test .inc header path. The header for `IncHeaderClass` should be // internal.h, which will eventually be mapped to . std::string IncHeader = "internal/private.inc"; std::string IncHeaderCode = "class IncHeaderClass {};"; - HeaderMapCollector::HeaderMap PostfixMap = { - {"internal.h", TopHeader}, + HeaderMapCollector::RegexHeaderMap RegexMap = { + {R"(internal_.*\.h$)", TopHeader}, }; std::string InternalCode = @@ -89,7 +89,7 @@ llvm::MemoryBuffer::getMemBuffer(InternalCode)); std::unique_ptr Factory( - new FindAllSymbolsActionFactory(&Reporter, &PostfixMap)); + new FindAllSymbolsActionFactory(&Reporter, &RegexMap)); tooling::ToolInvocation Invocation( {std::string("find_all_symbols"), std::string("-fsyntax-only"), @@ -102,7 +102,8 @@ std::string Content = "#include\"" + std::string(HeaderName) + "\"\n" - "#include \"internal/internal.h\""; + "#include \"" + + InternalHeader + "\""; #if !defined(_MSC_VER) && !defined(__MINGW32__) // Test path cleaning for both decls and macros. const std::string DirtyHeader = "./internal/./a/b.h";