aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/AST')
-rw-r--r--include/clang/AST/APValue.h40
-rw-r--r--include/clang/AST/ASTConsumer.h12
-rw-r--r--include/clang/AST/ASTContext.h262
-rw-r--r--include/clang/AST/ASTDiagnostic.h2
-rw-r--r--include/clang/AST/Attr.h98
-rw-r--r--include/clang/AST/CanonicalType.h311
-rw-r--r--include/clang/AST/Decl.h292
-rw-r--r--include/clang/AST/DeclBase.h122
-rw-r--r--include/clang/AST/DeclCXX.h468
-rw-r--r--include/clang/AST/DeclContextInternals.h30
-rw-r--r--include/clang/AST/DeclGroup.h38
-rw-r--r--include/clang/AST/DeclObjC.h424
-rw-r--r--include/clang/AST/DeclTemplate.h302
-rw-r--r--include/clang/AST/DeclarationName.h36
-rw-r--r--include/clang/AST/Expr.h768
-rw-r--r--include/clang/AST/ExprCXX.h412
-rw-r--r--include/clang/AST/ExprObjC.h204
-rw-r--r--include/clang/AST/ExternalASTSource.h8
-rw-r--r--include/clang/AST/NestedNameSpecifier.h32
-rw-r--r--include/clang/AST/ParentMap.h10
-rw-r--r--include/clang/AST/PrettyPrinter.h2
-rw-r--r--include/clang/AST/RecordLayout.h66
-rw-r--r--include/clang/AST/Redeclarable.h12
-rw-r--r--include/clang/AST/Stmt.h430
-rw-r--r--include/clang/AST/StmtGraphTraits.h28
-rw-r--r--include/clang/AST/StmtIterator.h62
-rw-r--r--include/clang/AST/StmtObjC.h190
-rw-r--r--include/clang/AST/StmtVisitor.h20
-rw-r--r--include/clang/AST/TemplateName.h38
-rw-r--r--include/clang/AST/Type.h542
-rw-r--r--include/clang/AST/TypeLoc.h10
-rw-r--r--include/clang/AST/TypeOrdering.h6
-rw-r--r--include/clang/AST/TypeVisitor.h8
33 files changed, 2633 insertions, 2652 deletions
diff --git a/include/clang/AST/APValue.h b/include/clang/AST/APValue.h
index 80d1107ce2..94d258d9e4 100644
--- a/include/clang/AST/APValue.h
+++ b/include/clang/AST/APValue.h
@@ -37,16 +37,16 @@ public:
};
private:
ValueKind Kind;
-
- struct ComplexAPSInt {
- APSInt Real, Imag;
+
+ struct ComplexAPSInt {
+ APSInt Real, Imag;
ComplexAPSInt() : Real(1), Imag(1) {}
};
struct ComplexAPFloat {
APFloat Real, Imag;
ComplexAPFloat() : Real(0.0), Imag(0.0) {}
};
-
+
struct LV {
Expr* Base;
uint64_t Offset;
@@ -57,9 +57,9 @@ private:
Vec() : Elts(0), NumElts(0) {}
~Vec() { delete[] Elts; }
};
-
+
enum {
- MaxSize = (sizeof(ComplexAPSInt) > sizeof(ComplexAPFloat) ?
+ MaxSize = (sizeof(ComplexAPSInt) > sizeof(ComplexAPFloat) ?
sizeof(ComplexAPSInt) : sizeof(ComplexAPFloat))
};
@@ -94,7 +94,7 @@ public:
~APValue() {
MakeUninit();
}
-
+
ValueKind getKind() const { return Kind; }
bool isUninit() const { return Kind == Uninitialized; }
bool isInt() const { return Kind == Int; }
@@ -103,10 +103,10 @@ public:
bool isComplexFloat() const { return Kind == ComplexFloat; }
bool isLValue() const { return Kind == LValue; }
bool isVector() const { return Kind == Vector; }
-
+
void print(llvm::raw_ostream &OS) const;
void dump() const;
-
+
APSInt &getInt() {
assert(isInt() && "Invalid accessor");
return *(APSInt*)(char*)Data;
@@ -114,7 +114,7 @@ public:
const APSInt &getInt() const {
return const_cast<APValue*>(this)->getInt();
}
-
+
APFloat &getFloat() {
assert(isFloat() && "Invalid accessor");
return *(APFloat*)(char*)Data;
@@ -122,7 +122,7 @@ public:
const APFloat &getFloat() const {
return const_cast<APValue*>(this)->getFloat();
}
-
+
APValue &getVectorElt(unsigned i) const {
assert(isVector() && "Invalid accessor");
return ((Vec*)(char*)Data)->Elts[i];
@@ -131,7 +131,7 @@ public:
assert(isVector() && "Invalid accessor");
return ((Vec*)(void *)Data)->NumElts;
}
-
+
APSInt &getComplexIntReal() {
assert(isComplexInt() && "Invalid accessor");
return ((ComplexAPSInt*)(char*)Data)->Real;
@@ -139,7 +139,7 @@ public:
const APSInt &getComplexIntReal() const {
return const_cast<APValue*>(this)->getComplexIntReal();
}
-
+
APSInt &getComplexIntImag() {
assert(isComplexInt() && "Invalid accessor");
return ((ComplexAPSInt*)(char*)Data)->Imag;
@@ -147,7 +147,7 @@ public:
const APSInt &getComplexIntImag() const {
return const_cast<APValue*>(this)->getComplexIntImag();
}
-
+
APFloat &getComplexFloatReal() {
assert(isComplexFloat() && "Invalid accessor");
return ((ComplexAPFloat*)(char*)Data)->Real;
@@ -172,7 +172,7 @@ public:
assert(isLValue() && "Invalid accessor");
return ((const LV*)(const void*)Data)->Offset;
}
-
+
void setInt(const APSInt &I) {
assert(isInt() && "Invalid accessor");
*(APSInt*)(char*)Data = I;
@@ -189,14 +189,14 @@ public:
((Vec*)(char*)Data)->Elts[i] = E[i];
}
void setComplexInt(const APSInt &R, const APSInt &I) {
- assert(R.getBitWidth() == I.getBitWidth() &&
+ assert(R.getBitWidth() == I.getBitWidth() &&
"Invalid complex int (type mismatch).");
assert(isComplexInt() && "Invalid accessor");
((ComplexAPSInt*)(char*)Data)->Real = R;
((ComplexAPSInt*)(char*)Data)->Imag = I;
}
void setComplexFloat(const APFloat &R, const APFloat &I) {
- assert(&R.getSemantics() == &I.getSemantics() &&
+ assert(&R.getSemantics() == &I.getSemantics() &&
"Invalid complex float (type mismatch).");
assert(isComplexFloat() && "Invalid accessor");
((ComplexAPFloat*)(char*)Data)->Real = R;
@@ -207,9 +207,9 @@ public:
((LV*)(char*)Data)->Base = B;
((LV*)(char*)Data)->Offset = O;
}
-
+
const APValue &operator=(const APValue &RHS);
-
+
private:
void MakeUninit();
void MakeInt() {
@@ -248,7 +248,7 @@ inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const APValue &V) {
V.print(OS);
return OS;
}
-
+
} // end namespace clang.
#endif
diff --git a/include/clang/AST/ASTConsumer.h b/include/clang/AST/ASTConsumer.h
index 6dc7e13d8f..af6bf30b68 100644
--- a/include/clang/AST/ASTConsumer.h
+++ b/include/clang/AST/ASTConsumer.h
@@ -36,27 +36,27 @@ public:
ASTConsumer() : SemaConsumer(false) { }
virtual ~ASTConsumer() {}
-
+
/// Initialize - This is called to initialize the consumer, providing the
/// ASTContext and the Action.
virtual void Initialize(ASTContext &Context) {}
-
+
/// HandleTopLevelDecl - Handle the specified top-level declaration. This is
/// called by the parser to process every top-level Decl*. Note that D can
/// be the head of a chain of Decls (e.g. for `int a, b` the chain will have
/// two elements). Use Decl::getNextDeclarator() to walk the chain.
virtual void HandleTopLevelDecl(DeclGroupRef D);
-
+
/// HandleTranslationUnit - This method is called when the ASTs for entire
/// translation unit have been parsed.
- virtual void HandleTranslationUnit(ASTContext &Ctx) {}
-
+ virtual void HandleTranslationUnit(ASTContext &Ctx) {}
+
/// HandleTagDeclDefinition - This callback is invoked each time a TagDecl
/// (e.g. struct, union, enum, class) is completed. This allows the client to
/// hack on the type, which can occur at any point in the file (because these
/// can be defined in declspecs).
virtual void HandleTagDeclDefinition(TagDecl *D) {}
-
+
/// \brief Callback invoked at the end of a translation unit to
/// notify the consumer that the given tentative definition should
/// be completed.
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h
index f9419fb3c2..9c5e31cd74 100644
--- a/include/clang/AST/ASTContext.h
+++ b/include/clang/AST/ASTContext.h
@@ -56,12 +56,12 @@ namespace clang {
class TypedefDecl;
class UnresolvedUsingDecl;
class UsingDecl;
-
+
namespace Builtin { class Context; }
-
+
/// ASTContext - This class holds long-lived AST nodes (such as types and
/// decls) that can be referred to throughout the semantic analysis of a file.
-class ASTContext {
+class ASTContext {
std::vector<Type*> Types;
llvm::FoldingSet<ExtQualType> ExtQualTypes;
llvm::FoldingSet<ComplexType> ComplexTypes;
@@ -87,7 +87,7 @@ class ASTContext {
llvm::FoldingSet<ObjCInterfaceType> ObjCInterfaceTypes;
llvm::FoldingSet<ObjCObjectPointerType> ObjCObjectPointerTypes;
llvm::FoldingSet<ElaboratedType> ElaboratedTypes;
-
+
llvm::FoldingSet<QualifiedTemplateName> QualifiedTemplateNames;
llvm::FoldingSet<DependentTemplateName> DependentTemplateNames;
@@ -108,7 +108,7 @@ class ASTContext {
llvm::DenseMap<unsigned, FixedWidthIntType*> SignedFixedWidthIntTypes;
llvm::DenseMap<unsigned, FixedWidthIntType*> UnsignedFixedWidthIntTypes;
-
+
/// BuiltinVaListType - built-in va list type.
/// This is initially null and set by Sema::LazilyCreateBuiltin when
/// a builtin that takes a valist is encountered.
@@ -116,33 +116,33 @@ class ASTContext {
/// ObjCIdType - a pseudo built-in typedef type (set by Sema).
QualType ObjCIdTypedefType;
-
+
/// ObjCSelType - another pseudo built-in typedef type (set by Sema).
QualType ObjCSelType;
const RecordType *SelStructType;
-
+
/// ObjCProtoType - another pseudo built-in typedef type (set by Sema).
QualType ObjCProtoType;
const RecordType *ProtoStructType;
/// ObjCClassType - another pseudo built-in typedef type (set by Sema).
QualType ObjCClassTypedefType;
-
+
QualType ObjCConstantStringType;
RecordDecl *CFConstantStringTypeDecl;
RecordDecl *ObjCFastEnumerationStateTypeDecl;
-
+
/// \brief The type for the C FILE type.
TypeDecl *FILEDecl;
-
+
/// \brief The type for the C jmp_buf type.
TypeDecl *jmp_bufDecl;
-
+
/// \brief The type for the C sigjmp_buf type.
TypeDecl *sigjmp_bufDecl;
-
- /// \brief Keeps track of all declaration attributes.
+
+ /// \brief Keeps track of all declaration attributes.
///
/// Since so few decls have attrs, we keep them in a hash map instead of
/// wasting space in the Decl class.
@@ -153,7 +153,7 @@ class ASTContext {
///
/// This data structure stores the mapping from instantiations of static
/// data members to the static data member representations within the
- /// class template from which they were instantiated.
+ /// class template from which they were instantiated.
///
/// Given the following example:
///
@@ -169,11 +169,11 @@ class ASTContext {
/// int *x = &X<int>::value;
/// \endcode
///
- /// This mapping will contain an entry that maps from the VarDecl for
+ /// This mapping will contain an entry that maps from the VarDecl for
/// X<int>::value to the corresponding VarDecl for X<T>::value (within the
- /// class template X).
+ /// class template X).
llvm::DenseMap<VarDecl *, VarDecl *> InstantiatedFromStaticDataMember;
-
+
/// \brief Keeps track of the UnresolvedUsingDecls from which UsingDecls
/// where created during instantiation.
///
@@ -196,14 +196,14 @@ class ASTContext {
/// B<int> to the UnresolvedUsingDecl in B<T>.
llvm::DenseMap<UsingDecl *, UnresolvedUsingDecl *>
InstantiatedFromUnresolvedUsingDecl;
-
+
llvm::DenseMap<FieldDecl *, FieldDecl *> InstantiatedFromUnnamedFieldDecl;
-
+
TranslationUnitDecl *TUDecl;
/// SourceMgr - The associated SourceManager object.
SourceManager &SourceMgr;
-
+
/// LangOpts - The language options used to create the AST associated with
/// this ASTContext object.
LangOptions LangOpts;
@@ -211,17 +211,17 @@ class ASTContext {
/// \brief Whether we have already loaded comment source ranges from an
/// external source.
bool LoadedExternalComments;
-
+
/// MallocAlloc/BumpAlloc - The allocator objects used to create AST objects.
bool FreeMemory;
llvm::MallocAllocator MallocAlloc;
llvm::BumpPtrAllocator BumpAlloc;
-
+
/// \brief Mapping from declarations to their comments, once we have
/// already looked up the comment associated with a given declaration.
llvm::DenseMap<const Decl *, std::string> DeclComments;
-
-public:
+
+public:
TargetInfo &Target;
IdentifierTable &Idents;
SelectorTable &Selectors;
@@ -238,38 +238,38 @@ public:
/// \brief Source ranges for all of the comments in the source file,
/// sorted in order of appearance in the translation unit.
std::vector<SourceRange> Comments;
-
+
SourceManager& getSourceManager() { return SourceMgr; }
const SourceManager& getSourceManager() const { return SourceMgr; }
void *Allocate(unsigned Size, unsigned Align = 8) {
return FreeMemory ? MallocAlloc.Allocate(Size, Align) :
BumpAlloc.Allocate(Size, Align);
}
- void Deallocate(void *Ptr) {
+ void Deallocate(void *Ptr) {
if (FreeMemory)
- MallocAlloc.Deallocate(Ptr);
+ MallocAlloc.Deallocate(Ptr);
}
const LangOptions& getLangOptions() const { return LangOpts; }
-
- FullSourceLoc getFullLoc(SourceLocation Loc) const {
+
+ FullSourceLoc getFullLoc(SourceLocation Loc) const {
return FullSourceLoc(Loc,SourceMgr);
}
/// \brief Retrieve the attributes for the given declaration.
Attr*& getDeclAttrs(const Decl *D) { return DeclAttrs[D]; }
-
+
/// \brief Erase the attributes corresponding to the given declaration.
void eraseDeclAttrs(const Decl *D) { DeclAttrs.erase(D); }
/// \brief If this variable is an instantiated static data member of a
- /// class template specialization, returns the templated static data member
+ /// class template specialization, returns the templated static data member
/// from which it was instantiated.
VarDecl *getInstantiatedFromStaticDataMember(VarDecl *Var);
-
+
/// \brief Note that the static data member \p Inst is an instantiation of
/// the static data member template \p Tmpl of a class template.
- void setInstantiatedFromStaticDataMember(VarDecl *Inst, VarDecl *Tmpl);
-
+ void setInstantiatedFromStaticDataMember(VarDecl *Inst, VarDecl *Tmpl);
+
/// \brief If this using decl is instantiated from an unresolved using decl,
/// return it.
UnresolvedUsingDecl *getInstantiatedFromUnresolvedUsingDecl(UsingDecl *UUD);
@@ -278,17 +278,17 @@ public:
/// the unresolved using decl \p Tmpl of a class template.
void setInstantiatedFromUnresolvedUsingDecl(UsingDecl *Inst,
UnresolvedUsingDecl *Tmpl);
-
-
+
+
FieldDecl *getInstantiatedFromUnnamedFieldDecl(FieldDecl *Field);
-
+
void setInstantiatedFromUnnamedFieldDecl(FieldDecl *Inst, FieldDecl *Tmpl);
-
+
TranslationUnitDecl *getTranslationUnitDecl() const { return TUDecl; }
-
+
const char *getCommentForDecl(const Decl *D);
-
+
// Builtin Types.
QualType VoidTy;
QualType BoolTy;
@@ -331,27 +331,27 @@ public:
//===--------------------------------------------------------------------===//
// Type Constructors
//===--------------------------------------------------------------------===//
-
- /// getAddSpaceQualType - Return the uniqued reference to the type for an
- /// address space qualified type with the specified type and address space.
- /// The resulting type has a union of the qualifiers from T and the address
- /// space. If T already has an address space specifier, it is silently
+
+ /// getAddSpaceQualType - Return the uniqued reference to the type for an
+ /// address space qualified type with the specified type and address space.
+ /// The resulting type has a union of the qualifiers from T and the address
+ /// space. If T already has an address space specifier, it is silently
/// replaced.
QualType getAddrSpaceQualType(QualType T, unsigned AddressSpace);
-
+
/// getObjCGCQualType - Returns the uniqued reference to the type for an
/// objc gc qualified type. The retulting type has a union of the qualifiers
/// from T and the gc attribute.
QualType getObjCGCQualType(QualType T, QualType::GCAttrTypes gcAttr);
-
+
/// getNoReturnType - Add the noreturn attribute to the given type which must
/// be a FunctionType or a pointer to an allowable type or a BlockPointer.
QualType getNoReturnType(QualType T);
-
+
/// getComplexType - Return the uniqued reference to the type for a complex
/// number with the specified element type.
QualType getComplexType(QualType T);
-
+
/// getPointerType - Return the uniqued reference to the type for a pointer to
/// the specified type.
QualType getPointerType(QualType T);
@@ -379,7 +379,7 @@ public:
ArrayType::ArraySizeModifier ASM,
unsigned EltTypeQuals,
SourceRange Brackets);
-
+
/// getDependentSizedArrayType - Returns a non-unique reference to
/// the type for a dependently-sized array of the specified element
/// type. FIXME: We will need these to be uniqued, or at least
@@ -430,7 +430,7 @@ public:
/// the type for a dependently-sized vector of the specified element
/// type. FIXME: We will need these to be uniqued, or at least
/// comparable, at some point.
- QualType getDependentSizedExtVectorType(QualType VectorType,
+ QualType getDependentSizedExtVectorType(QualType VectorType,
Expr *SizeExpr,
SourceLocation AttrLoc);
@@ -455,7 +455,7 @@ public:
/// specified typename decl.
QualType getTypedefType(TypedefDecl *Decl);
- QualType getTemplateTypeParmType(unsigned Depth, unsigned Index,
+ QualType getTemplateTypeParmType(unsigned Depth, unsigned Index,
bool ParameterPack,
IdentifierInfo *Name = 0);
@@ -466,17 +466,17 @@ public:
QualType getQualifiedNameType(NestedNameSpecifier *NNS,
QualType NamedType);
- QualType getTypenameType(NestedNameSpecifier *NNS,
+ QualType getTypenameType(NestedNameSpecifier *NNS,
const IdentifierInfo *Name,
QualType Canon = QualType());
- QualType getTypenameType(NestedNameSpecifier *NNS,
+ QualType getTypenameType(NestedNameSpecifier *NNS,
const TemplateSpecializationType *TemplateId,
QualType Canon = QualType());
QualType getElaboratedType(QualType UnderlyingType,
ElaboratedType::TagKind Tag);
QualType getObjCInterfaceType(const ObjCInterfaceDecl *Decl,
- ObjCProtocolDecl **Protocols = 0,
+ ObjCProtocolDecl **Protocols = 0,
unsigned NumProtocols = 0);
/// getObjCObjectPointerType - Return a ObjCObjectPointerType type for the
@@ -484,18 +484,18 @@ public:
QualType getObjCObjectPointerType(QualType OIT,
ObjCProtocolDecl **ProtocolList = 0,
unsigned NumProtocols = 0);
-
+
/// getTypeOfType - GCC extension.
QualType getTypeOfExprType(Expr *e);
QualType getTypeOfType(QualType t);
-
+
/// getDecltypeType - C++0x decltype.
QualType getDecltypeType(Expr *e);
-
+
/// getTagDeclType - Return the unique reference to the type for the
/// specified TagDecl (struct/union/class/enum) decl.
QualType getTagDeclType(const TagDecl *Decl);
-
+
/// getSizeType - Return the unique type for "size_t" (C99 7.17), defined
/// in <stddef.h>. The sizeof operator requires this (C99 6.5.3.4p4).
QualType getSizeType() const;
@@ -512,15 +512,15 @@ public:
/// getUnsignedWCharType - Return the type of "unsigned wchar_t".
/// Used when in C++, as a GCC extension.
QualType getUnsignedWCharType() const;
-
+
/// getPointerDiffType - Return the unique type for "ptrdiff_t" (ref?)
/// defined in <stddef.h>. Pointer - pointer requires this (C99 6.5.6p9).
QualType getPointerDiffType() const;
-
+
// getCFConstantStringType - Return the C structure type used to represent
// constant CFStrings.
- QualType getCFConstantStringType();
-
+ QualType getCFConstantStringType();
+
/// Get the structure type used to representation CFStrings, or NULL
/// if it hasn't yet been built.
QualType getRawCFConstantStringType() {
@@ -532,13 +532,13 @@ public:
// This setter/getter represents the ObjC type for an NSConstantString.
void setObjCConstantStringInterface(ObjCInterfaceDecl *Decl);
- QualType getObjCConstantStringInterface() const {
- return ObjCConstantStringType;
+ QualType getObjCConstantStringInterface() const {
+ return ObjCConstantStringType;
}
//// This gets the struct used to keep track of fast enumerations.
QualType getObjCFastEnumerationStateType();
-
+
/// Get the ObjCFastEnumerationState type, or NULL if it hasn't yet
/// been built.
QualType getRawObjCFastEnumerationStateType() {
@@ -551,10 +551,10 @@ public:
/// \brief Set the type for the C FILE type.
void setFILEDecl(TypeDecl *FILEDecl) { this->FILEDecl = FILEDecl; }
-
+
/// \brief Retrieve the C FILE type.
- QualType getFILEType() {
- if (FILEDecl)
+ QualType getFILEType() {
+ if (FILEDecl)
return getTypeDeclType(FILEDecl);
return QualType();
}
@@ -563,10 +563,10 @@ public:
void setjmp_bufDecl(TypeDecl *jmp_bufDecl) {
this->jmp_bufDecl = jmp_bufDecl;
}
-
+
/// \brief Retrieve the C jmp_buf type.
- QualType getjmp_bufType() {
- if (jmp_bufDecl)
+ QualType getjmp_bufType() {
+ if (jmp_bufDecl)
return getTypeDeclType(jmp_bufDecl);
return QualType();
}
@@ -575,41 +575,41 @@ public:
void setsigjmp_bufDecl(TypeDecl *sigjmp_bufDecl) {
this->sigjmp_bufDecl = sigjmp_bufDecl;
}
-
+
/// \brief Retrieve the C sigjmp_buf type.
- QualType getsigjmp_bufType() {
- if (sigjmp_bufDecl)
+ QualType getsigjmp_bufType() {
+ if (sigjmp_bufDecl)
return getTypeDeclType(sigjmp_bufDecl);
return QualType();
}
-
+
/// getObjCEncodingForType - Emit the ObjC type encoding for the
/// given type into \arg S. If \arg NameFields is specified then
/// record field names are also encoded.
- void getObjCEncodingForType(QualType t, std::string &S,
+ void getObjCEncodingForType(QualType t, std::string &S,
const FieldDecl *Field=0);
void getLegacyIntegralTypeEncoding(QualType &t) const;
-
+
// Put the string version of type qualifiers into S.
- void getObjCEncodingForTypeQualifier(Decl::ObjCDeclQualifier QT,
+ void getObjCEncodingForTypeQualifier(Decl::ObjCDeclQualifier QT,
std::string &S) const;
-
+
/// getObjCEncodingForMethodDecl - Return the encoded type for this method
/// declaration.
void getObjCEncodingForMethodDecl(const ObjCMethodDecl *Decl, std::string &S);
-
+
/// getObjCEncodingForPropertyDecl - Return the encoded type for
/// this method declaration. If non-NULL, Container must be either
/// an ObjCCategoryImplDecl or ObjCImplementationDecl; it should
/// only be NULL when getting encodings for protocol properties.
- void getObjCEncodingForPropertyDecl(const ObjCPropertyDecl *PD,
+ void getObjCEncodingForPropertyDecl(const ObjCPropertyDecl *PD,
const Decl *Container,
std::string &S);
-
+
bool ProtocolCompatibleWithProtocol(ObjCProtocolDecl *lProto,
ObjCProtocolDecl *rProto);
-
+
/// getObjCEncodingTypeSize returns size of type for objective-c encoding
/// purpose.
int getObjCEncodingTypeSize(QualType t);
@@ -618,32 +618,32 @@ public:
/// Sema. id is always a (typedef for a) pointer type, a pointer to a struct.
QualType getObjCIdType() const { return ObjCIdTypedefType; }
void setObjCIdType(QualType T);
-
+
void setObjCSelType(QualType T);
QualType getObjCSelType() const { return ObjCSelType; }
-
+
void setObjCProtoType(QualType QT);
QualType getObjCProtoType() const { return ObjCProtoType; }
-
+
/// This setter/getter repreents the ObjC 'Class' type. It is setup lazily, by
/// Sema. 'Class' is always a (typedef for a) pointer type, a pointer to a
/// struct.
QualType getObjCClassType() const { return ObjCClassTypedefType; }
void setObjCClassType(QualType T);
-
+
void setBuiltinVaListType(QualType T);
QualType getBuiltinVaListType() const { return BuiltinVaListType; }
QualType getFixedWidthIntType(unsigned Width, bool Signed);
- TemplateName getQualifiedTemplateName(NestedNameSpecifier *NNS,
+ TemplateName getQualifiedTemplateName(NestedNameSpecifier *NNS,
bool TemplateKeyword,
TemplateDecl *Template);
- TemplateName getQualifiedTemplateName(NestedNameSpecifier *NNS,
+ TemplateName getQualifiedTemplateName(NestedNameSpecifier *NNS,
bool TemplateKeyword,
OverloadedFunctionDecl *Template);
-
- TemplateName getDependentTemplateName(NestedNameSpecifier *NNS,
+
+ TemplateName getDependentTemplateName(NestedNameSpecifier *NNS,
const IdentifierInfo *Name);
enum GetBuiltinTypeError {
@@ -651,42 +651,42 @@ public:
GE_Missing_stdio, //< Missing a type from <stdio.h>
GE_Missing_setjmp //< Missing a type from <setjmp.h>
};
-
+
/// GetBuiltinType - Return the type for the specified builtin.
QualType GetBuiltinType(unsigned ID, GetBuiltinTypeError &Error);
-
+
private:
QualType getFromTargetType(unsigned Type) const;
//===--------------------------------------------------------------------===//
// Type Predicates.
//===--------------------------------------------------------------------===//
-
+
public:
/// getObjCGCAttr - Returns one of GCNone, Weak or Strong objc's
/// garbage collection attribute.
///
QualType::GCAttrTypes getObjCGCAttrKind(const QualType &Ty) const;
-
+
/// isObjCNSObjectType - Return true if this is an NSObject object with
/// its NSObject attribute set.
bool isObjCNSObjectType(QualType Ty) const;
-
+
//===--------------------------------------------------------------------===//
// Type Sizing and Analysis
//===--------------------------------------------------------------------===//
-
+
/// getFloatTypeSemantics - Return the APFloat 'semantics' for the specified
/// scalar floating point type.
const llvm::fltSemantics &getFloatTypeSemantics(QualType T) const;
-
+
/// getTypeInfo - Get the size and alignment of the specified complete type in
/// bits.
std::pair<uint64_t, unsigned> getTypeInfo(const Type *T);
std::pair<uint64_t, unsigned> getTypeInfo(QualType T) {
return getTypeInfo(T.getTypePtr());
}
-
+
/// getTypeSize - Return the size of the specified type, in bits. This method
/// does not work on incomplete types.
uint64_t getTypeSize(QualType T) {
@@ -695,7 +695,7 @@ public:
uint64_t getTypeSize(const Type *T) {
return getTypeInfo(T).first;
}
-
+
/// getTypeAlign - Return the ABI-specified alignment of a type, in bits.
/// This method does not work on incomplete types.
unsigned getTypeAlign(QualType T) {
@@ -704,23 +704,23 @@ public:
unsigned getTypeAlign(const Type *T) {
return getTypeInfo(T).second;
}
-
+
/// getPreferredTypeAlign - Return the "preferred" alignment of the specified
/// type for the current target in bits. This can be different than the ABI
/// alignment in cases where it is beneficial for performance to overalign
/// a data type.
unsigned getPreferredTypeAlign(const Type *T);
-
+
/// getDeclAlignInBytes - Return the alignment of the specified decl
/// that should be returned by __alignof(). Note that bitfields do
/// not have a valid alignment, so this method will assert on them.
unsigned getDeclAlignInBytes(const Decl *D);
-
+
/// getASTRecordLayout - Get or compute information about the layout of the
/// specified record (struct/union/class), which indicates its size and field
/// position information.
const ASTRecordLayout &getASTRecordLayout(const RecordDecl *D);
-
+
/// getASTObjCInterfaceLayout - Get or compute information about the
/// layout of the specified Objective-C interface.
const ASTRecordLayout &getASTObjCInterfaceLayout(const ObjCInterfaceDecl *D);
@@ -747,7 +747,7 @@ public:
//===--------------------------------------------------------------------===//
// Type Operators
//===--------------------------------------------------------------------===//
-
+
/// getCanonicalType - Return the canonical (structural) type corresponding to
/// the specified potentially non-canonical type. The non-canonical version