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

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: rebase 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/tests/stack_allocated.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..72b1f2c84a0305cb79ae15e99ad45a5530bfb1cf 100644
--- a/tools/clang/blink_gc_plugin/tests/stack_allocated.txt
+++ b/tools/clang/blink_gc_plugin/tests/stack_allocated.txt
@@ -5,4 +5,13 @@ 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.
+ ^
+3 warnings generated.
« no previous file with comments | « tools/clang/blink_gc_plugin/tests/stack_allocated.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698