clang: include/clang/Sema/ExternalSemaSource.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12#ifndef LLVM_CLANG_SEMA_EXTERNALSEMASOURCE_H
13#define LLVM_CLANG_SEMA_EXTERNALSEMASOURCE_H
14
19#include "llvm/ADT/MapVector.h"
20#include
21
22namespace llvm {
24}
25
27
28class CXXConstructorDecl;
29class CXXRecordDecl;
30class DeclaratorDecl;
31class LookupResult;
32class Scope;
33class Sema;
34class TypedefNameDecl;
35class ValueDecl;
36class VarDecl;
37struct LateParsedTemplate;
38
39
40
45};
46
47
48
49
51
52 static char ID;
53
54public:
56
58
59
60
61
63
64
66
67
68
70
71
72
74
75
76
79
80
81
82 virtual void
83 ReadUndefinedButUsed(llvm::MapVector<NamedDecl *, SourceLocation> &Undefined);
84
87
88
89
90
91
92
93
94
95
97
98
99
100
101
102
103
104
107
108
109
110
111
112
113
114
117
118
119
120
121
122
123
124
127
128
129
130
131
132
133
134
136
137
138
139
140
141
142
145
146
147
148
149
150
151
152
154 SmallVectorImpl<std::pair<Selector, SourceLocation> > &Sels) {}
155
156
157
158
159
160
161
162
164 SmallVectorImpl<std::pair<IdentifierInfo *, WeakInfo> > &WI) {}
165
166
167
168
169
170
172
173
174
175
176
177
178
179
183
184
185
186
187
188
189
191 llvm::MapVector<const FunctionDecl *, std::unique_ptr>
192 &LPTMap) {}
193
194
195
196
197
198
199
200 virtual void
202
203
204
205
206
207
208
209
214 bool EnteringContext,
217 }
218
219
220
221
222
223
224
225
226
227
230 return false;
231 }
232
233
234
235
237
238
239
240 bool isA(const void *ClassID) const override {
242 }
244
245};
246
247}
248
249#endif
C Language Family Type Representation.
Represents a C++ struct/union/class.
Represents a C++ nested-name-specifier or a global scope specifier.
Base class for callback objects used by Sema::CorrectTypo to check the validity of a potential typo c...
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Abstract interface for external sources of AST nodes.
virtual bool isA(const void *ClassID) const
LLVM-style RTTI.
An abstract interface that should be implemented by external AST sources that also provide informatio...
virtual void updateOutOfDateSelector(Selector Sel)
Load the contents of the global method pool for a given selector if necessary.
virtual void ReadMethodPool(Selector Sel)
Load the contents of the global method pool for a given selector.
virtual void ReadUndefinedButUsed(llvm::MapVector< NamedDecl *, SourceLocation > &Undefined)
Load the set of used but not defined functions or variables with internal linkage,...
virtual TypoCorrection CorrectTypo(const DeclarationNameInfo &Typo, int LookupKind, Scope *S, CXXScopeSpec *SS, CorrectionCandidateCallback &CCC, DeclContext *MemberContext, bool EnteringContext, const ObjCObjectPointerType *OPT)
Try to "correct" a typo in the source code by finding visible declarations whose names are similar to...
virtual void ReadTentativeDefinitions(SmallVectorImpl< VarDecl * > &TentativeDefs)
Read the set of tentative definitions known to the external Sema source.
virtual void InitializeSema(Sema &S)
Initialize the semantic source with the Sema instance being used to perform semantic analysis on the ...
bool isA(const void *ClassID) const override
LLVM-style RTTI.
virtual void ReadUsedVTables(SmallVectorImpl< ExternalVTableUse > &VTables)
Read the set of used vtables known to the external Sema source.
~ExternalSemaSource() override
virtual void ReadUnusedFileScopedDecls(SmallVectorImpl< const DeclaratorDecl * > &Decls)
Read the set of unused file-scope declarations known to the external Sema source.
static bool classof(const ExternalASTSource *S)
virtual bool LookupUnqualified(LookupResult &R, Scope *S)
Do last resort, unqualified lookup on a LookupResult that Sema cannot find.
virtual void ReadKnownNamespaces(SmallVectorImpl< NamespaceDecl * > &Namespaces)
Load the set of namespaces that are known to the external source, which will be used during typo corr...
virtual bool MaybeDiagnoseMissingCompleteType(SourceLocation Loc, QualType T)
Produces a diagnostic note if the external source contains a complete definition for T.
ExternalSemaSource()=default
virtual void ReadWeakUndeclaredIdentifiers(SmallVectorImpl< std::pair< IdentifierInfo *, WeakInfo > > &WI)
Read the set of weak, undeclared identifiers known to the external Sema source.
virtual void ReadLateParsedTemplates(llvm::MapVector< const FunctionDecl *, std::unique_ptr< LateParsedTemplate > > &LPTMap)
Read the set of late parsed template functions for this source.
virtual void ReadExtVectorDecls(SmallVectorImpl< TypedefNameDecl * > &Decls)
Read the set of ext_vector type declarations known to the external Sema source.
virtual void ReadDeclsToCheckForDeferredDiags(llvm::SmallSetVector< Decl *, 4 > &Decls)
Read the set of decls to be checked for deferred diags.
virtual void ReadUnusedLocalTypedefNameCandidates(llvm::SmallSetVector< const TypedefNameDecl *, 4 > &Decls)
Read the set of potentially unused typedefs known to the source.
virtual void AssignedLambdaNumbering(CXXRecordDecl *Lambda)
Notify the external source that a lambda was assigned a mangling number.
virtual void ReadDelegatingConstructors(SmallVectorImpl< CXXConstructorDecl * > &Decls)
Read the set of delegating constructors known to the external Sema source.
virtual void ReadMismatchingDeleteExpressions(llvm::MapVector< FieldDecl *, llvm::SmallVector< std::pair< SourceLocation, bool >, 4 > > &)
virtual void ForgetSema()
Inform the semantic consumer that Sema is no longer available.
virtual void ReadPendingInstantiations(SmallVectorImpl< std::pair< ValueDecl *, SourceLocation > > &Pending)
Read the set of pending instantiations known to the external Sema source.
virtual void ReadReferencedSelectors(SmallVectorImpl< std::pair< Selector, SourceLocation > > &Sels)
Read the set of referenced selectors known to the external Sema source.
Represents a member of a struct/union/class.
Represents a function declaration or definition.
Represents the results of name lookup.
Represents a pointer to an Objective C object.
A (possibly-)qualified type.
Scope - A scope is a transient data structure that is used while parsing the program.
Smart pointer class that efficiently represents Objective-C method names.
Sema - This implements semantic analysis and AST building for C.
Encodes a location in the source.
Simple class containing the result of Sema::CorrectTypo.
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
The JSON file list parser is used to communicate input to InstallAPI.
const FunctionProtoType * T
Diagnostic wrappers for TextAPI types for error reporting.
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...
A simple structure that captures a vtable use for the purposes of the ExternalSemaSource.