jroelofs created this revision. jroelofs added reviewers: njames93, aaron.ballman. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang.
https://reviews.llvm.org/D74669#inline-685657 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75621 Files: clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.cpp clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.h clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.h clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.cpp clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.h clang-tools-extra/clang-tidy/llvm/HeaderGuardCheck.h clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.cpp clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.h clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h clang-tools-extra/clang-tidy/utils/HeaderGuard.h
Index: clang-tools-extra/clang-tidy/utils/HeaderGuard.h =================================================================== --- clang-tools-extra/clang-tidy/utils/HeaderGuard.h +++ clang-tools-extra/clang-tidy/utils/HeaderGuard.h @@ -18,11 +18,12 @@ /// Finds and fixes header guards. /// The check supports these options: -/// - `HeaderFileExtensions`: a comma-separated list of filename extensions of -/// header files (The filename extension should not contain "." prefix). -/// ",h,hh,hpp,hxx" by default. +/// - `HeaderFileExtensions`: a semicolon-separated list of filename +/// extensions of header files (The filename extension should not contain +/// "." prefix). ";h;hh;hpp;hxx" by default. +/// /// For extension-less header files, using an empty string or leaving an -/// empty string between "," if there are other filename extensions. +/// empty string between ";" if there are other filename extensions. class HeaderGuardCheck : public ClangTidyCheck { public: HeaderGuardCheck(StringRef Name, ClangTidyContext *Context) @@ -30,7 +31,7 @@ RawStringHeaderFileExtensions(Options.getLocalOrGlobal( "HeaderFileExtensions", utils::defaultHeaderFileExtensions())) { utils::parseFileExtensions(RawStringHeaderFileExtensions, - HeaderFileExtensions, ','); + HeaderFileExtensions, ';'); } void registerPPCallbacks(const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) override; Index: clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h =================================================================== --- clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h +++ clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h @@ -34,7 +34,7 @@ /// Returns recommended default value for the list of header file /// extensions. -inline StringRef defaultHeaderFileExtensions() { return ",h,hh,hpp,hxx"; } +inline StringRef defaultHeaderFileExtensions() { return ";h;hh;hpp;hxx"; } /// Parses header file extensions from a semicolon-separated list. bool parseFileExtensions(StringRef AllFileExtensions, Index: clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.h =================================================================== --- clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.h +++ clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.h @@ -22,11 +22,12 @@ /// The check supports these options: /// - `UseHeaderFileExtension`: Whether to use file extension to distinguish /// header files. True by default. -/// - `HeaderFileExtensions`: a comma-separated list of filename extensions of -/// header files (The filename extension should not contain "." prefix). -/// ",h,hh,hpp,hxx" by default. +/// - `HeaderFileExtensions`: a semicolon-separated list of filename +/// extensions of header files (The filename extension should not contain +/// "." prefix). ";h;hh;hpp;hxx" by default. +/// /// For extension-less header files, using an empty string or leaving an -/// empty string between "," if there are other filename extensions. +/// empty string between ";" if there are other filename extensions. /// /// For the user-facing documentation see: /// http://clang.llvm.org/extra/clang-tidy/checks/misc-definitions-in-headers.html Index: clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.cpp +++ clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.cpp @@ -34,7 +34,7 @@ RawStringHeaderFileExtensions(Options.getLocalOrGlobal( "HeaderFileExtensions", utils::defaultHeaderFileExtensions())) { if (!utils::parseFileExtensions(RawStringHeaderFileExtensions, - HeaderFileExtensions, ',')) { + HeaderFileExtensions, ';')) { // FIXME: Find a more suitable way to handle invalid configuration // options. llvm::errs() << "Invalid header file extension: " Index: clang-tools-extra/clang-tidy/llvm/HeaderGuardCheck.h =================================================================== --- clang-tools-extra/clang-tidy/llvm/HeaderGuardCheck.h +++ clang-tools-extra/clang-tidy/llvm/HeaderGuardCheck.h @@ -19,11 +19,12 @@ /// For the user-facing documentation see: /// http://clang.llvm.org/extra/clang-tidy/checks/llvm-header-guard.html /// The check supports these options: -/// - `HeaderFileExtensions`: a comma-separated list of filename extensions of -/// header files (The filename extension should not contain "." prefix). -/// ",h,hh,hpp,hxx" by default. +/// - `HeaderFileExtensions`: a semicolon-separated list of filename +/// extensions of header files (The filename extension should not contain +/// "." prefix). ";h;hh;hpp;hxx" by default. +/// /// For extension-less header files, using an empty string or leaving an -/// empty string between "," if there are other filename extensions. +/// empty string between ";" if there are other filename extensions. class LLVMHeaderGuardCheck : public utils::HeaderGuardCheck { public: LLVMHeaderGuardCheck(StringRef Name, ClangTidyContext *Context); Index: clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.h =================================================================== --- clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.h +++ clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.h @@ -20,11 +20,12 @@ /// Finds anonymous namespaces in headers. /// /// The check supports these options: -/// - `HeaderFileExtensions`: a comma-separated list of filename extensions of -/// header files (The filename extensions should not contain "." prefix). -/// "h,hh,hpp,hxx" by default. +/// - `HeaderFileExtensions`: a semicolon-separated list of filename +/// extensions of header files (The filename extensions should not contain +/// "." prefix). "h;hh;hpp;hxx" by default. +/// /// For extension-less header files, using an empty string or leaving an -/// empty string between "," if there are other filename extensions. +/// empty string between ";" if there are other filename extensions. /// /// https://google.github.io/styleguide/cppguide.html#Namespaces /// Index: clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.cpp +++ clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.cpp @@ -24,7 +24,7 @@ RawStringHeaderFileExtensions(Options.getLocalOrGlobal( "HeaderFileExtensions", utils::defaultHeaderFileExtensions())) { if (!utils::parseFileExtensions(RawStringHeaderFileExtensions, - HeaderFileExtensions, ',')) { + HeaderFileExtensions, ';')) { llvm::errs() << "Invalid header file extension: " << RawStringHeaderFileExtensions << "\n"; } Index: clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.h =================================================================== --- clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.h +++ clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.h @@ -21,11 +21,12 @@ /// Right now it only triggers on using declarations and directives. /// /// The check supports these options: -/// - `HeaderFileExtensions`: a comma-separated list of filename extensions -/// of header files (the filename extensions should not contain "." prefix). -/// "h" by default. +/// - `HeaderFileExtensions`: a semicolon-separated list of filename +/// extensions of header files (the filename extensions should not contain +/// "." prefix). ";h;hh;hpp;hxx" by default. +/// /// For extension-less header files, using an empty string or leaving an -/// empty string between "," if there are other filename extensions. +/// empty string between ";" if there are other filename extensions. class GlobalNamesInHeadersCheck : public ClangTidyCheck { public: GlobalNamesInHeadersCheck(StringRef Name, ClangTidyContext *Context); Index: clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp +++ clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp @@ -25,7 +25,7 @@ RawStringHeaderFileExtensions(Options.getLocalOrGlobal( "HeaderFileExtensions", utils::defaultHeaderFileExtensions())) { if (!utils::parseFileExtensions(RawStringHeaderFileExtensions, - HeaderFileExtensions, ',')) { + HeaderFileExtensions, ';')) { llvm::errs() << "Invalid header file extension: " << RawStringHeaderFileExtensions << "\n"; } Index: clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.h =================================================================== --- clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.h +++ clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.h @@ -19,11 +19,12 @@ /// Finds dynamically initialized static variables in header files. /// /// The check supports these options: -/// - `HeaderFileExtensions`: a comma-separated list of filename extensions of -/// header files (The filename extensions should not contain "." prefix). -/// "h,hh,hpp,hxx" by default. +/// - `HeaderFileExtensions`: a semicolon-separated list of filename +/// extensions of header files (The filename extensions should not contain +/// "." prefix). "h;hh;hpp;hxx" by default. +// /// For extension-less header files, using an empty string or leaving an -/// empty string between "," if there are other filename extensions. +/// empty string between ";" if there are other filename extensions. class DynamicStaticInitializersCheck : public ClangTidyCheck { public: DynamicStaticInitializersCheck(StringRef Name, ClangTidyContext *Context); Index: clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.cpp +++ clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.cpp @@ -32,7 +32,7 @@ RawStringHeaderFileExtensions(Options.getLocalOrGlobal( "HeaderFileExtensions", utils::defaultHeaderFileExtensions())) { if (!utils::parseFileExtensions(RawStringHeaderFileExtensions, - HeaderFileExtensions, ',')) { + HeaderFileExtensions, ';')) { llvm::errs() << "Invalid header file extension: " << RawStringHeaderFileExtensions << "\n"; }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits