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

Unified Diff: tools/clang/blink_gc_plugin/CheckDispatchVisitor.h

Issue 1385193002: Bisect clang Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 246985 Created 5 years, 2 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/CMakeLists.txt ('k') | tools/clang/blink_gc_plugin/CheckDispatchVisitor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/blink_gc_plugin/CheckDispatchVisitor.h
diff --git a/tools/clang/blink_gc_plugin/CheckDispatchVisitor.h b/tools/clang/blink_gc_plugin/CheckDispatchVisitor.h
new file mode 100644
index 0000000000000000000000000000000000000000..d96193dd850db99cd5eddab130a13f615c44c0fd
--- /dev/null
+++ b/tools/clang/blink_gc_plugin/CheckDispatchVisitor.h
@@ -0,0 +1,30 @@
+// Copyright 2015 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 TOOLS_BLINK_GC_PLUGIN_CHECK_DISPATCH_VISITOR_H_
+#define TOOLS_BLINK_GC_PLUGIN_CHECK_DISPATCH_VISITOR_H_
+
+#include "clang/AST/RecursiveASTVisitor.h"
+
+class RecordInfo;
+
+// This visitor checks that a method contains within its body, a call to a
+// method on the provided receiver class. This is used to check manual
+// dispatching for trace and finalize methods.
+class CheckDispatchVisitor
+ : public clang::RecursiveASTVisitor<CheckDispatchVisitor> {
+ public:
+ explicit CheckDispatchVisitor(RecordInfo* receiver);
+
+ bool dispatched_to_receiver();
+
+ bool VisitMemberExpr(clang::MemberExpr* member);
+ bool VisitUnresolvedMemberExpr(clang::UnresolvedMemberExpr* member);
+
+ private:
+ RecordInfo* receiver_;
+ bool dispatched_to_receiver_;
+};
+
+#endif // TOOLS_BLINK_GC_PLUGIN_CHECK_DISPATCH_VISITOR_H_
« no previous file with comments | « tools/clang/blink_gc_plugin/CMakeLists.txt ('k') | tools/clang/blink_gc_plugin/CheckDispatchVisitor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698