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

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

Issue 2060553002: GC plugin: improve error reporting when tracing illegal fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/blink_gc_plugin/BlinkGCPluginConsumer.cpp
diff --git a/tools/clang/blink_gc_plugin/BlinkGCPluginConsumer.cpp b/tools/clang/blink_gc_plugin/BlinkGCPluginConsumer.cpp
index 1a32defcc42698ae7c32cf92dc3264dcc9c7d66e..d90c121608e97c2f8409d2ea3a5446a1ba3f5f07 100644
--- a/tools/clang/blink_gc_plugin/BlinkGCPluginConsumer.cpp
+++ b/tools/clang/blink_gc_plugin/BlinkGCPluginConsumer.cpp
@@ -552,9 +552,10 @@ void BlinkGCPluginConsumer::CheckTraceMethod(
reporter_.BaseRequiresTracing(parent, trace, base.first);
for (auto& field : parent->GetFields()) {
- if (!field.second.IsProperlyTraced()) {
- // Discontinue once an untraced-field error is found.
- reporter_.FieldsRequireTracing(parent, trace);
+ if (!field.second.IsProperlyTraced() ||
+ field.second.IsInproperlyTraced()) {
+ // Report one or more tracing-related field errors.
+ reporter_.FieldsImproperlyTraced(parent, trace);
break;
}
}
@@ -590,6 +591,7 @@ void BlinkGCPluginConsumer::DumpClass(RecordInfo* info) {
"reference" : "raw") :
Parent()->IsRefPtr() ? "ref" :
Parent()->IsOwnPtr() ? "own" :
+ Parent()->IsUniquePtr() ? "unique" :
(Parent()->IsMember() || Parent()->IsWeakMember()) ? "mem" :
"val");
json_->CloseObject();
« no previous file with comments | « no previous file | tools/clang/blink_gc_plugin/CheckFieldsVisitor.h » ('j') | tools/clang/blink_gc_plugin/RecordInfo.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698