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

Unified Diff: tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp

Issue 641353002: Blink GC plugin: Don't check conditions on invalid compilation units. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | tools/clang/blink_gc_plugin/tests/crash_on_invalid.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
diff --git a/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp b/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
index 8658b04304f32cba63509a9a7fd97df2ba63f1d3..59cd41735a6e6572b6c56552e310a93b20e05a8e 100644
--- a/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
+++ b/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
@@ -861,6 +861,10 @@ class BlinkGCPluginConsumer : public ASTConsumer {
}
void HandleTranslationUnit(ASTContext& context) override {
+ // Don't run the plugin if the compilation unit is already invalid.
+ if (diagnostic_.hasErrorOccurred())
+ return;
+
CollectVisitor visitor;
visitor.TraverseDecl(context.getTranslationUnitDecl());
« no previous file with comments | « no previous file | tools/clang/blink_gc_plugin/tests/crash_on_invalid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698