Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Unified Diff: tools/clang/plugins/ChromeClassTester.h

Issue 1117163002: Clang style plugin: add warn-only option and use it on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/clang/plugins/ChromeClassTester.h
diff --git a/tools/clang/plugins/ChromeClassTester.h b/tools/clang/plugins/ChromeClassTester.h
index ed65050d499d76424af42a19877829e5598f2cd9..6b5cdf3577ea3a71d85f87b0995a1af406e94a00 100644
--- a/tools/clang/plugins/ChromeClassTester.h
+++ b/tools/clang/plugins/ChromeClassTester.h
@@ -8,6 +8,7 @@
#include <set>
#include <vector>
+#include "Options.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/TypeLoc.h"
#include "clang/Frontend/CompilerInstance.h"
@@ -16,7 +17,8 @@
// headers to subclasses which implement CheckChromeClass().
class ChromeClassTester : public clang::ASTConsumer {
public:
- explicit ChromeClassTester(clang::CompilerInstance& instance);
+ ChromeClassTester(clang::CompilerInstance& instance,
+ const chrome_checker::Options& options);
virtual ~ChromeClassTester();
// clang::ASTConsumer:
@@ -25,6 +27,8 @@ class ChromeClassTester : public clang::ASTConsumer {
void CheckTag(clang::TagDecl*);
+ clang::DiagnosticsEngine::Level getErrorLevel();
+
protected:
clang::CompilerInstance& instance() { return instance_; }
clang::DiagnosticsEngine& diagnostic() { return diagnostic_; }
@@ -50,6 +54,9 @@ class ChromeClassTester : public clang::ASTConsumer {
// implementation (.cc, .cpp, .mm) file.
bool InImplementationFile(clang::SourceLocation location);
+ // Options.
+ const chrome_checker::Options options_;
+
private:
void BuildBannedLists();

Powered by Google App Engine
This is Rietveld 408576698