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

Side by Side Diff: tools/clang/blink_gc_plugin/CheckDispatchVisitor.cpp

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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "CheckDispatchVisitor.h"
6
7 #include "Config.h"
8 #include "RecordInfo.h"
9
10 using namespace clang;
11
12 CheckDispatchVisitor::CheckDispatchVisitor(RecordInfo* receiver)
13 : receiver_(receiver),
14 dispatched_to_receiver_(false) {
15 }
16
17 bool CheckDispatchVisitor::dispatched_to_receiver() {
18 return dispatched_to_receiver_;
19 }
20
21 bool CheckDispatchVisitor::VisitMemberExpr(MemberExpr* member) {
22 if (CXXMethodDecl* fn = dyn_cast<CXXMethodDecl>(member->getMemberDecl())) {
23 if (fn->getParent() == receiver_->record())
24 dispatched_to_receiver_ = true;
25 }
26 return true;
27 }
28
29 bool CheckDispatchVisitor::VisitUnresolvedMemberExpr(
30 UnresolvedMemberExpr* member) {
31 for (Decl* decl : member->decls()) {
32 if (CXXMethodDecl* method = dyn_cast<CXXMethodDecl>(decl)) {
33 if (method->getParent() == receiver_->record() &&
34 Config::GetTraceMethodType(method) ==
35 Config::TRACE_AFTER_DISPATCH_METHOD) {
36 dispatched_to_receiver_ = true;
37 return true;
38 }
39 }
40 }
41 return true;
42 }
OLDNEW
« no previous file with comments | « tools/clang/blink_gc_plugin/CheckDispatchVisitor.h ('k') | tools/clang/blink_gc_plugin/CheckFieldsVisitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698