ASTContext.h revision fa23c1d9adc99c662c1c0e192817185809d95614
1//===--- ASTContext.h - Context to hold long-lived AST nodes ----*- 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 ASTContext interface. 11// 12//===----------------------------------------------------------------------===// 13 14#ifndef LLVM_CLANG_AST_ASTCONTEXT_H 15#define LLVM_CLANG_AST_ASTCONTEXT_H 16 17#include "clang/Basic/IdentifierTable.h" 18#include "clang/Basic/LangOptions.h" 19#include "clang/AST/Builtins.h" 20#include "clang/AST/DeclarationName.h" 21#include "clang/AST/DeclBase.h" 22#include "clang/AST/Type.h" 23#include "clang/Basic/SourceLocation.h" 24#include "llvm/ADT/DenseMap.h" 25#include "llvm/ADT/FoldingSet.h" 26#include "llvm/Bitcode/SerializationFwd.h" 27#include "llvm/Support/Allocator.h" 28#include <vector> 29 30namespace llvm { 31 struct fltSemantics; 32} 33 34namespace clang { 35 class ASTRecordLayout; 36 class Expr; 37 class IdentifierTable; 38 class SelectorTable; 39 class SourceManager; 40 class TargetInfo; 41 // Decls 42 class Decl; 43 class ObjCPropertyDecl; 44 class RecordDecl; 45 class TagDecl; 46 class TranslationUnitDecl; 47 class TypeDecl; 48 class TypedefDecl; 49 class TemplateTypeParmDecl; 50 class FieldDecl; 51 class ObjCIvarRefExpr; 52 class ObjCIvarDecl; 53 54/// ASTContext - This class holds long-lived AST nodes (such as types and 55/// decls) that can be referred to throughout the semantic analysis of a file. 56class ASTContext { 57 std::vector<Type*> Types; 58 llvm::FoldingSet<ASQualType> ASQualTypes; 59 llvm::FoldingSet<ComplexType> ComplexTypes; 60 llvm::FoldingSet<PointerType> PointerTypes; 61 llvm::FoldingSet<BlockPointerType> BlockPointerTypes; 62 llvm::FoldingSet<ReferenceType> ReferenceTypes; 63 llvm::FoldingSet<ConstantArrayType> ConstantArrayTypes; 64 llvm::FoldingSet<IncompleteArrayType> IncompleteArrayTypes; 65 std::vector<VariableArrayType*> VariableArrayTypes; 66 std::vector<DependentSizedArrayType*> DependentSizedArrayTypes; 67 llvm::FoldingSet<VectorType> VectorTypes; 68 llvm::FoldingSet<FunctionTypeNoProto> FunctionTypeNoProtos; 69 llvm::FoldingSet<FunctionTypeProto> FunctionTypeProtos; 70 llvm::FoldingSet<ObjCQualifiedInterfaceType> ObjCQualifiedInterfaceTypes; 71 llvm::FoldingSet<ObjCQualifiedIdType> ObjCQualifiedIdTypes; 72 /// ASTRecordLayouts - A cache mapping from RecordDecls to ASTRecordLayouts. 73 /// This is lazily created. This is intentionally not serialized. 74 llvm::DenseMap<const RecordDecl*, const ASTRecordLayout*> ASTRecordLayouts; 75 llvm::DenseMap<const ObjCInterfaceDecl*, 76 const ASTRecordLayout*> ASTObjCInterfaces; 77 78 llvm::DenseMap<const ObjCInterfaceDecl*, 79 const RecordDecl*> ASTRecordForInterface; 80 llvm::DenseMap<const ObjCIvarRefExpr*, const FieldDecl*> ASTFieldForIvarRef; 81 82 /// BuiltinVaListType - built-in va list type. 83 /// This is initially null and set by Sema::LazilyCreateBuiltin when 84 /// a builtin that takes a valist is encountered. 85 QualType BuiltinVaListType; 86 87 /// ObjCIdType - a pseudo built-in typedef type (set by Sema). 88 QualType ObjCIdType; 89 const RecordType *IdStructType; 90 91 /// ObjCSelType - another pseudo built-in typedef type (set by Sema). 92 QualType ObjCSelType; 93 const RecordType *SelStructType; 94 95 /// ObjCProtoType - another pseudo built-in typedef type (set by Sema). 96 QualType ObjCProtoType; 97 const RecordType *ProtoStructType; 98 99 /// ObjCClassType - another pseudo built-in typedef type (set by Sema). 100 QualType ObjCClassType; 101 const RecordType *ClassStructType; 102 103 QualType ObjCConstantStringType; 104 RecordDecl *CFConstantStringTypeDecl; 105 106 RecordDecl *ObjCFastEnumerationStateTypeDecl; 107 108 TranslationUnitDecl *TUDecl; 109 110 /// SourceMgr - The associated SourceManager object. 111 SourceManager &SourceMgr; 112 113 /// LangOpts - The language options used to create the AST associated with 114 /// this ASTContext object. 115 LangOptions LangOpts; 116 117 /// Allocator - The allocator object used to create AST objects. 118 llvm::MallocAllocator Allocator; 119 120public: 121 TargetInfo &Target; 122 IdentifierTable &Idents; 123 SelectorTable &Selectors; 124 DeclarationNameTable DeclarationNames; 125 126 SourceManager& getSourceManager() { return SourceMgr; } 127 llvm::MallocAllocator &getAllocator() { return Allocator; } 128 const LangOptions& getLangOptions() const { return LangOpts; } 129 130 FullSourceLoc getFullLoc(SourceLocation Loc) const { 131 return FullSourceLoc(Loc,SourceMgr); 132 } 133 134 TranslationUnitDecl *getTranslationUnitDecl() const { return TUDecl; } 135 136 /// This is intentionally not serialized. It is populated by the 137 /// ASTContext ctor, and there are no external pointers/references to 138 /// internal variables of BuiltinInfo. 139 Builtin::Context BuiltinInfo; 140 141 // Builtin Types. 142 QualType VoidTy; 143 QualType BoolTy; 144 QualType CharTy; 145 QualType WCharTy; // [C++ 3.9.1p5] 146 QualType SignedCharTy, ShortTy, IntTy, LongTy, LongLongTy; 147 QualType UnsignedCharTy, UnsignedShortTy, UnsignedIntTy, UnsignedLongTy; 148 QualType UnsignedLongLongTy; 149 QualType FloatTy, DoubleTy, LongDoubleTy; 150 QualType FloatComplexTy, DoubleComplexTy, LongDoubleComplexTy; 151 QualType VoidPtrTy; 152 QualType OverloadTy; 153 QualType DependentTy; 154 155 ASTContext(const LangOptions& LOpts, SourceManager &SM, TargetInfo &t, 156 IdentifierTable &idents, SelectorTable &sels, 157 unsigned size_reserve=0); 158 159 ~ASTContext(); 160 161 void PrintStats() const; 162 const std::vector<Type*>& getTypes() const { return Types; } 163 164 //===--------------------------------------------------------------------===// 165 // Type Constructors 166 //===--------------------------------------------------------------------===// 167 168 /// getASQualType - Return the uniqued reference to the type for an address 169 /// space qualified type with the specified type and address space. The 170 /// resulting type has a union of the qualifiers from T and the address space. 171 // If T already has an address space specifier, it is silently replaced. 172 QualType getASQualType(QualType T, unsigned AddressSpace); 173 174 /// getComplexType - Return the uniqued reference to the type for a complex 175 /// number with the specified element type. 176 QualType getComplexType(QualType T); 177 178 /// getPointerType - Return the uniqued reference to the type for a pointer to 179 /// the specified type. 180 QualType getPointerType(QualType T); 181 182 /// getBlockPointerType - Return the uniqued reference to the type for a block 183 /// of the specified type. 184 QualType getBlockPointerType(QualType T); 185 186 /// getReferenceType - Return the uniqued reference to the type for a 187 /// reference to the specified type. 188 QualType getReferenceType(QualType T); 189 190 /// getVariableArrayType - Returns a non-unique reference to the type for a 191 /// variable array of the specified element type. 192 QualType getVariableArrayType(QualType EltTy, Expr *NumElts, 193 ArrayType::ArraySizeModifier ASM, 194 unsigned EltTypeQuals); 195 196 /// getDependentSizedArrayType - Returns a non-unique reference to 197 /// the type for a dependently-sized array of the specified element 198 /// type. FIXME: We will need these to be uniqued, or at least 199 /// comparable, at some point. 200 QualType getDependentSizedArrayType(QualType EltTy, Expr *NumElts, 201 ArrayType::ArraySizeModifier ASM, 202 unsigned EltTypeQuals); 203 204 /// getIncompleteArrayType - Returns a unique reference to the type for a 205 /// incomplete array of the specified element type. 206 QualType getIncompleteArrayType(QualType EltTy, 207 ArrayType::ArraySizeModifier ASM, 208 unsigned EltTypeQuals); 209 210 /// getConstantArrayType - Return the unique reference to the type for a 211 /// constant array of the specified element type. 212 QualType getConstantArrayType(QualType EltTy, const llvm::APInt &ArySize, 213 ArrayType::ArraySizeModifier ASM, 214 unsigned EltTypeQuals); 215 216 /// getVectorType - Return the unique reference to a vector type of 217 /// the specified element type and size. VectorType must be a built-in type. 218 QualType getVectorType(QualType VectorType, unsigned NumElts); 219 220 /// getExtVectorType - Return the unique reference to an extended vector type 221 /// of the specified element type and size. VectorType must be a built-in 222 /// type. 223 QualType getExtVectorType(QualType VectorType, unsigned NumElts); 224 225 /// getFunctionTypeNoProto - Return a K&R style C function type like 'int()'. 226 /// 227 QualType getFunctionTypeNoProto(QualType ResultTy); 228 229 /// getFunctionType - Return a normal function type with a typed argument 230 /// list. isVariadic indicates whether the argument list includes '...'. 231 QualType getFunctionType(QualType ResultTy, const QualType *ArgArray, 232 unsigned NumArgs, bool isVariadic, 233 unsigned TypeQuals); 234 235 /// getTypeDeclType - Return the unique reference to the type for 236 /// the specified type declaration. 237 QualType getTypeDeclType(TypeDecl *Decl, TypeDecl* PrevDecl=0); 238 239 /// getTypedefType - Return the unique reference to the type for the 240 /// specified typename decl. 241 QualType getTypedefType(TypedefDecl *Decl); 242 QualType getTemplateTypeParmType(TemplateTypeParmDecl *Decl); 243 QualType getObjCInterfaceType(ObjCInterfaceDecl *Decl); 244 245 /// getObjCQualifiedInterfaceType - Return a 246 /// ObjCQualifiedInterfaceType type for the given interface decl and 247 /// the conforming protocol list. 248 QualType getObjCQualifiedInterfaceType(ObjCInterfaceDecl *Decl, 249 ObjCProtocolDecl **ProtocolList, unsigned NumProtocols); 250 251 /// getObjCQualifiedIdType - Return an ObjCQualifiedIdType for a 252 /// given 'id' and conforming protocol list. 253 QualType getObjCQualifiedIdType(ObjCProtocolDecl **ProtocolList, 254 unsigned NumProtocols); 255 256 257 /// getTypeOfType - GCC extension. 258 QualType getTypeOfExpr(Expr *e); 259 QualType getTypeOfType(QualType t); 260 261 /// getTagDeclType - Return the unique reference to the type for the 262 /// specified TagDecl (struct/union/class/enum) decl. 263 QualType getTagDeclType(TagDecl *Decl); 264 265 /// getSizeType - Return the unique type for "size_t" (C99 7.17), defined 266 /// in <stddef.h>. The sizeof operator requires this (C99 6.5.3.4p4). 267 QualType getSizeType() const; 268 269 /// getWCharType - Return the unique type for "wchar_t" (C99 7.17), defined 270 /// in <stddef.h>. Wide strings require this (C99 6.4.5p5). 271 QualType getWCharType() const; 272 273 /// getSignedWCharType - Return the type of "signed wchar_t". 274 /// Used when in C++, as a GCC extension. 275 QualType getSignedWCharType() const; 276 277 /// getUnsignedWCharType - Return the type of "unsigned wchar_t". 278 /// Used when in C++, as a GCC extension. 279 QualType getUnsignedWCharType() const; 280 281 /// getPointerDiffType - Return the unique type for "ptrdiff_t" (ref?) 282 /// defined in <stddef.h>. Pointer - pointer requires this (C99 6.5.6p9). 283 QualType getPointerDiffType() const; 284 285 // getCFConstantStringType - Return the C structure type used to represent 286 // constant CFStrings. 287 QualType getCFConstantStringType(); 288 289 // This setter/getter represents the ObjC type for an NSConstantString. 290 void setObjCConstantStringInterface(ObjCInterfaceDecl *Decl); 291 QualType getObjCConstantStringInterface() const { 292 return ObjCConstantStringType; 293 } 294 295 //// This gets the struct used to keep track of fast enumerations. 296 QualType getObjCFastEnumerationStateType(); 297 298 /// getObjCEncodingForType - Emit the ObjC type encoding for the 299 /// given type into \arg S. If \arg NameFields is specified then 300 /// record field names are also encoded. 301 void getObjCEncodingForType(QualType t, std::string &S, 302 FieldDecl *Field=NULL) const; 303 304 void getLegacyIntegralTypeEncoding(QualType &t) const; 305 306 // Put the string version of type qualifiers into S. 307 void getObjCEncodingForTypeQualifier(Decl::ObjCDeclQualifier QT, 308 std::string &S) const; 309 310 /// getObjCEncodingForMethodDecl - Return the encoded type for this method 311 /// declaration. 312 void getObjCEncodingForMethodDecl(const ObjCMethodDecl *Decl, std::string &S); 313 314 /// getObjCEncodingForPropertyDecl - Return the encoded type for 315 /// this method declaration. If non-NULL, Container must be either 316 /// an ObjCCategoryImplDecl or ObjCImplementationDecl; it should 317 /// only be NULL when getting encodings for protocol properties. 318 void getObjCEncodingForPropertyDecl(const ObjCPropertyDecl *PD, 319 const Decl *Container, 320 std::string &S); 321 322 /// getObjCEncodingTypeSize returns size of type for objective-c encoding 323 /// purpose. 324 int getObjCEncodingTypeSize(QualType t); 325 326 /// This setter/getter represents the ObjC 'id' type. It is setup lazily, by 327 /// Sema. id is always a (typedef for a) pointer type, a pointer to a struct. 328 QualType getObjCIdType() const { return ObjCIdType; } 329 void setObjCIdType(TypedefDecl *Decl); 330 331 void setObjCSelType(TypedefDecl *Decl); 332 QualType getObjCSelType() const { return ObjCSelType; } 333 334 void setObjCProtoType(QualType QT); 335 QualType getObjCProtoType() const { return ObjCProtoType; } 336 337 /// This setter/getter repreents the ObjC 'Class' type. It is setup lazily, by 338 /// Sema. 'Class' is always a (typedef for a) pointer type, a pointer to a 339 /// struct. 340 QualType getObjCClassType() const { return ObjCClassType; } 341 void setObjCClassType(TypedefDecl *Decl); 342 343 void setBuiltinVaListType(QualType T); 344 QualType getBuiltinVaListType() const { return BuiltinVaListType; } 345 346private: 347 QualType getFromTargetType(unsigned Type) const; 348 349 //===--------------------------------------------------------------------===// 350 // Type Predicates. 351 //===--------------------------------------------------------------------===// 352 353public: 354 /// isObjCObjectPointerType - Returns true if type is an Objective-C pointer 355 /// to an object type. This includes "id" and "Class" (two 'special' pointers 356 /// to struct), Interface* (pointer to ObjCInterfaceType) and id<P> (qualified 357 /// ID type). 358 bool isObjCObjectPointerType(QualType Ty) const; 359 360 /// isObjCNSObjectType - Return true if this is an NSObject object with 361 /// its NSObject attribute set. 362 bool isObjCNSObjectType(QualType Ty) const; 363 364 //===--------------------------------------------------------------------===// 365 // Type Sizing and Analysis 366 //===--------------------------------------------------------------------===// 367 368 /// getFloatTypeSemantics - Return the APFloat 'semantics' for the specified 369 /// scalar floating point type. 370 const llvm::fltSemantics &getFloatTypeSemantics(QualType T) const; 371 372 /// getTypeInfo - Get the size and alignment of the specified complete type in 373 /// bits. 374 std::pair<uint64_t, unsigned> getTypeInfo(const Type *T); 375 std::pair<uint64_t, unsigned> getTypeInfo(QualType T) { 376 return getTypeInfo(T.getTypePtr()); 377 } 378 379 /// getTypeSize - Return the size of the specified type, in bits. This method 380 /// does not work on incomplete types. 381 uint64_t getTypeSize(QualType T) { 382 return getTypeInfo(T).first; 383 } 384 uint64_t getTypeSize(const Type *T) { 385 return getTypeInfo(T).first; 386 } 387 388 /// getTypeAlign - Return the alignment of the specified type, in bits. This 389 /// method does not work on incomplete types. 390 unsigned getTypeAlign(QualType T) { 391 return getTypeInfo(T).second; 392 } 393 unsigned getTypeAlign(const Type *T) { 394 return getTypeInfo(T).second; 395 } 396 397 /// getASTRecordLayout - Get or compute information about the layout of the 398 /// specified record (struct/union/class), which indicates its size and field 399 /// position information. 400 const ASTRecordLayout &getASTRecordLayout(const RecordDecl *D); 401 402 const ASTRecordLayout &getASTObjCInterfaceLayout(const ObjCInterfaceDecl *D); 403 const RecordDecl *addRecordToClass(const ObjCInterfaceDecl *D); 404 const FieldDecl *getFieldDecl(const ObjCIvarRefExpr *MRef) { 405 llvm::DenseMap<const ObjCIvarRefExpr *, const FieldDecl*>::iterator I 406 = ASTFieldForIvarRef.find(MRef); 407 assert (I != ASTFieldForIvarRef.end() && "Unable to find field_decl"); 408 return I->second; 409 } 410 void setFieldDecl(const ObjCInterfaceDecl *OI, 411 const ObjCIvarDecl *Ivar, 412 const ObjCIvarRefExpr *MRef); 413 //===--------------------------------------------------------------------===// 414 // Type Operators 415 //===--------------------------------------------------------------------===// 416 417 /// getCanonicalType - Return the canonical (structural) type corresponding to 418 /// the specified potentially non-canonical type. The non-canonical version 419 /// of a type may have many "decorated" versions of types. Decorators can 420 /// include typedefs, 'typeof' operators, etc. The returned type is guaranteed 421 /// to be free of any of these, allowing two canonical types to be compared 422 /// for exact equality with a simple pointer comparison. 423 QualType getCanonicalType(QualType T); 424 const Type *getCanonicalType(const Type *T) { 425 return T->getCanonicalTypeInternal().getTypePtr(); 426 } 427 428 /// Type Query functions. If the type is an instance of the specified class, 429 /// return the Type pointer for the underlying maximally pretty type. This 430 /// is a member of ASTContext because this may need to do some amount of 431 /// canonicalization, e.g. to move type qualifiers into the element type. 432 const ArrayType *getAsArrayType(QualType T); 433 const ConstantArrayType *getAsConstantArrayType(QualType T) { 434 return dyn_cast_or_null<ConstantArrayType>(getAsArrayType(T)); 435 } 436 const VariableArrayType *getAsVariableArrayType(QualType T) { 437 return dyn_cast_or_null<VariableArrayType>(getAsArrayType(T)); 438 } 439 const IncompleteArrayType *getAsIncompleteArrayType(QualType T) { 440 return dyn_cast_or_null<IncompleteArrayType>(getAsArrayType(T)); 441 } 442 443 /// getBaseElementType - Returns the innermost element type of a variable 444 /// length array type. For example, will return "int" for int[m][n] 445 QualType getBaseElementType(const VariableArrayType *VAT); 446 447 /// getArrayDecayedType - Return the properly qualified result of decaying the 448 /// specified array type to a pointer. This operation is non-trivial when 449 /// handling typedefs etc. The canonical type of "T" must be an array type, 450 /// this returns a pointer to a properly qualified element of the array. 451 /// 452 /// See C99 6.7.5.3p7 and C99 6.3.2.1p3. 453 QualType getArrayDecayedType(QualType T); 454 455 /// getIntegerTypeOrder - Returns the highest ranked integer type: 456 /// C99 6.3.1.8p1. If LHS > RHS, return 1. If LHS == RHS, return 0. If 457 /// LHS < RHS, return -1. 458 int getIntegerTypeOrder(QualType LHS, QualType RHS); 459 460 /// getFloatingTypeOrder - Compare the rank of the two specified floating 461 /// point types, ignoring the domain of the type (i.e. 'double' == 462 /// '_Complex double'). If LHS > RHS, return 1. If LHS == RHS, return 0. If 463 /// LHS < RHS, return -1. 464 int getFloatingTypeOrder(QualType LHS, QualType RHS); 465 466 /// getFloatingTypeOfSizeWithinDomain - Returns a real floating 467 /// point or a complex type (based on typeDomain/typeSize). 468 /// 'typeDomain' is a real floating point or complex type. 469 /// 'typeSize' is a real floating point or complex type. 470 QualType getFloatingTypeOfSizeWithinDomain(QualType typeSize, 471 QualType typeDomain) const; 472 473 //===--------------------------------------------------------------------===// 474 // Type Compatibility Predicates 475 //===--------------------------------------------------------------------===// 476 477 /// Compatibility predicates used to check assignment expressions. 478 bool typesAreCompatible(QualType, QualType); // C99 6.2.7p1 479 bool typesAreBlockCompatible(QualType lhs, QualType rhs); 480 481 bool isObjCIdType(QualType T) const { 482 if (!IdStructType) // ObjC isn't enabled 483 return false; 484 return T->getAsStructureType() == IdStructType; 485 } 486 bool isObjCClassType(QualType T) const { 487 if (!ClassStructType) // ObjC isn't enabled 488 return false; 489 return T->getAsStructureType() == ClassStructType; 490 } 491 bool isObjCSelType(QualType T) const { 492 assert(SelStructType && "isObjCSelType used before 'SEL' type is built"); 493 return T->getAsStructureType() == SelStructType; 494 } 495 496 // Check the safety of assignment from LHS to RHS 497 bool canAssignObjCInterfaces(const ObjCInterfaceType *LHS, 498 const ObjCInterfaceType *RHS); 499 500 // Functions for calculating composite types 501 QualType mergeTypes(QualType, QualType); 502 QualType mergeFunctionTypes(QualType, QualType); 503 504 //===--------------------------------------------------------------------===// 505 // Integer Predicates 506 //===--------------------------------------------------------------------===// 507 508 // The width of an integer, as defined in C99 6.2.6.2. This is the number 509 // of bits in an integer type excluding any padding bits. 510 unsigned getIntWidth(QualType T); 511 512 // Per C99 6.2.5p6, for every signed integer type, there is a corresponding 513 // unsigned integer type. This method takes a signed type, and returns the 514 // corresponding unsigned integer type. 515 QualType getCorrespondingUnsignedType(QualType T); 516 517 //===--------------------------------------------------------------------===// 518 // Type Iterators. 519 //===--------------------------------------------------------------------===// 520 521 typedef std::vector<Type*>::iterator type_iterator; 522 typedef std::vector<Type*>::const_iterator const_type_iterator; 523 524 type_iterator types_begin() { return Types.begin(); } 525 type_iterator types_end() { return Types.end(); } 526 const_type_iterator types_begin() const { return Types.begin(); } 527 const_type_iterator types_end() const { return Types.end(); } 528 529 //===--------------------------------------------------------------------===// 530 // Serialization 531 //===--------------------------------------------------------------------===// 532 533 void Emit(llvm::Serializer& S) const; 534 static ASTContext* Create(llvm::Deserializer& D); 535 536private: 537 ASTContext(const ASTContext&); // DO NOT IMPLEMENT 538 void operator=(const ASTContext&); // DO NOT IMPLEMENT 539 540 void InitBuiltinTypes(); 541 void InitBuiltinType(QualType &R, BuiltinType::Kind K); 542 543 /// setTagDefinition - Used by RecordDecl::completeDefinition and 544 /// EnumDecl::completeDefinition to inform 545 /// about which RecordDecl/EnumDecl serves as the definition of a particular 546 /// struct/union/class/enum. 547 void setTagDefinition(TagDecl* R); 548 friend class EnumDecl; 549 friend class RecordDecl; 550 551 // Return the ObjC type encoding for a given type. 552 void getObjCEncodingForTypeImpl(QualType t, std::string &S, 553 bool ExpandPointedToStructures, 554 bool ExpandStructures, 555 FieldDecl *Field, 556 bool OutermostType = false) const; 557 558}; 559 560} // end namespace clang 561 562#endif 563