@@ -93,7 +93,7 @@ Configuration files:
9393 WarningsAsErrors: ''
9494 HeaderFileExtensions: ['', 'h','hh','hpp','hxx']
9595 ImplementationFileExtensions: ['c','cc','cpp','cxx']
96- HeaderFilterRegex: ''
96+ HeaderFilterRegex: '.* '
9797 FormatStyle: none
9898 InheritParentConfig: true
9999 User: user
@@ -132,14 +132,16 @@ file, if any.
132132
133133static cl::opt<std::string> HeaderFilter (" header-filter" , desc(R"(
134134Regular expression matching the names of the
135- headers to output diagnostics from. Diagnostics
135+ headers to output diagnostics from. The default
136+ value is '.*', i.e. diagnostics from all non-system
137+ headers are displayed by default. Diagnostics
136138from the main file of each translation unit are
137139always displayed.
138140Can be used together with -line-filter.
139141This option overrides the 'HeaderFilterRegex'
140142option in .clang-tidy file, if any.
141143)" ),
142- cl::init(" " ),
144+ cl::init(" .* " ),
143145 cl::cat(ClangTidyCategory));
144146
145147static cl::opt<std::string> ExcludeHeaderFilter (" exclude-header-filter" ,
@@ -379,9 +381,9 @@ static void printStats(const ClangTidyStats &Stats) {
379381 << " with check filters" ;
380382 llvm::errs () << " ).\n " ;
381383 if (Stats.ErrorsIgnoredNonUserCode )
382- llvm::errs () << " Use -header-filter=.* to display errors from all "
383- " non-system headers. Use -system-headers to display "
384- " errors from system headers as well.\n " ;
384+ llvm::errs () << " Use -header-filter=.* or leave it as default to display "
385+ " errors from all non-system headers. Use -system-headers "
386+ " to display errors from system headers as well.\n " ;
385387 }
386388}
387389
0 commit comments