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

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

Issue 192933002: Check that classes with non-trivial destructors have finalization support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 6 years, 9 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/Edge.cpp ('k') | tools/clang/blink_gc_plugin/RecordInfo.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/blink_gc_plugin/RecordInfo.h
diff --git a/tools/clang/blink_gc_plugin/RecordInfo.h b/tools/clang/blink_gc_plugin/RecordInfo.h
index a27f81023e68efbe9a6d265bd36bbea467ae4696..d8a53975699bd40ac2d9601a8e214d8d3d17e397 100644
--- a/tools/clang/blink_gc_plugin/RecordInfo.h
+++ b/tools/clang/blink_gc_plugin/RecordInfo.h
@@ -32,13 +32,17 @@ class GraphPoint {
class BasePoint : public GraphPoint {
public:
- BasePoint(RecordInfo* info, const TracingStatus& status)
- : info_(info), status_(status) {}
- RecordInfo* info() { return info_; }
+ BasePoint(const clang::CXXBaseSpecifier& spec,
+ RecordInfo* info,
+ const TracingStatus& status)
+ : spec_(spec), info_(info), status_(status) {}
const TracingStatus NeedsTracing() { return status_; }
// Needed to change the status of bases with a pure-virtual trace.
void MarkUnneeded() { status_ = TracingStatus::Unneeded(); }
+ const clang::CXXBaseSpecifier& spec() { return spec_; }
+ RecordInfo* info() { return info_; }
private:
+ const clang::CXXBaseSpecifier& spec_;
RecordInfo* info_;
TracingStatus status_;
};
@@ -82,9 +86,11 @@ class RecordInfo {
bool IsGCDerived();
bool IsGCAllocated();
bool IsGCFinalized();
+ bool IsUnmixedGCMixin();
bool IsStackAllocated();
bool RequiresTraceMethod();
+ bool NeedsFinalization();
TracingStatus NeedsTracing(Edge::NeedsTracingOption);
private:
@@ -134,6 +140,14 @@ class RecordCache {
return Lookup(clang::dyn_cast<clang::CXXRecordDecl>(decl));
}
+ RecordInfo* Lookup(const clang::Type* type) {
+ return Lookup(type->getAsCXXRecordDecl());
+ }
+
+ RecordInfo* Lookup(const clang::QualType& type) {
+ return Lookup(type.getTypePtr());
+ }
+
~RecordCache() {
for (Cache::iterator it = cache_.begin(); it != cache_.end(); ++it) {
if (!it->second.fields_)
« no previous file with comments | « tools/clang/blink_gc_plugin/Edge.cpp ('k') | tools/clang/blink_gc_plugin/RecordInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698