clang  14.0.0git
MultiplexExternalSemaSource.h
Go to the documentation of this file.
1 //===--- MultiplexExternalSemaSource.h - External Sema Interface-*- 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 ExternalSemaSource interface, dispatching to all clients
10 //
11 //===----------------------------------------------------------------------===//
12 #ifndef LLVM_CLANG_SEMA_MULTIPLEXEXTERNALSEMASOURCE_H
13 #define LLVM_CLANG_SEMA_MULTIPLEXEXTERNALSEMASOURCE_H
14 
16 #include "clang/Sema/Weak.h"
17 #include "llvm/ADT/SmallVector.h"
18 #include <utility>
19 
20 namespace clang {
21 
22  class CXXConstructorDecl;
23  class CXXRecordDecl;
24  class DeclaratorDecl;
25  struct ExternalVTableUse;
26  class LookupResult;
27  class NamespaceDecl;
28  class Scope;
29  class Sema;
30  class TypedefNameDecl;
31  class ValueDecl;
32  class VarDecl;
33 
34 
35 /// An abstract interface that should be implemented by
36 /// external AST sources that also provide information for semantic
37 /// analysis.
39  /// LLVM-style RTTI.
40  static char ID;
41 
42 private:
43  SmallVector<ExternalSemaSource *, 2> Sources; // doesn't own them.
44 
45 public:
46 
47  ///Constructs a new multiplexing external sema source and appends the
48  /// given element to it.
49  ///
50  ///\param[in] s1 - A non-null (old) ExternalSemaSource.
51  ///\param[in] s2 - A non-null (new) ExternalSemaSource.
52  ///
54 
56 
57  ///Appends new source to the source list.
58  ///
59  ///\param[in] source - An ExternalSemaSource.
60  ///
61  void addSource(ExternalSemaSource &source);
62 
63  //===--------------------------------------------------------------------===//
64  // ExternalASTSource.
65  //===--------------------------------------------------------------------===//
66 
67  /// Resolve a declaration ID into a declaration, potentially
68  /// building a new declaration.
69  Decl *GetExternalDecl(uint32_t ID) override;
70 
71  /// Complete the redeclaration chain if it's been extended since the
72  /// previous generation of the AST source.
73  void CompleteRedeclChain(const Decl *D) override;
74 
75  /// Resolve a selector ID into a selector.
76  Selector GetExternalSelector(uint32_t ID) override;
77 
78  /// Returns the number of selectors known to the external AST
79  /// source.
80  uint32_t GetNumExternalSelectors() override;
81 
82  /// Resolve the offset of a statement in the decl stream into
83  /// a statement.
84  Stmt *GetExternalDeclStmt(uint64_t Offset) override;
85 
86  /// Resolve the offset of a set of C++ base specifiers in the decl
87  /// stream into an array of specifiers.
89 
90  /// Resolve a handle to a list of ctor initializers into the list of
91  /// initializers themselves.
93 
94  ExtKind hasExternalDefinitions(const Decl *D) override;
95 
96  /// Find all declarations with the given name in the
97  /// given context.
99  DeclarationName Name) override;
100 
101  /// Ensures that the table of all visible declarations inside this
102  /// context is up to date.
103  void completeVisibleDeclsMap(const DeclContext *DC) override;
104 
105  /// Finds all declarations lexically contained within the given
106  /// DeclContext, after applying an optional filter predicate.
107  ///
108  /// \param IsKindWeWant a predicate function that returns true if the passed
109  /// declaration kind is one we are looking for.
110  void
112  llvm::function_ref<bool(Decl::Kind)> IsKindWeWant,
113  SmallVectorImpl<Decl *> &Result) override;
114 
115  /// Get the decls that are contained in a file in the Offset/Length
116  /// range. \p Length can be 0 to indicate a point at \p Offset instead of
117  /// a range.
118  void FindFileRegionDecls(FileID File, unsigned Offset,unsigned Length,
119  SmallVectorImpl<Decl *> &Decls) override;
120 
121  /// Gives the external AST source an opportunity to complete
122  /// an incomplete type.
123  void CompleteType(TagDecl *Tag) override;
124 
125  /// Gives the external AST source an opportunity to complete an
126  /// incomplete Objective-C class.
127  ///
128  /// This routine will only be invoked if the "externally completed" bit is
129  /// set on the ObjCInterfaceDecl via the function
130  /// \c ObjCInterfaceDecl::setExternallyCompleted().
131  void CompleteType(ObjCInterfaceDecl *Class) override;
132 
133  /// Loads comment ranges.
134  void ReadComments() override;
135 
136  /// Notify ExternalASTSource that we started deserialization of
137  /// a decl or type so until FinishedDeserializing is called there may be
138  /// decls that are initializing. Must be paired with FinishedDeserializing.
139  void StartedDeserializing() override;
140 
141  /// Notify ExternalASTSource that we finished the deserialization of
142  /// a decl or type. Must be paired with StartedDeserializing.
143  void FinishedDeserializing() override;
144 
145  /// Function that will be invoked when we begin parsing a new
146  /// translation unit involving this external AST source.
147  void StartTranslationUnit(ASTConsumer *Consumer) override;
148 
149  /// Print any statistics that have been gathered regarding
150  /// the external AST source.
151  void PrintStats() override;
152 
153  /// Retrieve the module that corresponds to the given module ID.
154  Module *getModule(unsigned ID) override;
155 
156  /// Perform layout on the given record.
157  ///
158  /// This routine allows the external AST source to provide an specific
159  /// layout for a record, overriding the layout that would normally be
160  /// constructed. It is intended for clients who receive specific layout
161  /// details rather than source code (such as LLDB). The client is expected
162  /// to fill in the field offsets, base offsets, virtual base offsets, and
163  /// complete object size.
164  ///
165  /// \param Record The record whose layout is being requested.
166  ///
167  /// \param Size The final size of the record, in bits.
168  ///
169  /// \param Alignment The final alignment of the record, in bits.
170  ///
171  /// \param FieldOffsets The offset of each of the fields within the record,
172  /// expressed in bits. All of the fields must be provided with offsets.
173  ///
174  /// \param BaseOffsets The offset of each of the direct, non-virtual base
175  /// classes. If any bases are not given offsets, the bases will be laid
176  /// out according to the ABI.
177  ///
178  /// \param VirtualBaseOffsets The offset of each of the virtual base classes
179  /// (either direct or not). If any bases are not given offsets, the bases will
180  /// be laid out according to the ABI.
181  ///
182  /// \returns true if the record layout was provided, false otherwise.
183  bool
184  layoutRecordType(const RecordDecl *Record,
185  uint64_t &Size, uint64_t &Alignment,
186  llvm::DenseMap<const FieldDecl *, uint64_t> &FieldOffsets,
187  llvm::DenseMap<const CXXRecordDecl *, CharUnits> &BaseOffsets,
188  llvm::DenseMap<const CXXRecordDecl *,
189  CharUnits> &VirtualBaseOffsets) override;
190 
191  /// Return the amount of memory used by memory buffers, breaking down
192  /// by heap-backed versus mmap'ed memory.
193  void getMemoryBufferSizes(MemoryBufferSizes &sizes) const override;
194 
195  //===--------------------------------------------------------------------===//
196  // ExternalSemaSource.
197  //===--------------------------------------------------------------------===//
198 
199  /// Initialize the semantic source with the Sema instance
200  /// being used to perform semantic analysis on the abstract syntax
201  /// tree.
202  void InitializeSema(Sema &S) override;
203 
204  /// Inform the semantic consumer that Sema is no longer available.
205  void ForgetSema() override;
206 
207  /// Load the contents of the global method pool for a given
208  /// selector.
209  void ReadMethodPool(Selector Sel) override;
210 
211  /// Load the contents of the global method pool for a given
212  /// selector if necessary.
213  void updateOutOfDateSelector(Selector Sel) override;
214 
215  /// Load the set of namespaces that are known to the external source,
216  /// which will be used during typo correction.
217  void
219 
220  /// Load the set of used but not defined functions or variables with
221  /// internal linkage, or used but not defined inline functions.
223  llvm::MapVector<NamedDecl *, SourceLocation> &Undefined) override;
224 
225  void ReadMismatchingDeleteExpressions(llvm::MapVector<
226  FieldDecl *, llvm::SmallVector<std::pair<SourceLocation, bool>, 4>> &
227  Exprs) override;
228 
229  /// Do last resort, unqualified lookup on a LookupResult that
230  /// Sema cannot find.
231  ///
232  /// \param R a LookupResult that is being recovered.
233  ///
234  /// \param S the Scope of the identifier occurrence.
235  ///
236  /// \return true to tell Sema to recover using the LookupResult.
237  bool LookupUnqualified(LookupResult &R, Scope *S) override;
238 
239  /// Read the set of tentative definitions known to the external Sema
240  /// source.
241  ///
242  /// The external source should append its own tentative definitions to the
243  /// given vector of tentative definitions. Note that this routine may be
244  /// invoked multiple times; the external source should take care not to
245  /// introduce the same declarations repeatedly.
247 
248  /// Read the set of unused file-scope declarations known to the
249  /// external Sema source.
250  ///
251  /// The external source should append its own unused, filed-scope to the
252  /// given vector of declarations. Note that this routine may be
253  /// invoked multiple times; the external source should take care not to
254  /// introduce the same declarations repeatedly.
257 
258  /// Read the set of delegating constructors known to the
259  /// external Sema source.
260  ///
261  /// The external source should append its own delegating constructors to the
262  /// given vector of declarations. Note that this routine may be
263  /// invoked multiple times; the external source should take care not to
264  /// introduce the same declarations repeatedly.
266  SmallVectorImpl<CXXConstructorDecl*> &Decls) override;
267 
268  /// Read the set of ext_vector type declarations known to the
269  /// external Sema source.
270  ///
271  /// The external source should append its own ext_vector type declarations to
272  /// the given vector of declarations. Note that this routine may be
273  /// invoked multiple times; the external source should take care not to
274  /// introduce the same declarations repeatedly.
276 
277  /// Read the set of potentially unused typedefs known to the source.
278  ///
279  /// The external source should append its own potentially unused local
280  /// typedefs to the given vector of declarations. Note that this routine may
281  /// be invoked multiple times; the external source should take care not to
282  /// introduce the same declarations repeatedly.
285 
286  /// Read the set of referenced selectors known to the
287  /// external Sema source.
288  ///
289  /// The external source should append its own referenced selectors to the
290  /// given vector of selectors. Note that this routine
291  /// may be invoked multiple times; the external source should take care not
292  /// to introduce the same selectors repeatedly.
294  SourceLocation> > &Sels) override;
295 
296  /// Read the set of weak, undeclared identifiers known to the
297  /// external Sema source.
298  ///
299  /// The external source should append its own weak, undeclared identifiers to
300  /// the given vector. Note that this routine may be invoked multiple times;
301  /// the external source should take care not to introduce the same identifiers
302  /// repeatedly.
304  SmallVectorImpl<std::pair<IdentifierInfo*, WeakInfo> > &WI) override;
305 
306  /// Read the set of used vtables known to the external Sema source.
307  ///
308  /// The external source should append its own used vtables to the given
309  /// vector. Note that this routine may be invoked multiple times; the external
310  /// source should take care not to introduce the same vtables repeatedly.
311  void ReadUsedVTables(SmallVectorImpl<ExternalVTableUse> &VTables) override;
312 
313  /// Read the set of pending instantiations known to the external
314  /// Sema source.
315  ///
316  /// The external source should append its own pending instantiations to the
317  /// given vector. Note that this routine may be invoked multiple times; the
318  /// external source should take care not to introduce the same instantiations
319  /// repeatedly.
321  SmallVectorImpl<std::pair<ValueDecl*, SourceLocation> >& Pending) override;
322 
323  /// Read the set of late parsed template functions for this source.
324  ///
325  /// The external source should insert its own late parsed template functions
326  /// into the map. Note that this routine may be invoked multiple times; the
327  /// external source should take care not to introduce the same map entries
328  /// repeatedly.
330  llvm::MapVector<const FunctionDecl *, std::unique_ptr<LateParsedTemplate>>
331  &LPTMap) override;
332 
333  /// Read the set of decls to be checked for deferred diags.
334  ///
335  /// The external source should append its own potentially emitted function
336  /// and variable decls which may cause deferred diags. Note that this routine
337  /// may be invoked multiple times; the external source should take care not to
338  /// introduce the same declarations repeatedly.
340  llvm::SmallSetVector<Decl *, 4> &Decls) override;
341 
342  /// \copydoc ExternalSemaSource::CorrectTypo
343  /// \note Returns the first nonempty correction.
345  int LookupKind, Scope *S, CXXScopeSpec *SS,
347  DeclContext *MemberContext,
348  bool EnteringContext,
349  const ObjCObjectPointerType *OPT) override;
350 
351  /// Produces a diagnostic note if one of the attached sources
352  /// contains a complete definition for \p T. Queries the sources in list
353  /// order until the first one claims that a diagnostic was produced.
354  ///
355  /// \param Loc the location at which a complete type was required but not
356  /// provided
357  ///
358  /// \param T the \c QualType that should have been complete at \p Loc
359  ///
360  /// \return true if a diagnostic was produced, false otherwise.
362  QualType T) override;
363 
364  /// LLVM-style RTTI.
365  /// \{
366  bool isA(const void *ClassID) const override {
367  return ClassID == &ID || ExternalSemaSource::isA(ClassID);
368  }
369  static bool classof(const ExternalASTSource *S) { return S->isA(&ID); }
370  /// \}
371 };
372 
373 } // end namespace clang
374 
375 #endif
clang::ObjCInterfaceDecl
Represents an ObjC class declaration.
Definition: DeclObjC.h:1148
clang::MultiplexExternalSemaSource::FinishedDeserializing
void FinishedDeserializing() override
Notify ExternalASTSource that we finished the deserialization of a decl or type.
Definition: MultiplexExternalSemaSource.cpp:152
Weak.h
clang::MultiplexExternalSemaSource::GetExternalCXXCtorInitializers
CXXCtorInitializer ** GetExternalCXXCtorInitializers(uint64_t Offset) override
Resolve a handle to a list of ctor initializers into the list of initializers themselves.
Definition: MultiplexExternalSemaSource.cpp:88
clang::DeclaratorContext::File
@ File
clang::DeclContext
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Definition: DeclBase.h:1347
clang::TypoCorrection
Simple class containing the result of Sema::CorrectTypo.
Definition: TypoCorrection.h:42
clang::MultiplexExternalSemaSource::ReadTentativeDefinitions
void ReadTentativeDefinitions(SmallVectorImpl< VarDecl * > &Defs) override
Read the set of tentative definitions known to the external Sema source.
Definition: MultiplexExternalSemaSource.cpp:246
llvm::SmallVector
Definition: LLVM.h:38
clang::SourceLocation
Encodes a location in the source.
Definition: SourceLocation.h:88
clang::MultiplexExternalSemaSource::ReadMismatchingDeleteExpressions
void ReadMismatchingDeleteExpressions(llvm::MapVector< FieldDecl *, llvm::SmallVector< std::pair< SourceLocation, bool >, 4 >> &Exprs) override
Definition: MultiplexExternalSemaSource.cpp:231
clang::QualType
A (possibly-)qualified type.
Definition: Type.h:673
clang::MultiplexExternalSemaSource::ForgetSema
void ForgetSema() override
Inform the semantic consumer that Sema is no longer available.
Definition: MultiplexExternalSemaSource.cpp:204
clang::FieldDecl
Represents a member of a struct/union/class.
Definition: Decl.h:2835
clang::MultiplexExternalSemaSource::ReadKnownNamespaces
void ReadKnownNamespaces(SmallVectorImpl< NamespaceDecl * > &Namespaces) override
Load the set of namespaces that are known to the external source, which will be used during typo corr...
Definition: MultiplexExternalSemaSource.cpp:219
clang::MultiplexExternalSemaSource::layoutRecordType
bool layoutRecordType(const RecordDecl *Record, uint64_t &Size, uint64_t &Alignment, llvm::DenseMap< const FieldDecl *, uint64_t > &FieldOffsets, llvm::DenseMap< const CXXRecordDecl *, CharUnits > &BaseOffsets, llvm::DenseMap< const CXXRecordDecl *, CharUnits > &VirtualBaseOffsets) override
Perform layout on the given record.
Definition: MultiplexExternalSemaSource.cpp:174
clang::LookupResult
Represents the results of name lookup.
Definition: Lookup.h:46
clang::MultiplexExternalSemaSource::ReadUnusedFileScopedDecls
void ReadUnusedFileScopedDecls(SmallVectorImpl< const DeclaratorDecl * > &Decls) override
Read the set of unused file-scope declarations known to the external Sema source.
Definition: MultiplexExternalSemaSource.cpp:252
clang::MultiplexExternalSemaSource::isA
bool isA(const void *ClassID) const override
LLVM-style RTTI.
Definition: MultiplexExternalSemaSource.h:366
clang::MultiplexExternalSemaSource::completeVisibleDeclsMap
void completeVisibleDeclsMap(const DeclContext *DC) override
Ensures that the table of all visible declarations inside this context is up to date.
Definition: MultiplexExternalSemaSource.cpp:112
clang::CXXScopeSpec
Represents a C++ nested-name-specifier or a global scope specifier.
Definition: DeclSpec.h:64
clang::MultiplexExternalSemaSource::getModule
Module * getModule(unsigned ID) override
Retrieve the module that corresponds to the given module ID.
Definition: MultiplexExternalSemaSource.cpp:167
clang::DeclarationName
The name of a declaration.
Definition: DeclarationName.h:145
clang::MultiplexExternalSemaSource::CompleteType
void CompleteType(TagDecl *Tag) override
Gives the external AST source an opportunity to complete an incomplete type.
Definition: MultiplexExternalSemaSource.cpp:132
Offset
unsigned Offset
Definition: Format.cpp:2335
clang::Decl::Kind
Kind
Lists the kind of concrete classes of Decl.
Definition: DeclBase.h:92
clang::MultiplexExternalSemaSource::ReadComments
void ReadComments() override
Loads comment ranges.
Definition: MultiplexExternalSemaSource.cpp:142
clang::MultiplexExternalSemaSource::StartTranslationUnit
void StartTranslationUnit(ASTConsumer *Consumer) override
Function that will be invoked when we begin parsing a new translation unit involving this external AS...
Definition: MultiplexExternalSemaSource.cpp:157
clang::MultiplexExternalSemaSource::CompleteRedeclChain
void CompleteRedeclChain(const Decl *D) override
Complete the redeclaration chain if it's been extended since the previous generation of the AST sourc...
Definition: MultiplexExternalSemaSource.cpp:50
clang::MultiplexExternalSemaSource::GetExternalSelector
Selector GetExternalSelector(uint32_t ID) override
Resolve a selector ID into a selector.
Definition: MultiplexExternalSemaSource.cpp:55
clang::Module
Describes a module or submodule.
Definition: Module.h:96
clang::MultiplexExternalSemaSource::FindExternalVisibleDeclsByName
bool FindExternalVisibleDeclsByName(const DeclContext *DC, DeclarationName Name) override
Find all declarations with the given name in the given context.
Definition: MultiplexExternalSemaSource.cpp:105
clang::MultiplexExternalSemaSource::addSource
void addSource(ExternalSemaSource &source)
Appends new source to the source list.
Definition: MultiplexExternalSemaSource.cpp:35
clang::Scope
Scope - A scope is a transient data structure that is used while parsing the program.
Definition: Scope.h:40
clang::MultiplexExternalSemaSource::ReadLateParsedTemplates
void ReadLateParsedTemplates(llvm::MapVector< const FunctionDecl *, std::unique_ptr< LateParsedTemplate >> &LPTMap) override
Read the set of late parsed template functions for this source.
Definition: MultiplexExternalSemaSource.cpp:307
clang::ExternalASTSource::MemoryBufferSizes
Definition: ExternalASTSource.h:278
clang::ASTConsumer
ASTConsumer - This is an abstract interface that should be implemented by clients that read ASTs.
Definition: ASTConsumer.h:33
clang::ExternalSemaSource
An abstract interface that should be implemented by external AST sources that also provide informatio...
Definition: ExternalSemaSource.h:52
clang::MultiplexExternalSemaSource
An abstract interface that should be implemented by external AST sources that also provide informatio...
Definition: MultiplexExternalSemaSource.h:38
clang::MultiplexExternalSemaSource::InitializeSema
void InitializeSema(Sema &S) override
Initialize the semantic source with the Sema instance being used to perform semantic analysis on the ...
Definition: MultiplexExternalSemaSource.cpp:199
clang::MultiplexExternalSemaSource::GetExternalDeclStmt
Stmt * GetExternalDeclStmt(uint64_t Offset) override
Resolve the offset of a statement in the decl stream into a statement.
Definition: MultiplexExternalSemaSource.cpp:72
clang::MultiplexExternalSemaSource::MaybeDiagnoseMissingCompleteType
bool MaybeDiagnoseMissingCompleteType(SourceLocation Loc, QualType T) override
Produces a diagnostic note if one of the attached sources contains a complete definition for T.
Definition: MultiplexExternalSemaSource.cpp:330
clang::TagDecl
Represents the declaration of a struct/union/class/enum.
Definition: Decl.h:3328
clang::MultiplexExternalSemaSource::ReadDeclsToCheckForDeferredDiags
void ReadDeclsToCheckForDeferredDiags(llvm::SmallSetVector< Decl *, 4 > &Decls) override
Read the set of decls to be checked for deferred diags.
Definition: MultiplexExternalSemaSource.cpp:270
clang::MultiplexExternalSemaSource::ReadDelegatingConstructors
void ReadDelegatingConstructors(SmallVectorImpl< CXXConstructorDecl * > &Decls) override
Read the set of delegating constructors known to the external Sema source.
Definition: MultiplexExternalSemaSource.cpp:258
clang::MultiplexExternalSemaSource::hasExternalDefinitions
ExtKind hasExternalDefinitions(const Decl *D) override
Definition: MultiplexExternalSemaSource.cpp:96
clang::MultiplexExternalSemaSource::ReadMethodPool
void ReadMethodPool(Selector Sel) override
Load the contents of the global method pool for a given selector.
Definition: MultiplexExternalSemaSource.cpp:209
clang::MultiplexExternalSemaSource::CorrectTypo
TypoCorrection CorrectTypo(const DeclarationNameInfo &Typo, int LookupKind, Scope *S, CXXScopeSpec *SS, CorrectionCandidateCallback &CCC, DeclContext *MemberContext, bool EnteringContext, const ObjCObjectPointerType *OPT) override
Try to "correct" a typo in the source code by finding visible declarations whose names are similar to...
Definition: MultiplexExternalSemaSource.cpp:314
clang::ExternalASTSource::getMemoryBufferSizes
MemoryBufferSizes getMemoryBufferSizes() const
Return the amount of memory used by memory buffers, breaking down by heap-backed versus mmap'ed memor...
Definition: ExternalASTSource.h:288
clang::ObjCObjectPointerType
Represents a pointer to an Objective C object.
Definition: Type.h:6073
clang::CXXRecordDecl
Represents a C++ struct/union/class.
Definition: DeclCXX.h:255
clang::MultiplexExternalSemaSource::StartedDeserializing
void StartedDeserializing() override
Notify ExternalASTSource that we started deserialization of a decl or type so until FinishedDeseriali...
Definition: MultiplexExternalSemaSource.cpp:147
ExternalSemaSource.h
clang::MultiplexExternalSemaSource::FindExternalLexicalDecls
void FindExternalLexicalDecls(const DeclContext *DC, llvm::function_ref< bool(Decl::Kind)> IsKindWeWant, SmallVectorImpl< Decl * > &Result) override
Finds all declarations lexically contained within the given DeclContext, after applying an optional f...
Definition: MultiplexExternalSemaSource.cpp:117
clang::ExternalASTSource::ExtKind
ExtKind
Definition: ExternalASTSource.h:165
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:89
clang::MultiplexExternalSemaSource::LookupUnqualified
bool LookupUnqualified(LookupResult &R, Scope *S) override
Do last resort, unqualified lookup on a LookupResult that Sema cannot find.
Definition: MultiplexExternalSemaSource.cpp:239
clang::MultiplexExternalSemaSource::ReadUsedVTables
void ReadUsedVTables(SmallVectorImpl< ExternalVTableUse > &VTables) override
Read the set of used vtables known to the external Sema source.
Definition: MultiplexExternalSemaSource.cpp:294
clang::Sema
Sema - This implements semantic analysis and AST building for C.
Definition: Sema.h:355
clang::MultiplexExternalSemaSource::classof
static bool classof(const ExternalASTSource *S)
Definition: MultiplexExternalSemaSource.h:369
clang::MultiplexExternalSemaSource::ReadUnusedLocalTypedefNameCandidates
void ReadUnusedLocalTypedefNameCandidates(llvm::SmallSetVector< const TypedefNameDecl *, 4 > &Decls) override
Read the set of potentially unused typedefs known to the source.
Definition: MultiplexExternalSemaSource.cpp:276
clang::MultiplexExternalSemaSource::FindFileRegionDecls
void FindFileRegionDecls(FileID File, unsigned Offset, unsigned Length, SmallVectorImpl< Decl * > &Decls) override
Get the decls that are contained in a file in the Offset/Length range.
Definition: MultiplexExternalSemaSource.cpp:124
clang::MultiplexExternalSemaSource::ReadReferencedSelectors
void ReadReferencedSelectors(SmallVectorImpl< std::pair< Selector, SourceLocation > > &Sels) override
Read the set of referenced selectors known to the external Sema source.
Definition: MultiplexExternalSemaSource.cpp:282
clang
Definition: CalledOnceCheck.h:17
clang::Selector
Smart pointer class that efficiently represents Objective-C method names.
Definition: IdentifierTable.h:720
clang::MultiplexExternalSemaSource::~MultiplexExternalSemaSource
~MultiplexExternalSemaSource() override
Definition: MultiplexExternalSemaSource.cpp:29
clang::Stmt
Stmt - This represents one statement.
Definition: Stmt.h:68
clang::MultiplexExternalSemaSource::GetExternalCXXBaseSpecifiers
CXXBaseSpecifier * GetExternalCXXBaseSpecifiers(uint64_t Offset) override
Resolve the offset of a set of C++ base specifiers in the decl stream into an array of specifiers.
Definition: MultiplexExternalSemaSource.cpp:79
clang::MultiplexExternalSemaSource::ReadWeakUndeclaredIdentifiers
void ReadWeakUndeclaredIdentifiers(SmallVectorImpl< std::pair< IdentifierInfo *, WeakInfo > > &WI) override
Read the set of weak, undeclared identifiers known to the external Sema source.
Definition: MultiplexExternalSemaSource.cpp:288
clang::FileID
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
Definition: SourceLocation.h:40
clang::CXXBaseSpecifier
Represents a base class of a C++ class.
Definition: DeclCXX.h:147
clang::CorrectionCandidateCallback
Base class for callback objects used by Sema::CorrectTypo to check the validity of a potential typo c...
Definition: TypoCorrection.h:281
clang::MultiplexExternalSemaSource::ReadExtVectorDecls
void ReadExtVectorDecls(SmallVectorImpl< TypedefNameDecl * > &Decls) override
Read the set of ext_vector type declarations known to the external Sema source.
Definition: MultiplexExternalSemaSource.cpp:264
clang::MultiplexExternalSemaSource::GetExternalDecl
Decl * GetExternalDecl(uint32_t ID) override
Resolve a declaration ID into a declaration, potentially building a new declaration.
Definition: MultiplexExternalSemaSource.cpp:43
clang::MultiplexExternalSemaSource::MultiplexExternalSemaSource
MultiplexExternalSemaSource(ExternalSemaSource &s1, ExternalSemaSource &s2)
Constructs a new multiplexing external sema source and appends the given element to it.
Definition: MultiplexExternalSemaSource.cpp:22
clang::CharUnits
CharUnits - This is an opaque type for sizes expressed in character units.
Definition: CharUnits.h:38
llvm::SmallVectorImpl
Definition: LLVM.h:39
clang::ExternalSemaSource::isA
bool isA(const void *ClassID) const override
LLVM-style RTTI.
Definition: ExternalSemaSource.h:237
llvm::SmallSetVector
Definition: ExternalSemaSource.h:23
clang::CXXCtorInitializer
Represents a C++ base or member initializer.
Definition: DeclCXX.h:2172
clang::ExternalASTSource
Abstract interface for external sources of AST nodes.
Definition: ExternalASTSource.h:60
clang::MultiplexExternalSemaSource::updateOutOfDateSelector
void updateOutOfDateSelector(Selector Sel) override
Load the contents of the global method pool for a given selector if necessary.
Definition: MultiplexExternalSemaSource.cpp:214
clang::DeclarationNameInfo
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
Definition: DeclarationName.h:758
clang::FunctionDecl
Represents a function declaration or definition.
Definition: Decl.h:1856
clang::RecordDecl
Represents a struct/union/class.
Definition: Decl.h:3859
clang::MultiplexExternalSemaSource::GetNumExternalSelectors
uint32_t GetNumExternalSelectors() override
Returns the number of selectors known to the external AST source.
Definition: MultiplexExternalSemaSource.cpp:65
clang::MultiplexExternalSemaSource::PrintStats
void PrintStats() override
Print any statistics that have been gathered regarding the external AST source.
Definition: MultiplexExternalSemaSource.cpp:162
clang::MultiplexExternalSemaSource::ReadPendingInstantiations
void ReadPendingInstantiations(SmallVectorImpl< std::pair< ValueDecl *, SourceLocation > > &Pending) override
Read the set of pending instantiations known to the external Sema source.
Definition: MultiplexExternalSemaSource.cpp:300
clang::MultiplexExternalSemaSource::ReadUndefinedButUsed
void ReadUndefinedButUsed(llvm::MapVector< NamedDecl *, SourceLocation > &Undefined) override
Load the set of used but not defined functions or variables with internal linkage,...
Definition: MultiplexExternalSemaSource.cpp:225