[PATCH] [clang-tidy] Add a generic header guard checker + LLVM implementation.
Manuel Klimek
klimek at google.com
Wed Aug 13 04:37:54 PDT 2014
I still doubt we have enough tests. Otherwise LG.
================
Comment at: clang-tidy/utils/HeaderGuard.cpp:173
@@ +172,3 @@
+ /// \brief Looks for files that were visited but didn't have a header guard.
+ /// emits a warning with fixits suggesting adding one.
+ void checkGuardlessHeaders() {
----------------
s/emits/Emits/
================
Comment at: clang-tidy/utils/HeaderGuard.h:30-32
@@ +29,5 @@
+ virtual bool shouldFixHeaderGuard(StringRef Filename);
+ /// \brief Returns true if the checker should add a header guard to the file
+ /// if
+ /// it has none.
+ virtual bool shouldSuggestToAddHeaderGuard(StringRef Filename);
----------------
:gq
http://reviews.llvm.org/D4867
More information about the cfe-commits
mailing list