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/RecordInfo.h

Issue 2060553002: GC plugin: improve error reporting when tracing illegal fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: robustify namespace equality checking instead 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
« 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 39c13f01c6dd9dca7134df1787854fd8b7e27a41..e672282f4f00f365cd8a95473e9dad459ef69b23 100644
--- a/tools/clang/blink_gc_plugin/RecordInfo.h
+++ b/tools/clang/blink_gc_plugin/RecordInfo.h
@@ -16,6 +16,7 @@
#include "clang/AST/AST.h"
#include "clang/AST/CXXInheritance.h"
+#include "clang/Frontend/CompilerInstance.h"
class RecordCache;
@@ -26,6 +27,7 @@ class GraphPoint {
virtual ~GraphPoint() {}
void MarkTraced() { traced_ = true; }
bool IsProperlyTraced() { return traced_ || !NeedsTracing().IsNeeded(); }
+ bool IsInproperlyTraced() { return traced_ && NeedsTracing().IsIllegal(); }
virtual const TracingStatus NeedsTracing() = 0;
private:
@@ -158,6 +160,11 @@ class RecordInfo {
class RecordCache {
public:
+ RecordCache(clang::CompilerInstance& instance)
+ : instance_(instance)
+ {
+ }
+
RecordInfo* Lookup(clang::CXXRecordDecl* record);
RecordInfo* Lookup(const clang::CXXRecordDecl* record) {
@@ -188,7 +195,11 @@ class RecordCache {
}
}
+ clang::CompilerInstance& instance() const { return instance_; }
+
private:
+ clang::CompilerInstance& instance_;
+
typedef std::map<clang::CXXRecordDecl*, RecordInfo> Cache;
Cache cache_;
};
« 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