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

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

Issue 278513005: Blink GC plugin: disallow pure-virtual trace methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove pure related code Created 6 years, 7 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 | « tools/clang/blink_gc_plugin/RecordInfo.h ('k') | tools/clang/blink_gc_plugin/tests/pure_virtual_trace.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/blink_gc_plugin/RecordInfo.cpp
diff --git a/tools/clang/blink_gc_plugin/RecordInfo.cpp b/tools/clang/blink_gc_plugin/RecordInfo.cpp
index 7378077e5da6af34b2036f32d8ae6b3908e0669c..a7c9a756bfaa057da957be5e6193095121bca440 100644
--- a/tools/clang/blink_gc_plugin/RecordInfo.cpp
+++ b/tools/clang/blink_gc_plugin/RecordInfo.cpp
@@ -272,11 +272,11 @@ RecordInfo::Bases& RecordInfo::GetBases() {
return *bases_;
}
-bool RecordInfo::InheritsNonPureTrace() {
- if (CXXMethodDecl* trace = GetTraceMethod())
- return !trace->isPure();
+bool RecordInfo::InheritsTrace() {
+ if (GetTraceMethod())
+ return true;
for (Bases::iterator it = GetBases().begin(); it != GetBases().end(); ++it) {
- if (it->second.info()->InheritsNonPureTrace())
+ if (it->second.info()->InheritsTrace())
return true;
}
return false;
@@ -323,7 +323,7 @@ RecordInfo::Bases* RecordInfo::CollectBases() {
if (!info)
continue;
CXXRecordDecl* base = info->record();
- TracingStatus status = info->InheritsNonPureTrace()
+ TracingStatus status = info->InheritsTrace()
? TracingStatus::Needed()
: TracingStatus::Unneeded();
bases->insert(std::make_pair(base, BasePoint(spec, info, status)));
« no previous file with comments | « tools/clang/blink_gc_plugin/RecordInfo.h ('k') | tools/clang/blink_gc_plugin/tests/pure_virtual_trace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698