Remove linux_chromium_gn_dbg from the chromium CQ.
[chromium-blink-merge.git] / tools / clang / blink_gc_plugin / CollectVisitor.h
bloba3ccdd8a3311ac605add4fe09e05527b5846c1b2
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 #ifndef TOOLS_BLINK_GC_PLUGIN_COLLECT_VISITOR_H_
6 #define TOOLS_BLINK_GC_PLUGIN_COLLECT_VISITOR_H_
8 #include <vector>
10 #include "clang/AST/AST.h"
11 #include "clang/AST/RecursiveASTVisitor.h"
13 // This visitor collects the entry points for the checker.
14 class CollectVisitor : public clang::RecursiveASTVisitor<CollectVisitor> {
15 public:
16 typedef std::vector<clang::CXXRecordDecl*> RecordVector;
17 typedef std::vector<clang::CXXMethodDecl*> MethodVector;
19 CollectVisitor();
21 RecordVector& record_decls();
22 MethodVector& trace_decls();
24 // Collect record declarations, including nested declarations.
25 bool VisitCXXRecordDecl(clang::CXXRecordDecl* record);
27 // Collect tracing method definitions, but don't traverse method bodies.
28 bool VisitCXXMethodDecl(clang::CXXMethodDecl* method);
30 private:
31 RecordVector record_decls_;
32 MethodVector trace_decls_;
35 #endif // TOOLS_BLINK_GC_PLUGIN_COLLECT_VISITOR_H_