clang-metatool
A framework for reusing code in clang tools
constant_cstring_propagator.h
Go to the documentation of this file.
1 #ifndef INCLUDED_CLANGMETATOOL_PROPAGATION_CONSTANT_CSTRING_PROPAGATOR_H
2 #define INCLUDED_CLANGMETATOOL_PROPAGATION_CONSTANT_CSTRING_PROPAGATOR_H
3 
4 #include <iostream>
5 #include <string>
6 
8 
12 namespace clang {
13 class CompilerInstance;
14 class DeclRefExpr;
15 class FunctionDecl;
16 }
17 
18 namespace clangmetatool {
19 namespace propagation {
20 
24 class ConstantCStringPropagatorImpl;
25 
41 private:
45  ConstantCStringPropagatorImpl *impl;
46 
47 public:
52  ConstantCStringPropagator(const clang::CompilerInstance *ci);
53 
58 
67  runPropagation(const clang::FunctionDecl *function,
68  const clang::DeclRefExpr *variable);
69 
74  void dump(std::ostream &stream) const;
75 };
76 
77 } // namespace propagation
78 } // namespace clangmetatool
79 
80 #endif
81 
82 // ----------------------------------------------------------------------------
83 // Copyright 2018 Bloomberg Finance L.P.
84 //
85 // Licensed under the Apache License, Version 2.0 (the "License");
86 // you may not use this file except in compliance with the License.
87 // You may obtain a copy of the License at
88 //
89 // http://www.apache.org/licenses/LICENSE-2.0
90 //
91 // Unless required by applicable law or agreed to in writing, software
92 // distributed under the License is distributed on an "AS IS" BASIS,
93 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
94 // See the License for the specific language governing permissions and
95 // limitations under the License.
96 // ----------------------------- END-OF-FILE ----------------------------------