clang 8.0.0

MultiplexConsumer.cpp
Go to the documentation of this file.
1 //===- MultiplexConsumer.cpp - AST Consumer for PCH Generation --*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines the MultiplexConsumer class. It also declares and defines
11 // MultiplexASTDeserializationListener and MultiplexASTMutationListener, which
12 // are implementation details of MultiplexConsumer.
13 //
14 //===----------------------------------------------------------------------===//
15
16 #include "clang/Frontend/MultiplexConsumer.h"
17 #include "clang/AST/ASTMutationListener.h"
18 #include "clang/AST/DeclGroup.h"
19
20 using namespace clang;
21
22 namespace clang {
23
24 MultiplexASTDeserializationListener::MultiplexASTDeserializationListener(
25 const std::vector<ASTDeserializationListener*>& L)
26 : Listeners(L) {
27 }
28
29 void MultiplexASTDeserializationListener::ReaderInitialized(
30 ASTReader *Reader) {
31 for (size_t i = 0, e = Listeners.size(); i != e; ++i)
32 Listeners[i]->ReaderInitialized(Reader);
33 }
34
35 void MultiplexASTDeserializationListener::IdentifierRead(
36 serialization::IdentID ID, IdentifierInfo *II) {
37 for (size_t i = 0, e = Listeners.size(); i != e; ++i)
38 Listeners[i]->IdentifierRead(ID, II);
39 }
40
41 void MultiplexASTDeserializationListener::MacroRead(
42 serialization::MacroID ID, MacroInfo *MI) {
43 for (auto &Listener : Listeners)
44 Listener->MacroRead(ID, MI);
45 }
46
47 void MultiplexASTDeserializationListener::TypeRead(
48 serialization::TypeIdx Idx, QualType T) {
49 for (size_t i = 0, e = Listeners.size(); i != e; ++i)
50 Listeners[i]->TypeRead(Idx, T);
51 }
52
53 void MultiplexASTDeserializationListener::DeclRead(
54 serialization::DeclID ID, const Decl *D) {
55 for (size_t i = 0, e = Listeners.size(); i != e; ++i)
56 Listeners[i]->DeclRead(ID, D);
57 }
58
59 void MultiplexASTDeserializationListener::SelectorRead(
60 serialization::SelectorID ID, Selector Sel) {
61 for (size_t i = 0, e = Listeners.size(); i != e; ++i)
62 Listeners[i]->SelectorRead(ID, Sel);
63 }
64
65 void MultiplexASTDeserializationListener::MacroDefinitionRead(
66 serialization::PreprocessedEntityID ID, MacroDefinitionRecord *MD) {
67 for (size_t i = 0, e = Listeners.size(); i != e; ++i)
68 Listeners[i]->MacroDefinitionRead(ID, MD);
69 }
70
71 void MultiplexASTDeserializationListener::ModuleRead(
72 serialization::SubmoduleID ID, Module *Mod) {
73 for (auto &Listener : Listeners)
74 Listener->ModuleRead(ID, Mod);
75 }
76
77 // This ASTMutationListener forwards its notifications to a set of
78 // child listeners.
79 class MultiplexASTMutationListener : public ASTMutationListener {
80 public:
81 // Does NOT take ownership of the elements in L.
82 MultiplexASTMutationListener(ArrayRef<ASTMutationListener*> L);
83 void CompletedTagDefinition(const TagDecl *D) override;
84 void AddedVisibleDecl(const DeclContext *DC, const Decl *D) override;
85 void AddedCXXImplicitMember(const CXXRecordDecl *RD, const Decl *D) override;
86 void AddedCXXTemplateSpecialization(const ClassTemplateDecl *TD,
87 const ClassTemplateSpecializationDecl *D) override;
88 void AddedCXXTemplateSpecialization(const VarTemplateDecl *TD,
89 const VarTemplateSpecializationDecl *D) override;
90 void AddedCXXTemplateSpecialization(const FunctionTemplateDecl *TD,
91 const FunctionDecl *D) override;
92 void ResolvedExceptionSpec(const FunctionDecl *FD) override;
93 void DeducedReturnType(const FunctionDecl *FD, QualType ReturnType) override;
94 void ResolvedOperatorDelete(const CXXDestructorDecl *DD,
95 const FunctionDecl *Delete,
96 Expr *ThisArg) override;
97 void CompletedImplicitDefinition(const FunctionDecl *D) override;
98 void InstantiationRequested(const ValueDecl *D) override;
99 void VariableDefinitionInstantiated(const VarDecl *D) override;
100 void FunctionDefinitionInstantiated(const FunctionDecl *D) override;
101 void DefaultArgumentInstantiated(const ParmVarDecl *D) override;
102 void DefaultMemberInitializerInstantiated(const FieldDecl *D) override;
103 void AddedObjCCategoryToInterface(const ObjCCategoryDecl *CatD,
104 const ObjCInterfaceDecl *IFD) override;
105 void DeclarationMarkedUsed(const Decl *D) override;
106 void DeclarationMarkedOpenMPThreadPrivate(const Decl *D) override;
107 void DeclarationMarkedOpenMPDeclareTarget(const Decl *D,
108 const Attr *Attr) override;
109 void RedefinedHiddenDefinition(const NamedDecl *D, Module *M) override;
110 void AddedAttributeToRecord(const Attr *Attr,
111 const RecordDecl *Record) override;
112
113 private:
114 std::vector<ASTMutationListener*> Listeners;
115 };
116
117 MultiplexASTMutationListener::MultiplexASTMutationListener(
118 ArrayRef<ASTMutationListener*> L)
119 : Listeners(L.begin(), L.end()) {
120 }
121
122 void MultiplexASTMutationListener::CompletedTagDefinition(const TagDecl *D) {
123 for (size_t i = 0, e = Listeners.size(); i != e; ++i)
124 Listeners[i]->CompletedTagDefinition(D);
125 }
126
127 void MultiplexASTMutationListener::AddedVisibleDecl(
128 const DeclContext *DC, const Decl *D) {
129 for (size_t i = 0, e = Listeners.size(); i != e; ++i)
130 Listeners[i]->AddedVisibleDecl(DC, D);
131 }
132
133 void MultiplexASTMutationListener::AddedCXXImplicitMember(
134 const CXXRecordDecl *RD, const Decl *D) {
135 for (size_t i = 0, e = Listeners.size(); i != e; ++i)
136 Listeners[i]->AddedCXXImplicitMember(RD, D);
137 }
138 void MultiplexASTMutationListener::AddedCXXTemplateSpecialization(
139 const ClassTemplateDecl *TD, const ClassTemplateSpecializationDecl *D) {
140 for (size_t i = 0, e = Listeners.size(); i != e; ++i)
141 Listeners[i]->AddedCXXTemplateSpecialization(TD, D);
142 }
143 void MultiplexASTMutationListener::AddedCXXTemplateSpecialization(
144 const VarTemplateDecl *TD, const VarTemplateSpecializationDecl *D) {
145 for (size_t i = 0, e = Listeners.size(); i != e; ++i)
146 Listeners[i]->AddedCXXTemplateSpecialization(TD, D);
147 }
148 void MultiplexASTMutationListener::AddedCXXTemplateSpecialization(
149 const FunctionTemplateDecl *TD, const FunctionDecl *D) {
150 for (size_t i = 0, e = Listeners.size(); i != e; ++i)
151 Listeners[i]->AddedCXXTemplateSpecialization(TD, D);
152 }
153 void MultiplexASTMutationListener::ResolvedExceptionSpec(
154 const FunctionDecl *FD) {
155 for (auto &Listener : Listeners)
156 Listener->ResolvedExceptionSpec(FD);
157 }
158 void MultiplexASTMutationListener::DeducedReturnType(const FunctionDecl *FD,
159 QualType ReturnType) {
160 for (size_t i = 0, e = Listeners.size(); i != e; ++i)
161 Listeners[i]->DeducedReturnType(FD, ReturnType);
162 }
163 void MultiplexASTMutationListener::ResolvedOperatorDelete(
164 const CXXDestructorDecl *DD, const FunctionDecl *Delete, Expr *ThisArg) {
165 for (auto *L : Listeners)
166 L->ResolvedOperatorDelete(DD, Delete, ThisArg);
167 }
168 void MultiplexASTMutationListener::CompletedImplicitDefinition(
169 const FunctionDecl *D) {
170 for (size_t i = 0, e = Listeners.size(); i != e; ++i)
171 Listeners[i]->CompletedImplicitDefinition(D);
172 }
173 void MultiplexASTMutationListener::InstantiationRequested(const ValueDecl *D) {
174 for (size_t i = 0, e = Listeners.size(); i != e; ++i)
175 Listeners[i]->InstantiationRequested(D);
176 }
177 void MultiplexASTMutationListener::VariableDefinitionInstantiated(
178 const VarDecl *D) {
179 for (size_t i = 0, e = Listeners.size(); i != e; ++i)
180 Listeners[i]->VariableDefinitionInstantiated(D);
181 }
182 void MultiplexASTMutationListener::FunctionDefinitionInstantiated(
183 const FunctionDecl *D) {
184 for (auto &Listener : Listeners)
185 Listener->FunctionDefinitionInstantiated(D);
186 }
187 void MultiplexASTMutationListener::DefaultArgumentInstantiated(
188 const ParmVarDecl *D) {
189 for (size_t i = 0, e = Listeners.size(); i != e; ++i)
190 Listeners[i]->DefaultArgumentInstantiated(D);
191 }
192 void MultiplexASTMutationListener::DefaultMemberInitializerInstantiated(
193 const FieldDecl *D) {
194 for (size_t i = 0, e = Listeners.size(); i != e; ++i)
195 Listeners[i]->DefaultMemberInitializerInstantiated(D);
196 }
197 void MultiplexASTMutationListener::AddedObjCCategoryToInterface(
198 const ObjCCategoryDecl *CatD,
199 const ObjCInterfaceDecl *IFD) {
200 for (size_t i = 0, e = Listeners.size(); i != e; ++i)
201 Listeners[i]->AddedObjCCategoryToInterface(CatD, IFD);
202 }
203 void MultiplexASTMutationListener::DeclarationMarkedUsed(const Decl *D) {
204 for (size_t i = 0, e = Listeners.size(); i != e; ++i)
205 Listeners[i]->DeclarationMarkedUsed(D);
206 }
207 void MultiplexASTMutationListener::DeclarationMarkedOpenMPThreadPrivate(
208 const Decl *D) {
209 for (size_t i = 0, e = Listeners.size(); i != e; ++i)
210 Listeners[i]->DeclarationMarkedOpenMPThreadPrivate(D);
211 }
212 void MultiplexASTMutationListener::DeclarationMarkedOpenMPDeclareTarget(
213 const Decl *D, const Attr *Attr) {
214 for (auto *L : Listeners)
215 L->DeclarationMarkedOpenMPDeclareTarget(D, Attr);
216 }
217 void MultiplexASTMutationListener::RedefinedHiddenDefinition(const NamedDecl *D,
218 Module *M) {
219 for (auto *L : Listeners)
220 L->RedefinedHiddenDefinition(D, M);
221 }
222
223 void MultiplexASTMutationListener::AddedAttributeToRecord(
224 const Attr *Attr,
225 const RecordDecl *Record) {
226 for (auto *L : Listeners)
227 L->AddedAttributeToRecord(Attr, Record);
228 }
229
230 } // end namespace clang
231
232 MultiplexConsumer::MultiplexConsumer(
233 std::vector<std::unique_ptr<ASTConsumer>> C)
234 : Consumers(std::move(C)), MutationListener(), DeserializationListener() {
235 // Collect the mutation listeners and deserialization listeners of all
236 // children, and create a multiplex listener each if so.
237 std::vector<ASTMutationListener*> mutationListeners;
238 std::vector<ASTDeserializationListener*> serializationListeners;
239 for (auto &Consumer : Consumers) {
240 if (auto *mutationListener = Consumer->GetASTMutationListener())
241 mutationListeners.push_back(mutationListener);
242 if (auto *serializationListener = Consumer->GetASTDeserializationListener())
243 serializationListeners.push_back(serializationListener);
244 }
245 if (!mutationListeners.empty()) {
246 MutationListener =
247 llvm::make_unique<MultiplexASTMutationListener>(mutationListeners);
248 }
249 if (!serializationListeners.empty()) {
250 DeserializationListener =
251 llvm::make_unique<MultiplexASTDeserializationListener>(
252 serializationListeners);
253 }
254 }
255
256 MultiplexConsumer::~MultiplexConsumer() {}
257
258 void MultiplexConsumer::Initialize(ASTContext &Context) {
259 for (auto &Consumer : Consumers)
260 Consumer->Initialize(Context);
261 }
262
263 bool MultiplexConsumer::HandleTopLevelDecl(DeclGroupRef D) {
264 bool Continue = true;
265 for (auto &Consumer : Consumers)
266 Continue = Continue && Consumer->HandleTopLevelDecl(D);
267 return Continue;
268 }
269
270 void MultiplexConsumer::HandleInlineFunctionDefinition(FunctionDecl *D) {
271 for (auto &Consumer : Consumers)
272 Consumer->HandleInlineFunctionDefinition(D);
273 }
274
275 void MultiplexConsumer::HandleCXXStaticMemberVarInstantiation(VarDecl *VD) {
276 for (auto &Consumer : Consumers)
277 Consumer->HandleCXXStaticMemberVarInstantiation(VD);
278 }
279
280 void MultiplexConsumer::HandleInterestingDecl(DeclGroupRef D) {
281 for (auto &Consumer : Consumers)
282 Consumer->HandleInterestingDecl(D);
283 }
284
285 void MultiplexConsumer::HandleTranslationUnit(ASTContext &Ctx) {
286 for (auto &Consumer : Consumers)
287 Consumer->HandleTranslationUnit(Ctx);
288 }
289
290 void MultiplexConsumer::HandleTagDeclDefinition(TagDecl *D) {
291 for (auto &Consumer : Consumers)
292 Consumer->HandleTagDeclDefinition(D);
293 }
294
295 void MultiplexConsumer::HandleTagDeclRequiredDefinition(const TagDecl *D) {
296 for (auto &Consumer : Consumers)
297 Consumer->HandleTagDeclRequiredDefinition(D);
298 }
299
300 void MultiplexConsumer::HandleCXXImplicitFunctionInstantiation(FunctionDecl *D){
301 for (auto &Consumer : Consumers)
302 Consumer->HandleCXXImplicitFunctionInstantiation(D);
303 }
304
305 void MultiplexConsumer::HandleTopLevelDeclInObjCContainer(DeclGroupRef D) {
306 for (auto &Consumer : Consumers)
307 Consumer->HandleTopLevelDeclInObjCContainer(D);
308 }
309
310 void MultiplexConsumer::HandleImplicitImportDecl(ImportDecl *D) {
311 for (auto &Consumer : Consumers)
312 Consumer->HandleImplicitImportDecl(D);
313 }
314
315 void MultiplexConsumer::CompleteTentativeDefinition(VarDecl *D) {
316 for (auto &Consumer : Consumers)
317 Consumer->CompleteTentativeDefinition(D);
318 }
319
320 void MultiplexConsumer::AssignInheritanceModel(CXXRecordDecl *RD) {
321 for (auto &Consumer : Consumers)
322 Consumer->AssignInheritanceModel(RD);
323 }
324
325 void MultiplexConsumer::HandleVTable(CXXRecordDecl *RD) {
326 for (auto &Consumer : Consumers)
327 Consumer->HandleVTable(RD);
328 }
329
330 ASTMutationListener *MultiplexConsumer::GetASTMutationListener() {
331 return MutationListener.get();
332 }
333
334 ASTDeserializationListener *MultiplexConsumer::GetASTDeserializationListener() {
335 return DeserializationListener.get();
336 }
337
338 void MultiplexConsumer::PrintStats() {
339 for (auto &Consumer : Consumers)
340 Consumer->PrintStats();
341 }
342
343 bool MultiplexConsumer::shouldSkipFunctionBody(Decl *D) {
344 bool Skip = true;
345 for (auto &Consumer : Consumers)
346 Skip = Skip && Consumer->shouldSkipFunctionBody(D);
347 return Skip;
348 }
349
350 void MultiplexConsumer::InitializeSema(Sema &S) {
351 for (auto &Consumer : Consumers)
352 if (SemaConsumer *SC = dyn_cast<SemaConsumer>(Consumer.get()))
353 SC->InitializeSema(S);
354 }
355
356 void MultiplexConsumer::ForgetSema() {
357 for (auto &Consumer : Consumers)
358 if (SemaConsumer *SC = dyn_cast<SemaConsumer>(Consumer.get()))
359 SC->ForgetSema();
360 }
clang::MultiplexASTMutationListener::MultiplexASTMutationListener
MultiplexASTMutationListener(ArrayRef< ASTMutationListener *> L)
Definition: MultiplexConsumer.cpp:117
clang::Builtin::ID
ID
Definition: Builtins.h:49
clang::MultiplexASTMutationListener::AddedCXXImplicitMember
void AddedCXXImplicitMember(const CXXRecordDecl *RD, const Decl *D) override
An implicit member was added after the definition was completed.
Definition: MultiplexConsumer.cpp:133
clang::FunctionDecl
Represents a function declaration or definition.
Definition: Decl.h:1738
clang::MultiplexASTMutationListener::DeclarationMarkedUsed
void DeclarationMarkedUsed(const Decl *D) override
A declaration is marked used which was not previously marked used.
Definition: MultiplexConsumer.cpp:203
clang::MultiplexConsumer::GetASTMutationListener
ASTMutationListener * GetASTMutationListener() override
If the consumer is interested in entities getting modified after their initial creation, it should return a pointer to an ASTMutationListener here.
Definition: MultiplexConsumer.cpp:330
clang::MultiplexASTMutationListener::CompletedImplicitDefinition
void CompletedImplicitDefinition(const FunctionDecl *D) override
An implicit member got a definition.
Definition: MultiplexConsumer.cpp:168
clang::Selector
Smart pointer class that efficiently represents Objective-C method names.
Definition: IdentifierTable.h:673
clang::MultiplexASTDeserializationListener::SelectorRead
void SelectorRead(serialization::SelectorID iD, Selector Sel) override
A selector was read from the AST file.
Definition: MultiplexConsumer.cpp:59
clang::MultiplexConsumer::HandleTopLevelDeclInObjCContainer
void HandleTopLevelDeclInObjCContainer(DeclGroupRef D) override
Handle the specified top-level declaration that occurred inside and ObjC container.
Definition: MultiplexConsumer.cpp:305
clang::QualType
A (possibly-)qualified type.
Definition: Type.h:638
clang::MultiplexASTDeserializationListener::TypeRead
void TypeRead(serialization::TypeIdx Idx, QualType T) override
A type was deserialized from the AST file.
Definition: MultiplexConsumer.cpp:47
clang::MultiplexASTMutationListener::ResolvedExceptionSpec
void ResolvedExceptionSpec(const FunctionDecl *FD) override
A function&#39;s exception specification has been evaluated or instantiated.
Definition: MultiplexConsumer.cpp:153
clang::MultiplexASTMutationListener::VariableDefinitionInstantiated
void VariableDefinitionInstantiated(const VarDecl *D) override
A templated variable&#39;s definition was implicitly instantiated.
Definition: MultiplexConsumer.cpp:177
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:87
clang::MultiplexConsumer::HandleInlineFunctionDefinition
void HandleInlineFunctionDefinition(FunctionDecl *D) override
This callback is invoked each time an inline (method or friend) function definition in a class is com...
Definition: MultiplexConsumer.cpp:270
clang::MultiplexConsumer::HandleVTable
void HandleVTable(CXXRecordDecl *RD) override
Callback involved at the end of a translation unit to notify the consumer that a vtable for the given...
Definition: MultiplexConsumer.cpp:325
clang::VarTemplateDecl
Declaration of a variable template.
Definition: DeclTemplate.h:2862
clang::MultiplexASTDeserializationListener::DeclRead
void DeclRead(serialization::DeclID ID, const Decl *D) override
A decl was deserialized from the AST file.
Definition: MultiplexConsumer.cpp:53
clang::VarDecl
Represents a variable declaration or definition.
Definition: Decl.h:813
clang::VarTemplateSpecializationDecl
Represents a variable template specialization, which refers to a variable template with a given set o...
Definition: DeclTemplate.h:2475
clang::MultiplexASTDeserializationListener::MacroDefinitionRead
void MacroDefinitionRead(serialization::PreprocessedEntityID, MacroDefinitionRecord *MD) override
A macro definition was read from the AST file.
Definition: MultiplexConsumer.cpp:65
clang::MultiplexConsumer::CompleteTentativeDefinition
void CompleteTentativeDefinition(VarDecl *D) override
CompleteTentativeDefinition - Callback invoked at the end of a translation unit to notify the consume...
Definition: MultiplexConsumer.cpp:315
clang::ParmVarDecl
Represents a parameter to a function.
Definition: Decl.h:1550
clang::RecordDecl
Represents a struct/union/class.
Definition: Decl.h:3593
clang::ClassTemplateSpecializationDecl
Represents a class template specialization, which refers to a class template with a given set of temp...
Definition: DeclTemplate.h:1648
clang::IdentifierInfo
One of these records is kept for each identifier that is lexed.
Definition: IdentifierTable.h:58
clang::ASTContext
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:155
clang::MacroDefinitionRecord
Record the location of a macro definition.
Definition: PreprocessingRecord.h:149
clang::FieldDecl
Represents a member of a struct/union/class.
Definition: Decl.h:2579
clang::MultiplexASTMutationListener::ResolvedOperatorDelete
void ResolvedOperatorDelete(const CXXDestructorDecl *DD, const FunctionDecl *Delete, Expr *ThisArg) override
A virtual destructor&#39;s operator delete has been resolved.
Definition: MultiplexConsumer.cpp:163
std
Definition: Format.h:2072
clang::MultiplexConsumer::PrintStats
void PrintStats() override
PrintStats - If desired, print any statistics.
Definition: MultiplexConsumer.cpp:338
clang::serialization::MacroID
uint32_t MacroID
An ID number that refers to a macro in an AST file.
Definition: ASTBitCodes.h:141
clang::diff::Delete
Definition: ASTDiff.h:30
clang::MultiplexASTMutationListener::DeclarationMarkedOpenMPThreadPrivate
void DeclarationMarkedOpenMPThreadPrivate(const Decl *D) override
A declaration is marked as OpenMP threadprivate which was not previously marked as threadprivate...
Definition: MultiplexConsumer.cpp:207
clang::Module
Describes a module or submodule.
Definition: Module.h:65
clang::SemaConsumer
An abstract interface that should be implemented by clients that read ASTs and then require further s...
Definition: SemaConsumer.h:26
clang::MultiplexConsumer::HandleTopLevelDecl
bool HandleTopLevelDecl(DeclGroupRef D) override
HandleTopLevelDecl - Handle the specified top-level declaration.
Definition: MultiplexConsumer.cpp:263
clang::MultiplexConsumer::MultiplexConsumer
MultiplexConsumer(std::vector< std::unique_ptr< ASTConsumer >> C)
Definition: MultiplexConsumer.cpp:232
clang::MultiplexASTMutationListener::AddedAttributeToRecord
void AddedAttributeToRecord(const Attr *Attr, const RecordDecl *Record) override
An attribute was added to a RecordDecl.
Definition: MultiplexConsumer.cpp:223
clang::MultiplexASTMutationListener::DefaultArgumentInstantiated
void DefaultArgumentInstantiated(const ParmVarDecl *D) override
A default argument was instantiated.
Definition: MultiplexConsumer.cpp:187
clang::MultiplexConsumer::HandleTagDeclRequiredDefinition
void HandleTagDeclRequiredDefinition(const TagDecl *D) override
This callback is invoked the first time each TagDecl is required to be complete.
Definition: MultiplexConsumer.cpp:295
clang::ObjCInterfaceDecl
Represents an ObjC class declaration.
Definition: DeclObjC.h:1172
llvm::ArrayRef
Definition: LLVM.h:32
ASTMutationListener.h
clang::MultiplexASTDeserializationListener::ReaderInitialized
void ReaderInitialized(ASTReader *Reader) override
The ASTReader was initialized.
Definition: MultiplexConsumer.cpp:29
clang::Sema
Sema - This implements semantic analysis and AST building for C.
Definition: Sema.h:278
clang::MultiplexConsumer::~MultiplexConsumer
~MultiplexConsumer() override
Definition: MultiplexConsumer.cpp:256
clang::MultiplexConsumer::Initialize
void Initialize(ASTContext &Context) override
Initialize - This is called to initialize the consumer, providing the ASTContext. ...
Definition: MultiplexConsumer.cpp:258
clang::ValueDecl
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Definition: Decl.h:637
clang::Expr
This represents one expression.
Definition: Expr.h:106
clang::MultiplexASTMutationListener::AddedCXXTemplateSpecialization
void AddedCXXTemplateSpecialization(const ClassTemplateDecl *TD, const ClassTemplateSpecializationDecl *D) override
A template specialization (or partial one) was added to the template declaration. ...
Definition: MultiplexConsumer.cpp:138
clang::MultiplexASTMutationListener
Definition: MultiplexConsumer.cpp:79
clang::MultiplexASTMutationListener::FunctionDefinitionInstantiated
void FunctionDefinitionInstantiated(const FunctionDecl *D) override
A function template&#39;s definition was instantiated.
Definition: MultiplexConsumer.cpp:182
clang::CXXDestructorDecl
Represents a C++ destructor within a class.
Definition: DeclCXX.h:2706
clang::MultiplexConsumer::HandleTagDeclDefinition
void HandleTagDeclDefinition(TagDecl *D) override
HandleTagDeclDefinition - This callback is invoked each time a TagDecl (e.g.
Definition: MultiplexConsumer.cpp:290
clang::MultiplexASTMutationListener::DefaultMemberInitializerInstantiated
void DefaultMemberInitializerInstantiated(const FieldDecl *D) override
A default member initializer was instantiated.
Definition: MultiplexConsumer.cpp:192
clang::MultiplexASTMutationListener::DeducedReturnType
void DeducedReturnType(const FunctionDecl *FD, QualType ReturnType) override
A function&#39;s return type has been deduced.
Definition: MultiplexConsumer.cpp:158
clang::ASTMutationListener
An abstract interface that should be implemented by listeners that want to be notified when an AST en...
Definition: ASTMutationListener.h:47
clang::MultiplexConsumer::HandleInterestingDecl
void HandleInterestingDecl(DeclGroupRef D) override
HandleInterestingDecl - Handle the specified interesting declaration.
Definition: MultiplexConsumer.cpp:280
clang::MultiplexASTDeserializationListener::IdentifierRead
void IdentifierRead(serialization::IdentID ID, IdentifierInfo *II) override
An identifier was deserialized from the AST file.
Definition: MultiplexConsumer.cpp:35
clang::MultiplexASTMutationListener::DeclarationMarkedOpenMPDeclareTarget
void DeclarationMarkedOpenMPDeclareTarget(const Decl *D, const Attr *Attr) override
A declaration is marked as OpenMP declaretarget which was not previously marked as declaretarget...
Definition: MultiplexConsumer.cpp:212
clang::MultiplexASTMutationListener::CompletedTagDefinition
void CompletedTagDefinition(const TagDecl *D) override
A new TagDecl definition was completed.
Definition: MultiplexConsumer.cpp:122
clang::ASTDeserializationListener
Definition: ASTDeserializationListener.h:31
clang::MultiplexConsumer::AssignInheritanceModel
void AssignInheritanceModel(CXXRecordDecl *RD) override
Callback invoked when an MSInheritanceAttr has been attached to a CXXRecordDecl.
Definition: MultiplexConsumer.cpp:320
clang::serialization::SubmoduleID
uint32_t SubmoduleID
An ID number that refers to a submodule in a module file.
Definition: ASTBitCodes.h:172
clang::MultiplexConsumer::HandleCXXImplicitFunctionInstantiation
void HandleCXXImplicitFunctionInstantiation(FunctionDecl *D) override
Invoked when a function is implicitly instantiated.
Definition: MultiplexConsumer.cpp:300
clang::MultiplexASTDeserializationListener::ModuleRead
void ModuleRead(serialization::SubmoduleID ID, Module *Mod) override
A module definition was read from the AST file.
Definition: MultiplexConsumer.cpp:71
clang::TagDecl
Represents the declaration of a struct/union/class/enum.
Definition: Decl.h:3064
clang::ObjCCategoryDecl
ObjCCategoryDecl - Represents a category declaration.
Definition: DeclObjC.h:2280
clang::MultiplexASTMutationListener::AddedVisibleDecl
void AddedVisibleDecl(const DeclContext *DC, const Decl *D) override
A new declaration with name has been added to a DeclContext.
Definition: MultiplexConsumer.cpp:127
clang::MultiplexConsumer::HandleImplicitImportDecl
void HandleImplicitImportDecl(ImportDecl *D) override
Handle an ImportDecl that was implicitly created due to an inclusion directive.
Definition: MultiplexConsumer.cpp:310
clang::serialization::PreprocessedEntityID
uint32_t PreprocessedEntityID
An ID number that refers to an entity in the detailed preprocessing record.
Definition: ASTBitCodes.h:169
clang::MultiplexConsumer::ForgetSema
void ForgetSema() override
Inform the semantic consumer that Sema is no longer available.
Definition: MultiplexConsumer.cpp:356
clang::ImportDecl
Describes a module import declaration, which makes the contents of the named module visible in the cu...
Definition: Decl.h:4149
clang::serialization::SelectorID
uint32_t SelectorID
An ID number that refers to an ObjC selector in an AST file.
Definition: ASTBitCodes.h:154
clang
Dataflow Directional Tag Classes.
Definition: CFGReachabilityAnalysis.h:22
clang::MultiplexConsumer::InitializeSema
void InitializeSema(Sema &S) override
Initialize the semantic consumer with the Sema instance being used to perform semantic analysis on th...
Definition: MultiplexConsumer.cpp:350
clang::DeclContext
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Definition: DeclBase.h:1262
clang::ASTReader
Reads an AST files chain containing the contents of a translation unit.
Definition: ASTReader.h:355
clang::DeclGroupRef
Definition: DeclGroup.h:52
clang::serialization::DeclID
uint32_t DeclID
An ID number that refers to a declaration in an AST file.
Definition: ASTBitCodes.h:69
clang::MultiplexASTMutationListener::InstantiationRequested
void InstantiationRequested(const ValueDecl *D) override
The instantiation of a templated function or variable was requested.
Definition: MultiplexConsumer.cpp:173
clang::MacroInfo
Encapsulates the data about a macro definition (e.g.
Definition: MacroInfo.h:40
clang::serialization::IdentID
uint32_t IdentID
An ID number that refers to an identifier in an AST file.
Definition: ASTBitCodes.h:135
MultiplexConsumer.h
clang::MultiplexASTDeserializationListener::MultiplexASTDeserializationListener
MultiplexASTDeserializationListener(const std::vector< ASTDeserializationListener *> &L)
Definition: MultiplexConsumer.cpp:24
clang::CXXRecordDecl
Represents a C++ struct/union/class.
Definition: DeclCXX.h:300
DeclGroup.h
clang::MultiplexASTDeserializationListener::MacroRead
void MacroRead(serialization::MacroID ID, MacroInfo *MI) override
A macro was read from the AST file.
Definition: MultiplexConsumer.cpp:41
clang::AttrSyntax::C
clang::ClassTemplateDecl
Declaration of a class template.
Definition: DeclTemplate.h:2049
clang::MultiplexConsumer::HandleTranslationUnit
void HandleTranslationUnit(ASTContext &Ctx) override
HandleTranslationUnit - This method is called when the ASTs for entire translation unit have been par...
Definition: MultiplexConsumer.cpp:285
clang::MultiplexConsumer::GetASTDeserializationListener
ASTDeserializationListener * GetASTDeserializationListener() override
If the consumer is interested in entities being deserialized from AST files, it should return a point...
Definition: MultiplexConsumer.cpp:334
clang::MultiplexASTMutationListener::AddedObjCCategoryToInterface
void AddedObjCCategoryToInterface(const ObjCCategoryDecl *CatD, const ObjCInterfaceDecl *IFD) override
A new objc category class was added for an interface.
Definition: MultiplexConsumer.cpp:197
clang::NamedDecl
This represents a decl that may have a name.
Definition: Decl.h:249
clang::MultiplexConsumer::shouldSkipFunctionBody
bool shouldSkipFunctionBody(Decl *D) override
This callback is called for each function if the Parser was initialized with SkipFunctionBodies set t...
Definition: MultiplexConsumer.cpp:343
clang::FunctionTemplateDecl
Declaration of a template function.
Definition: DeclTemplate.h:969
clang::serialization::TypeIdx
A type index; the type ID with the qualifier bits removed.
Definition: ASTBitCodes.h:89
clang::Attr
Attr - This represents one attribute.
Definition: Attr.h:44
clang::MultiplexConsumer::HandleCXXStaticMemberVarInstantiation
void HandleCXXStaticMemberVarInstantiation(VarDecl *VD) override
HandleCXXStaticMemberVarInstantiation - Tell the consumer that this.
Definition: MultiplexConsumer.cpp:275
clang::MultiplexASTMutationListener::RedefinedHiddenDefinition
void RedefinedHiddenDefinition(const NamedDecl *D, Module *M) override
A definition has been made visible by being redefined locally.
Definition: MultiplexConsumer.cpp:217