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/tests/legacy_naming/stack_allocated_no_warning.h

Issue 2685583002: blink_gc_plugin: warn of unused trace methods to stack allocated classes. (Closed)
Patch Set: rebased upto r449038 Created 3 years, 10 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/legacy_naming/stack_allocated_no_warning.h
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/stack_allocated_no_warning.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/stack_allocated_no_warning.h
new file mode 100644
index 0000000000000000000000000000000000000000..3891d2a86343689085d918880035b4c96dd84bb5
--- /dev/null
+++ b/tools/clang/blink_gc_plugin/tests/legacy_naming/stack_allocated_no_warning.h
@@ -0,0 +1,26 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef STACK_ALLOCATED_H_
+#define STACK_ALLOCATED_H_
+
+#include "heap/stubs.h"
+
+namespace blink {
+
+class HeapObject;
+
+class StackObject {
+ STACK_ALLOCATED();
+
+ // Redundant trace() method, but warning/error disabled.
+ void trace(Visitor* visitor) { visitor->trace(m_obj); }
+
+private:
+ Member<HeapObject> m_obj; // Does not need tracing.
+};
+
+}
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698