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

Unified Diff: tools/clang/plugins/FindBadConstructsAction.cpp

Issue 1665363002: Clang plugin to check that unstable types are not used in IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Blacklist types instead Created 4 years, 10 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/FindBadConstructsAction.cpp
diff --git a/tools/clang/plugins/FindBadConstructsAction.cpp b/tools/clang/plugins/FindBadConstructsAction.cpp
index 67622970519689886fafe0a9e4acdf95179b252f..1c0316941f1180eec42943e2aafbf4ebd1a3db4a 100644
--- a/tools/clang/plugins/FindBadConstructsAction.cpp
+++ b/tools/clang/plugins/FindBadConstructsAction.cpp
@@ -22,6 +22,9 @@ class PluginConsumer : public ASTConsumer {
void HandleTranslationUnit(clang::ASTContext& context) override {
visitor_.TraverseDecl(context.getTranslationUnitDecl());
+ if (auto checker = visitor_.ipc_checker()) {
+ checker->Visit(context);
+ }
}
private:
@@ -63,6 +66,8 @@ bool FindBadConstructsAction::ParseArgs(const CompilerInstance& instance,
options_.check_templates = true;
} else if (args[i] == "follow-macro-expansion") {
options_.follow_macro_expansion = true;
+ } else if (args[i] == "check-ipc") {
+ options_.check_ipc = true;
} else {
parsed = false;
llvm::errs() << "Unknown clang plugin argument: " << args[i] << "\n";

Powered by Google App Engine
This is Rietveld 408576698