19 #include "llvm/ADT/StringExtras.h"
21 using namespace clang;
41 case BuiltinType::WChar_S:
60 case BuiltinType::ARCUnbridgedCast:
73 case BuiltinType::BuiltinFn:
86 for (
unsigned I = 0; I != N; ++I)
88 R = llvm::HashString(II->getName(), R);
96 case Decl::TranslationUnit:
97 case Decl::ExternCContext:
99 case Decl::LinkageSpec:
111 case Decl::CXXRecord:
112 case Decl::ClassTemplateSpecialization:
113 case Decl::ClassTemplatePartialSpecialization:
118 case Decl::CXXMethod:
119 case Decl::CXXConstructor:
120 case Decl::CXXDestructor:
121 case Decl::CXXConversion:
122 case Decl::ObjCMethod:
127 case Decl::ObjCCategory:
128 case Decl::ObjCCategoryImpl:
129 case Decl::ObjCImplementation:
132 case Decl::ObjCProtocol:
141 case Decl::ObjCInterface:
145 llvm_unreachable(
"Unhandled DeclContext in AST reader");
148 llvm_unreachable(
"Unhandled decl kind");
152 switch (static_cast<Decl::Kind>(Kind)) {
153 case Decl::TranslationUnit:
154 case Decl::ExternCContext:
158 case Decl::Namespace:
159 case Decl::NamespaceAlias:
161 case Decl::TypeAlias:
164 case Decl::CXXRecord:
165 case Decl::ClassTemplateSpecialization:
166 case Decl::ClassTemplatePartialSpecialization:
167 case Decl::VarTemplateSpecialization:
168 case Decl::VarTemplatePartialSpecialization:
170 case Decl::CXXMethod:
171 case Decl::CXXConstructor:
172 case Decl::CXXDestructor:
173 case Decl::CXXConversion:
174 case Decl::UsingShadow:
176 case Decl::FunctionTemplate:
177 case Decl::ClassTemplate:
178 case Decl::VarTemplate:
179 case Decl::TypeAliasTemplate:
180 case Decl::ObjCProtocol:
181 case Decl::ObjCInterface:
186 case Decl::UsingDirective:
188 case Decl::UnresolvedUsingTypename:
189 case Decl::TemplateTypeParm:
190 case Decl::EnumConstant:
191 case Decl::UnresolvedUsingValue:
192 case Decl::IndirectField:
194 case Decl::MSProperty:
196 case Decl::ObjCAtDefsField:
197 case Decl::NonTypeTemplateParm:
198 case Decl::TemplateTemplateParm:
200 case Decl::ObjCMethod:
201 case Decl::ObjCCategory:
202 case Decl::ObjCCategoryImpl:
203 case Decl::ObjCImplementation:
204 case Decl::ObjCProperty:
205 case Decl::ObjCCompatibleAlias:
206 case Decl::LinkageSpec:
207 case Decl::ObjCPropertyImpl:
208 case Decl::FileScopeAsm:
209 case Decl::AccessSpec:
211 case Decl::FriendTemplate:
212 case Decl::StaticAssert:
215 case Decl::ClassScopeFunctionSpecialization:
217 case Decl::OMPThreadPrivate:
222 case Decl::ImplicitParam:
224 case Decl::ObjCTypeParam:
228 llvm_unreachable(
"Unhandled declaration kind");
242 if (
auto *FD = dyn_cast<FunctionDecl>(D))
243 return !FD->getDescribedFunctionTemplate();
244 if (
auto *RD = dyn_cast<CXXRecordDecl>(D))
245 return !RD->getDescribedClassTemplate();
252 return isa<TagDecl>(D) || isa<FieldDecl>(D);
Smart pointer class that efficiently represents Objective-C method names.
bool isRedeclarableDeclKind(unsigned Kind)
Determine whether the given declaration kind is redeclarable.
The (signed) 'long long' type.
The 'bool' or '_Bool' type.
The 'unknown any' placeholder type.
The placeholder type for builtin functions.
bool isDependentContext() const
Determines whether this context is dependent on a template parameter.
ARC's unbridged-cast placeholder type.
const DeclContext * getDefinitiveDeclContext(const DeclContext *DC)
Retrieve the "definitive" declaration that provides all of the visible entries for the given declarat...
IdentifierInfo * getIdentifierInfoForSlot(unsigned argIndex) const
Retrieve the identifier at a given position in the selector.
The 'char' type, when it is signed.
The 'unsigned long' type.
OpenCL 1d image buffer type.
ObjCProtocolDecl * getDefinition()
Retrieve the definition of this protocol, if any.
The 'unsigned short' type.
Represents an Objective-C protocol declaration.
DeclContext * getLexicalDeclContext()
ID
Defines the set of possible language-specific address spaces.
The 'char' type, when it is unsigned.
unsigned getNumArgs() const
The placeholder type for overloaded function sets.
The OpenCL 'half' / ARM NEON __fp16 type.
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
DeclarationName getDeclName() const
TagDecl * getDefinition() const
The placeholder type for bound member functions.
The 'unsigned long long' type.
TagDecl - Represents the declaration of a struct/union/class/enum.
The 'unsigned char' type.
The (signed) 'long' type.
The (signed) 'short' type.
TypeIdx TypeIdxFromBuiltin(const BuiltinType *BT)
unsigned ComputeHash(Selector Sel)
The placeholder type for dependent types.
OpenCL 2d image array type.
Decl::Kind getDeclKind() const
FriendObjectKind getFriendObjectKind() const
Determines whether this declaration is the object of a friend declaration and, if so...
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
bool needsAnonymousDeclarationNumber(const NamedDecl *D)
Determine whether the given declaration needs an anonymous declaration number.
OpenCL 1d image array type.
virtual ~ASTDeserializationListener()
A type index; the type ID with the qualifier bits removed.
The pseudo-object placeholder type.