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