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

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

Issue 1274403002: GC plugin: consider references equal to raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Propagate reference type into error/warning messages Created 5 years, 4 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.h ('k') | tools/clang/blink_gc_plugin/tests/raw_ptr_to_gc_managed_class.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 3749594333c114bfa4a1895840a0712b10a9d813..516a40a04daec50f420e1262ef2cff2d4a349202 100644
--- a/tools/clang/blink_gc_plugin/RecordInfo.cpp
+++ b/tools/clang/blink_gc_plugin/RecordInfo.cpp
@@ -592,9 +592,9 @@ Edge* RecordInfo::CreateEdge(const Type* type) {
return 0;
}
- if (type->isPointerType()) {
+ if (type->isPointerType() || type->isReferenceType()) {
if (Edge* ptr = CreateEdge(type->getPointeeType().getTypePtrOrNull()))
- return new RawPtr(ptr, false);
+ return new RawPtr(ptr, false, type->isReferenceType());
return 0;
}
@@ -609,7 +609,7 @@ Edge* RecordInfo::CreateEdge(const Type* type) {
if (Config::IsRawPtr(info->name()) && info->GetTemplateArgs(1, &args)) {
if (Edge* ptr = CreateEdge(args[0]))
- return new RawPtr(ptr, true);
+ return new RawPtr(ptr, true, false);
return 0;
}
« no previous file with comments | « tools/clang/blink_gc_plugin/Edge.h ('k') | tools/clang/blink_gc_plugin/tests/raw_ptr_to_gc_managed_class.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698