clang-metatool
A framework for reusing code in clang tools
variable_refs_data.h
Go to the documentation of this file.
1 #ifndef INCLUDED_CLANGMETATOOL_COLLECTORS_VARIABLE_REFS_DATA_H
2 #define INCLUDED_CLANGMETATOOL_COLLECTORS_VARIABLE_REFS_DATA_H
3 
4 #include <clang/AST/DeclBase.h>
5 #include <clang/AST/Expr.h>
6 #include <clang/AST/TypeLoc.h>
7 #include <clang/ASTMatchers/ASTMatchFinder.h>
8 #include <clang/Basic/FileManager.h>
9 #include <clang/Basic/SourceLocation.h>
10 #include <clang/Frontend/CompilerInstance.h>
11 #include <map>
12 #include <string>
13 
20 #include <iosfwd>
21 
22 namespace clangmetatool {
23 namespace collectors {
24 
29 
33  std::multimap<const clang::VarDecl *, const clang::DeclRefExpr *> refs;
34 
40  std::set<const clang::DeclRefExpr *> rvalue_refs;
41 
52  std::map<const clang::DeclRefExpr *, const clang::Expr *>
54 };
55 }
56 }
57 
58 #endif
59 
60 // ----------------------------------------------------------------------------
61 // Copyright 2018 Bloomberg Finance L.P.
62 //
63 // Licensed under the Apache License, Version 2.0 (the "License");
64 // you may not use this file except in compliance with the License.
65 // You may obtain a copy of the License at
66 //
67 // http://www.apache.org/licenses/LICENSE-2.0
68 //
69 // Unless required by applicable law or agreed to in writing, software
70 // distributed under the License is distributed on an "AS IS" BASIS,
71 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
72 // See the License for the specific language governing permissions and
73 // limitations under the License.
74 // ----------------------------- END-OF-FILE ----------------------------------
std::multimap< const clang::VarDecl *, const clang::DeclRefExpr * > refs
std::set< const clang::DeclRefExpr * > rvalue_refs
std::map< const clang::DeclRefExpr *, const clang::Expr * > clear_assignment_refs