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

Unified Diff: tools/clang/blink_gc_plugin/tests/stack_allocated.txt

Issue 206123004: Add checks for stack-allocated types and their uses in fields. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: tools/clang/blink_gc_plugin/tests/stack_allocated.txt
diff --git a/tools/clang/blink_gc_plugin/tests/stack_allocated.txt b/tools/clang/blink_gc_plugin/tests/stack_allocated.txt
index f5745bb7364b9e02ff87dbfbe8fac98820371ada..acdb481fb83120be24fccfeab86a4e8f700324e7 100644
--- a/tools/clang/blink_gc_plugin/tests/stack_allocated.txt
+++ b/tools/clang/blink_gc_plugin/tests/stack_allocated.txt
@@ -5,4 +5,16 @@ class PartObject {
./stack_allocated.h:17:5: note: [blink-gc] Untraced field 'm_obj' declared here:
Member<HeapObject> m_obj; // Needs tracing.
^
-1 warning generated.
+./stack_allocated.h:26:28: warning: [blink-gc] Stack-allocated class 'AnotherStackObject' derives class 'PartObject' which is not stack allocated.
+class AnotherStackObject : public PartObject { // Invalid base.
+ ^
+./stack_allocated.h:32:1: warning: [blink-gc] Class 'HeapObject' contains invalid fields.
+class HeapObject : public GarbageCollected<HeapObject> {
+^
+./stack_allocated.h:36:5: note: [blink-gc] Stack-allocated field 'm_part' declared here:
+ StackObject m_part; // Cannot embed a stack allocated object.
+ ^
+./stack_allocated.h:39:28: warning: [blink-gc] Class 'DerivedStackObject' derives stack-allocated class 'StackObject' but is not itself stack allocated
+class DerivedStackObject : public StackObject {
+ ^
+4 warnings generated.

Powered by Google App Engine
This is Rietveld 408576698