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

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

Issue 1504013004: GC plugin: remove mixin trace override restriction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « tools/clang/blink_gc_plugin/BlinkGCPluginConsumer.h ('k') | tools/clang/blink_gc_plugin/RecordInfo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5c1605bd6368271a7c7c5be53c138cdc409afaef..c90510e93d76fc67c8c98b886e7981f8bf61c4c0 100644
--- a/tools/clang/blink_gc_plugin/BlinkGCPluginConsumer.cpp
+++ b/tools/clang/blink_gc_plugin/BlinkGCPluginConsumer.cpp
@@ -149,10 +149,6 @@ const char kBaseClassMustDeclareVirtualTrace[] =
"[blink-gc] Left-most base class %0 of derived class %1"
" must define a virtual trace method.";
-const char kClassMustDeclareGCMixinTraceMethod[] =
- "[blink-gc] Class %0 which inherits from GarbageCollectedMixin must"
- " locally declare and override trace(Visitor*)";
-
// Use a local RAV implementation to simply collect all FunctionDecls marked for
// late template parsing. This happens with the flag -fdelayed-template-parsing,
// which is on by default in MSVC-compatible mode.
@@ -251,9 +247,6 @@ BlinkGCPluginConsumer::BlinkGCPluginConsumer(
getErrorLevel(), kLeftMostBaseMustBePolymorphic);
diag_base_class_must_declare_virtual_trace_ = diagnostic_.getCustomDiagID(
getErrorLevel(), kBaseClassMustDeclareVirtualTrace);
- diag_class_must_declare_gc_mixin_trace_method_ =
- diagnostic_.getCustomDiagID(getErrorLevel(),
- kClassMustDeclareGCMixinTraceMethod);
// Register note messages.
diag_base_requires_tracing_note_ = diagnostic_.getCustomDiagID(
@@ -444,13 +437,6 @@ void BlinkGCPluginConsumer::CheckClass(RecordInfo* info) {
if (CXXMethodDecl* newop = info->DeclaresNewOperator())
if (!Config::IsIgnoreAnnotated(newop))
ReportClassOverridesNew(info, newop);
- if (info->IsGCMixinInstance()) {
- // Require that declared GCMixin implementations
- // also provide a trace() override.
- if (info->DeclaresGCMixinMethods()
- && !info->DeclaresLocalTraceMethod())
- ReportClassMustDeclareGCMixinTraceMethod(info);
- }
}
{
@@ -1117,13 +1103,6 @@ void BlinkGCPluginConsumer::ReportClassDoesNotRequireFinalization(
<< info->record();
}
-void BlinkGCPluginConsumer::ReportClassMustDeclareGCMixinTraceMethod(
- RecordInfo* info) {
- ReportDiagnostic(info->record()->getInnerLocStart(),
- diag_class_must_declare_gc_mixin_trace_method_)
- << info->record();
-}
-
void BlinkGCPluginConsumer::ReportOverriddenNonVirtualTrace(
RecordInfo* info,
CXXMethodDecl* trace,
« no previous file with comments | « tools/clang/blink_gc_plugin/BlinkGCPluginConsumer.h ('k') | tools/clang/blink_gc_plugin/RecordInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698