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.
5 #include "CollectVisitor.h"
11 CollectVisitor::CollectVisitor() {
14 CollectVisitor::RecordVector
& CollectVisitor::record_decls() {
18 CollectVisitor::MethodVector
& CollectVisitor::trace_decls() {
22 bool CollectVisitor::VisitCXXRecordDecl(CXXRecordDecl
* record
) {
23 if (record
->hasDefinition() && record
->isCompleteDefinition())
24 record_decls_
.push_back(record
);
28 bool CollectVisitor::VisitCXXMethodDecl(CXXMethodDecl
* method
) {
29 if (method
->isThisDeclarationADefinition() && Config::IsTraceMethod(method
))
30 trace_decls_
.push_back(method
);