diff options
author | Steve Naroff <snaroff@apple.com> | 2008-05-29 21:12:08 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2008-05-29 21:12:08 +0000 |
commit | f494b579b22f9950f5af021f0bf9879a91bb8b41 (patch) | |
tree | 3d3a52b43b1a85c64f992e65a61b6b02bbdc0bb3 | |
parent | 525204a7ca5c3c0aac8166d8f27abb988a84c850 (diff) |
- Move ObjC Expresssion AST's from Expr.h => ExprObjC.h
- #include ExprObjC.h in many places
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51703 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/AST.h | 1 | ||||
-rw-r--r-- | include/clang/AST/Expr.h | 279 | ||||
-rw-r--r-- | include/clang/AST/ExprObjC.h | 305 | ||||
-rw-r--r-- | include/clang/AST/StmtVisitor.h | 1 | ||||
-rw-r--r-- | include/clang/Analysis/PathSensitive/GRExprEngine.h | 3 | ||||
-rw-r--r-- | include/clang/Analysis/PathSensitive/GRTransferFuncs.h | 1 | ||||
-rw-r--r-- | lib/AST/CFG.cpp | 2 | ||||
-rw-r--r-- | lib/AST/Expr.cpp | 2 | ||||
-rw-r--r-- | lib/AST/Stmt.cpp | 1 | ||||
-rw-r--r-- | lib/AST/StmtPrinter.cpp | 1 | ||||
-rw-r--r-- | lib/AST/StmtSerialization.cpp | 1 | ||||
-rw-r--r-- | lib/Analysis/BasicObjCFoundationChecks.cpp | 1 | ||||
-rw-r--r-- | lib/CodeGen/CGObjC.cpp | 2 | ||||
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 1 | ||||
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 1 | ||||
-rw-r--r-- | lib/Sema/SemaExprObjC.cpp | 2 |
16 files changed, 320 insertions, 284 deletions
diff --git a/include/clang/AST/AST.h b/include/clang/AST/AST.h index 70d7b42279..07e923235e 100644 --- a/include/clang/AST/AST.h +++ b/include/clang/AST/AST.h @@ -19,6 +19,7 @@ #include "clang/AST/Decl.h" #include "clang/AST/DeclObjC.h" #include "clang/AST/Expr.h" +#include "clang/AST/ExprObjC.h" #include "clang/AST/Type.h" #include "clang/AST/StmtVisitor.h" diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index 0b16732ef6..3813455864 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -1390,285 +1390,6 @@ private: InitListExpr() : Expr(InitListExprClass, QualType()) {} }; -/// ObjCStringLiteral, used for Objective-C string literals -/// i.e. @"foo". -class ObjCStringLiteral : public Expr { - StringLiteral *String; - SourceLocation AtLoc; -public: - ObjCStringLiteral(StringLiteral *SL, QualType T, SourceLocation L) - : Expr(ObjCStringLiteralClass, T), String(SL), AtLoc(L) {} - - StringLiteral* getString() { return String; } - - const StringLiteral* getString() const { return String; } - - SourceLocation getAtLoc() const { return AtLoc; } - - virtual SourceRange getSourceRange() const { - return SourceRange(AtLoc, String->getLocEnd()); - } - - static bool classof(const Stmt *T) { - return T->getStmtClass() == ObjCStringLiteralClass; - } - static bool classof(const ObjCStringLiteral *) { return true; } - - // Iterators - virtual child_iterator child_begin(); - virtual child_iterator child_end(); - - virtual void EmitImpl(llvm::Serializer& S) const; - static ObjCStringLiteral* CreateImpl(llvm::Deserializer& D, ASTContext& C); -}; - -/// ObjCEncodeExpr, used for @encode in Objective-C. -class ObjCEncodeExpr : public Expr { - QualType EncType; - SourceLocation AtLoc, RParenLoc; -public: - ObjCEncodeExpr(QualType T, QualType ET, - SourceLocation at, SourceLocation rp) - : Expr(ObjCEncodeExprClass, T), EncType(ET), AtLoc(at), RParenLoc(rp) {} - - SourceLocation getAtLoc() const { return AtLoc; } - SourceLocation getRParenLoc() const { return RParenLoc; } - - virtual SourceRange getSourceRange() const { - return SourceRange(AtLoc, RParenLoc); - } - - QualType getEncodedType() const { return EncType; } - - static bool classof(const Stmt *T) { - return T->getStmtClass() == ObjCEncodeExprClass; - } - static bool classof(const ObjCEncodeExpr *) { return true; } - - // Iterators - virtual child_iterator child_begin(); - virtual child_iterator child_end(); - - virtual void EmitImpl(llvm::Serializer& S) const; - static ObjCEncodeExpr* CreateImpl(llvm::Deserializer& D, ASTContext& C); -}; - -/// ObjCSelectorExpr used for @selector in Objective-C. -class ObjCSelectorExpr : public Expr { - Selector SelName; - SourceLocation AtLoc, RParenLoc; -public: - ObjCSelectorExpr(QualType T, Selector selInfo, - SourceLocation at, SourceLocation rp) - : Expr(ObjCSelectorExprClass, T), SelName(selInfo), - AtLoc(at), RParenLoc(rp) {} - - Selector getSelector() const { return SelName; } - - SourceLocation getAtLoc() const { return AtLoc; } - SourceLocation getRParenLoc() const { return RParenLoc; } - - virtual SourceRange getSourceRange() const { - return SourceRange(AtLoc, RParenLoc); - } - - /// getNumArgs - Return the number of actual arguments to this call. - unsigned getNumArgs() const { return SelName.getNumArgs(); } - - static bool classof(const Stmt *T) { - return T->getStmtClass() == ObjCSelectorExprClass; - } - static bool classof(const ObjCSelectorExpr *) { return true; } - - // Iterators - virtual child_iterator child_begin(); - virtual child_iterator child_end(); - - virtual void EmitImpl(llvm::Serializer& S) const; - static ObjCSelectorExpr* CreateImpl(llvm::Deserializer& D, ASTContext& C); -}; - -/// ObjCProtocolExpr used for protocol in Objective-C. -class ObjCProtocolExpr : public Expr { - ObjCProtocolDecl *Protocol; - SourceLocation AtLoc, RParenLoc; -public: - ObjCProtocolExpr(QualType T, ObjCProtocolDecl *protocol, - SourceLocation at, SourceLocation rp) - : Expr(ObjCProtocolExprClass, T), Protocol(protocol), - AtLoc(at), RParenLoc(rp) {} - - ObjCProtocolDecl *getProtocol() const { return Protocol; } - - SourceLocation getAtLoc() const { return AtLoc; } - SourceLocation getRParenLoc() const { return RParenLoc; } - - virtual SourceRange getSourceRange() const { - return SourceRange(AtLoc, RParenLoc); - } - - static bool classof(const Stmt *T) { - return T->getStmtClass() == ObjCProtocolExprClass; - } - static bool classof(const ObjCProtocolExpr *) { return true; } - - // Iterators - virtual child_iterator child_begin(); - virtual child_iterator child_end(); -}; - -/// ObjCIvarRefExpr - A reference to an ObjC instance variable. -class ObjCIvarRefExpr : public Expr { - class ObjCIvarDecl *D; - SourceLocation Loc; - Expr *Base; - bool IsArrow:1; // True if this is "X->F", false if this is "X.F". - bool IsFreeIvar:1; // True if ivar reference has no base (self assumed). - -public: - ObjCIvarRefExpr(ObjCIvarDecl *d, QualType t, SourceLocation l, Expr *base=0, - bool arrow = false, bool freeIvar = false) : - Expr(ObjCIvarRefExprClass, t), D(d), Loc(l), Base(base), IsArrow(arrow), - IsFreeIvar(freeIvar) {} - - ObjCIvarDecl *getDecl() { return D; } - const ObjCIvarDecl *getDecl() const { return D; } - virtual SourceRange getSourceRange() const { - return isFreeIvar() ? SourceRange(Loc) - : SourceRange(getBase()->getLocStart(), Loc); - } - const Expr *getBase() const { return Base; } - Expr *getBase() { return Base; } - void setBase(Expr * base) { Base = base; } - bool isArrow() const { return IsArrow; } - bool isFreeIvar() const { return IsFreeIvar; } - - SourceLocation getLocation() const { return Loc; } - - static bool classof(const Stmt *T) { - return T->getStmtClass() == ObjCIvarRefExprClass; - } - static bool classof(const ObjCIvarRefExpr *) { return true; } - - // Iterators - virtual child_iterator child_begin(); - virtual child_iterator child_end(); - - virtual void EmitImpl(llvm::Serializer& S) const; - static ObjCIvarRefExpr* CreateImpl(llvm::Deserializer& D, ASTContext& C); -}; - -class ObjCMessageExpr : public Expr { - enum { RECEIVER=0, ARGS_START=1 }; - - Expr **SubExprs; - - unsigned NumArgs; - - // A unigue name for this message. - Selector SelName; - - // A method prototype for this message (optional). - // FIXME: Since method decls contain the selector, and most messages have a - // prototype, consider devising a scheme for unifying SelName/MethodProto. - ObjCMethodDecl *MethodProto; - - SourceLocation LBracloc, RBracloc; - - // constructor used during deserialization - ObjCMessageExpr(Selector selInfo, QualType retType, - SourceLocation LBrac, SourceLocation RBrac, - Expr **ArgExprs, unsigned nargs) - : Expr(ObjCMessageExprClass, retType), NumArgs(nargs), SelName(selInfo), - MethodProto(NULL), LBracloc(LBrac), RBracloc(RBrac) {} - -public: - // constructor for class messages. - // FIXME: clsName should be typed to ObjCInterfaceType - ObjCMessageExpr(IdentifierInfo *clsName, Selector selInfo, - QualType retType, ObjCMethodDecl *methDecl, - SourceLocation LBrac, SourceLocation RBrac, - Expr **ArgExprs, unsigned NumArgs); - // constructor for instance messages. - ObjCMessageExpr(Expr *receiver, Selector selInfo, - QualType retType, ObjCMethodDecl *methDecl, - SourceLocation LBrac, SourceLocation RBrac, - Expr **ArgExprs, unsigned NumArgs); - - ~ObjCMessageExpr() { - delete [] SubExprs; - } - - /// getReceiver - Returns the receiver of the message expression. - /// This can be NULL if the message is for instance methods. For - /// instance methods, use getClassName. - Expr *getReceiver() { - uintptr_t x = (uintptr_t) SubExprs[RECEIVER]; - return x & 0x1 ? NULL : (Expr*) x; - } - const Expr *getReceiver() const { - return const_cast<ObjCMessageExpr*>(this)->getReceiver(); - } - - Selector getSelector() const { return SelName; } - - const ObjCMethodDecl *getMethodDecl() const { return MethodProto; } - ObjCMethodDecl *getMethodDecl() { return MethodProto; } - - /// getClassName - For instance methods, this returns the invoked class, - /// and returns NULL otherwise. For regular methods, use getReceiver. - IdentifierInfo *getClassName() { - uintptr_t x = (uintptr_t) SubExprs[RECEIVER]; - return x & 0x1 ? (IdentifierInfo*) (x & ~0x1) : NULL; - } - const IdentifierInfo *getClassName() const { - return const_cast<ObjCMessageExpr*>(this)->getClassName(); - } - - /// getNumArgs - Return the number of actual arguments to this call. - unsigned getNumArgs() const { return NumArgs; } - - /// getArg - Return the specified argument. - Expr *getArg(unsigned Arg) { - assert(Arg < NumArgs && "Arg access out of range!"); - return SubExprs[Arg+ARGS_START]; - } - const Expr *getArg(unsigned Arg) const { - assert(Arg < NumArgs && "Arg access out of range!"); - return SubExprs[Arg+ARGS_START]; - } - /// setArg - Set the specified argument. - void setArg(unsigned Arg, Expr *ArgExpr) { - assert(Arg < NumArgs && "Arg access out of range!"); - SubExprs[Arg+ARGS_START] = ArgExpr; - } - - virtual SourceRange getSourceRange() const { - return SourceRange(LBracloc, RBracloc); - } - - static bool classof(const Stmt *T) { - return T->getStmtClass() == ObjCMessageExprClass; - } - static bool classof(const ObjCMessageExpr *) { return true; } - - // Iterators - virtual child_iterator child_begin(); - virtual child_iterator child_end(); - - typedef Expr** arg_iterator; - typedef const Expr* const* const_arg_iterator; - - arg_iterator arg_begin() { return &SubExprs[ARGS_START]; } - arg_iterator arg_end() { return arg_begin() + NumArgs; } - const_arg_iterator arg_begin() const { return &SubExprs[ARGS_START]; } - const_arg_iterator arg_end() const { return arg_begin() + NumArgs; } - - // Serialization. - virtual void EmitImpl(llvm::Serializer& S) const; - static ObjCMessageExpr* CreateImpl(llvm::Deserializer& D, ASTContext& C); -}; - } // end namespace clang #endif diff --git a/include/clang/AST/ExprObjC.h b/include/clang/AST/ExprObjC.h new file mode 100644 index 0000000000..3242d25ecf --- /dev/null +++ b/include/clang/AST/ExprObjC.h @@ -0,0 +1,305 @@ +//===--- ExprObjC.h - Classes for representing ObjC expressions -*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the ExprObjC interface and subclasses. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_AST_EXPROBJC_H +#define LLVM_CLANG_AST_EXPROBJC_H + +#include "clang/AST/Expr.h" + +namespace clang { + class IdentifierInfo; + class Selector; + class ASTContext; + +/// ObjCStringLiteral, used for Objective-C string literals +/// i.e. @"foo". +class ObjCStringLiteral : public Expr { + StringLiteral *String; + SourceLocation AtLoc; +public: + ObjCStringLiteral(StringLiteral *SL, QualType T, SourceLocation L) + : Expr(ObjCStringLiteralClass, T), String(SL), AtLoc(L) {} + + StringLiteral* getString() { return String; } + + const StringLiteral* getString() const { return String; } + + SourceLocation getAtLoc() const { return AtLoc; } + + virtual SourceRange getSourceRange() const { + return SourceRange(AtLoc, String->getLocEnd()); + } + + static bool classof(const Stmt *T) { + return T->getStmtClass() == ObjCStringLiteralClass; + } + static bool classof(const ObjCStringLiteral *) { return true; } + + // Iterators + virtual child_iterator child_begin(); + virtual child_iterator child_end(); + + virtual void EmitImpl(llvm::Serializer& S) const; + static ObjCStringLiteral* CreateImpl(llvm::Deserializer& D, ASTContext& C); +}; + +/// ObjCEncodeExpr, used for @encode in Objective-C. +class ObjCEncodeExpr : public Expr { + QualType EncType; + SourceLocation AtLoc, RParenLoc; +public: + ObjCEncodeExpr(QualType T, QualType ET, + SourceLocation at, SourceLocation rp) + : Expr(ObjCEncodeExprClass, T), EncType(ET), AtLoc(at), RParenLoc(rp) {} + + SourceLocation getAtLoc() const { return AtLoc; } + SourceLocation getRParenLoc() const { return RParenLoc; } + + virtual SourceRange getSourceRange() const { + return SourceRange(AtLoc, RParenLoc); + } + + QualType getEncodedType() const { return EncType; } + + static bool classof(const Stmt *T) { + return T->getStmtClass() == ObjCEncodeExprClass; + } + static bool classof(const ObjCEncodeExpr *) { return true; } + + // Iterators + virtual child_iterator child_begin(); + virtual child_iterator child_end(); + + virtual void EmitImpl(llvm::Serializer& S) const; + static ObjCEncodeExpr* CreateImpl(llvm::Deserializer& D, ASTContext& C); +}; + +/// ObjCSelectorExpr used for @selector in Objective-C. +class ObjCSelectorExpr : public Expr { + Selector SelName; + SourceLocation AtLoc, RParenLoc; +public: + ObjCSelectorExpr(QualType T, Selector selInfo, + SourceLocation at, SourceLocation rp) + : Expr(ObjCSelectorExprClass, T), SelName(selInfo), + AtLoc(at), RParenLoc(rp) {} + + Selector getSelector() const { return SelName; } + + SourceLocation getAtLoc() const { return AtLoc; } + SourceLocation getRParenLoc() const { return RParenLoc; } + + virtual SourceRange getSourceRange() const { + return SourceRange(AtLoc, RParenLoc); + } + + /// getNumArgs - Return the number of actual arguments to this call. + unsigned getNumArgs() const { return SelName.getNumArgs(); } + + static bool classof(const Stmt *T) { + return T->getStmtClass() == ObjCSelectorExprClass; + } + static bool classof(const ObjCSelectorExpr *) { return true; } + + // Iterators + virtual child_iterator child_begin(); + virtual child_iterator child_end(); + + virtual void EmitImpl(llvm::Serializer& S) const; + static ObjCSelectorExpr* CreateImpl(llvm::Deserializer& D, ASTContext& C); +}; + +/// ObjCProtocolExpr used for protocol in Objective-C. +class ObjCProtocolExpr : public Expr { + ObjCProtocolDecl *Protocol; + SourceLocation AtLoc, RParenLoc; +public: + ObjCProtocolExpr(QualType T, ObjCProtocolDecl *protocol, + SourceLocation at, SourceLocation rp) + : Expr(ObjCProtocolExprClass, T), Protocol(protocol), + AtLoc(at), RParenLoc(rp) {} + + ObjCProtocolDecl *getProtocol() const { return Protocol; } + + SourceLocation getAtLoc() const { return AtLoc; } + SourceLocation getRParenLoc() const { return RParenLoc; } + + virtual SourceRange getSourceRange() const { + return SourceRange(AtLoc, RParenLoc); + } + + static bool classof(const Stmt *T) { + return T->getStmtClass() == ObjCProtocolExprClass; + } + static bool classof(const ObjCProtocolExpr *) { return true; } + + // Iterators + virtual child_iterator child_begin(); + virtual child_iterator child_end(); +}; + +/// ObjCIvarRefExpr - A reference to an ObjC instance variable. +class ObjCIvarRefExpr : public Expr { + class ObjCIvarDecl *D; + SourceLocation Loc; + Expr *Base; + bool IsArrow:1; // True if this is "X->F", false if this is "X.F". + bool IsFreeIvar:1; // True if ivar reference has no base (self assumed). + +public: + ObjCIvarRefExpr(ObjCIvarDecl *d, QualType t, SourceLocation l, Expr *base=0, + bool arrow = false, bool freeIvar = false) : + Expr(ObjCIvarRefExprClass, t), D(d), Loc(l), Base(base), IsArrow(arrow), + IsFreeIvar(freeIvar) {} + + ObjCIvarDecl *getDecl() { return D; } + const ObjCIvarDecl *getDecl() const { return D; } + virtual SourceRange getSourceRange() const { + return isFreeIvar() ? SourceRange(Loc) + : SourceRange(getBase()->getLocStart(), Loc); + } + const Expr *getBase() const { return Base; } + Expr *getBase() { return Base; } + void setBase(Expr * base) { Base = base; } + bool isArrow() const { return IsArrow; } + bool isFreeIvar() const { return IsFreeIvar; } + + SourceLocation getLocation() const { return Loc; } + + static bool classof(const Stmt *T) { + return T->getStmtClass() == ObjCIvarRefExprClass; + } + static bool classof(const ObjCIvarRefExpr *) { return true; } + + // Iterators + virtual child_iterator child_begin(); + virtual child_iterator child_end(); + + virtual void EmitImpl(llvm::Serializer& S) const; + static ObjCIvarRefExpr* CreateImpl(llvm::Deserializer& D, ASTContext& C); +}; + +class ObjCMessageExpr : public Expr { + enum { RECEIVER=0, ARGS_START=1 }; + + Expr **SubExprs; + + unsigned NumArgs; + + // A unigue name for this message. + Selector SelName; + + // A method prototype for this message (optional). + // FIXME: Since method decls contain the selector, and most messages have a + // prototype, consider devising a scheme for unifying SelName/MethodProto. + ObjCMethodDecl *MethodProto; + + SourceLocation LBracloc, RBracloc; + + // constructor used during deserialization + ObjCMessageExpr(Selector selInfo, QualType retType, + SourceLocation LBrac, SourceLocation RBrac, + Expr **ArgExprs, unsigned nargs) + : Expr(ObjCMessageExprClass, retType), NumArgs(nargs), SelName(selInfo), + MethodProto(NULL), LBracloc(LBrac), RBracloc(RBrac) {} + +public: + // constructor for class messages. + // FIXME: clsName should be typed to ObjCInterfaceType + ObjCMessageExpr(IdentifierInfo *clsName, Selector selInfo, + QualType retType, ObjCMethodDecl *methDecl, + SourceLocation LBrac, SourceLocation RBrac, + Expr **ArgExprs, unsigned NumArgs); + // constructor for instance messages. + ObjCMessageExpr(Expr *receiver, Selector selInfo, + QualType retType, ObjCMethodDecl *methDecl, + SourceLocation LBrac, SourceLocation RBrac, + Expr **ArgExprs, unsigned NumArgs); + + ~ObjCMessageExpr() { + delete [] SubExprs; + } + + /// getReceiver - Returns the receiver of the message expression. + /// This can be NULL if the message is for instance methods. For + /// instance methods, use getClassName. + Expr *getReceiver() { + uintptr_t x = (uintptr_t) SubExprs[RECEIVER]; + return x & 0x1 ? NULL : (Expr*) x; + } + const Expr *getReceiver() const { + return const_cast<ObjCMessageExpr*>(this)->getReceiver(); + } + + Selector getSelector() const { return SelName; } + + const ObjCMethodDecl *getMethodDecl() const { return MethodProto; } + ObjCMethodDecl *getMethodDecl() { return MethodProto; } + + /// getClassName - For instance methods, this returns the invoked class, + /// and returns NULL otherwise. For regular methods, use getReceiver. + IdentifierInfo *getClassName() { + uintptr_t x = (uintptr_t) SubExprs[RECEIVER]; + return x & 0x1 ? (IdentifierInfo*) (x & ~0x1) : NULL; + } + const IdentifierInfo *getClassName() const { + return const_cast<ObjCMessageExpr*>(this)->getClassName(); + } + + /// getNumArgs - Return the number of actual arguments to this call. + unsigned getNumArgs() const { return NumArgs; } + + /// getArg - Return the specified argument. + Expr *getArg(unsigned Arg) { + assert(Arg < NumArgs && "Arg access out of range!"); + return SubExprs[Arg+ARGS_START]; + } + const Expr *getArg(unsigned Arg) const { + assert(Arg < NumArgs && "Arg access out of range!"); + return SubExprs[Arg+ARGS_START]; + } + /// setArg - Set the specified argument. + void setArg(unsigned Arg, Expr *ArgExpr) { + assert(Arg < NumArgs && "Arg access out of range!"); + SubExprs[Arg+ARGS_START] = ArgExpr; + } + + virtual SourceRange getSourceRange() const { + return SourceRange(LBracloc, RBracloc); + } + + static bool classof(const Stmt *T) { + return T->getStmtClass() == ObjCMessageExprClass; + } + static bool classof(const ObjCMessageExpr *) { return true; } + + // Iterators + virtual child_iterator child_begin(); + virtual child_iterator child_end(); + + typedef Expr** arg_iterator; + typedef const Expr* const* const_arg_iterator; + + arg_iterator arg_begin() { return &SubExprs[ARGS_START]; } + arg_iterator arg_end() { return arg_begin() + NumArgs; } + const_arg_iterator arg_begin() const { return &SubExprs[ARGS_START]; } + const_arg_iterator arg_end() const { return arg_begin() + NumArgs; } + + // Serialization. + virtual void EmitImpl(llvm::Serializer& S) const; + static ObjCMessageExpr* CreateImpl(llvm::Deserializer& D, ASTContext& C); +}; + +} // end namespace clang + +#endif diff --git a/include/clang/AST/StmtVisitor.h b/include/clang/AST/StmtVisitor.h index 86b566b9a3..fb1e4d1202 100644 --- a/include/clang/AST/StmtVisitor.h +++ b/include/clang/AST/StmtVisitor.h @@ -15,6 +15,7 @@ #define LLVM_CLANG_AST_STMTVISITOR_H #include "clang/AST/ExprCXX.h" +#include "clang/AST/ExprObjC.h" namespace clang { diff --git a/include/clang/Analysis/PathSensitive/GRExprEngine.h b/include/clang/Analysis/PathSensitive/GRExprEngine.h index fb8af773c1..4ea03adc4f 100644 --- a/include/clang/Analysis/PathSensitive/GRExprEngine.h +++ b/include/clang/Analysis/PathSensitive/GRExprEngine.h @@ -21,13 +21,14 @@ #include "clang/Analysis/PathSensitive/GRSimpleAPICheck.h" #include "clang/Analysis/PathSensitive/GRTransferFuncs.h" #include "clang/AST/Type.h" +#include "clang/AST/ExprObjC.h" namespace clang { class BugType; class PathDiagnosticClient; class Diagnostic; - + class GRExprEngine { public: diff --git a/include/clang/Analysis/PathSensitive/GRTransferFuncs.h b/include/clang/Analysis/PathSensitive/GRTransferFuncs.h index 3dd2969413..323358e0c3 100644 --- a/include/clang/Analysis/PathSensitive/GRTransferFuncs.h +++ b/include/clang/Analysis/PathSensitive/GRTransferFuncs.h @@ -22,6 +22,7 @@ namespace clang { class GRExprEngine; + class ObjCMessageExpr; class GRTransferFuncs { public: diff --git a/lib/AST/CFG.cpp b/lib/AST/CFG.cpp index 077f75c384..aad9ee7ada 100644 --- a/lib/AST/CFG.cpp +++ b/lib/AST/CFG.cpp @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// #include "clang/AST/CFG.h" -#include "clang/AST/Expr.h" +#include "clang/AST/ExprObjC.h" #include "clang/AST/StmtVisitor.h" #include "clang/AST/PrettyPrinter.h" #include "llvm/ADT/DenseMap.h" diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index d26ad1025d..502dd3b8e5 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/AST/Expr.h" +#include "clang/AST/ExprObjC.h" #include "clang/AST/ASTContext.h" #include "clang/AST/StmtVisitor.h" #include "clang/Basic/IdentifierTable.h" diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp index f89e2f40fa..31433a44b6 100644 --- a/lib/AST/Stmt.cpp +++ b/lib/AST/Stmt.cpp @@ -13,6 +13,7 @@ #include "clang/AST/Stmt.h" #include "clang/AST/ExprCXX.h" +#include "clang/AST/ExprObjC.h" #include "clang/AST/StmtVisitor.h" #include "clang/Basic/IdentifierTable.h" using namespace clang; diff --git a/lib/AST/StmtPrinter.cpp b/lib/AST/StmtPrinter.cpp index 6e6594c0d8..b55869b082 100644 --- a/lib/AST/StmtPrinter.cpp +++ b/lib/AST/StmtPrinter.cpp @@ -16,6 +16,7 @@ #include "clang/AST/Decl.h" #include "clang/AST/DeclObjC.h" #include "clang/AST/ExprCXX.h" +#include "clang/AST/ExprObjC.h" #include "clang/AST/PrettyPrinter.h" #include "clang/Basic/IdentifierTable.h" #include "llvm/Support/Compiler.h" diff --git a/lib/AST/StmtSerialization.cpp b/lib/AST/StmtSerialization.cpp index adaa559b06..1e5229e26a 100644 --- a/lib/AST/StmtSerialization.cpp +++ b/lib/AST/StmtSerialization.cpp @@ -14,6 +14,7 @@ #include "clang/AST/Expr.h" #include "clang/AST/ExprCXX.h" +#include "clang/AST/ExprObjC.h" #include "llvm/Bitcode/Serialize.h" #include "llvm/Bitcode/Deserialize.h" diff --git a/lib/Analysis/BasicObjCFoundationChecks.cpp b/lib/Analysis/BasicObjCFoundationChecks.cpp index 169438027f..cf26d1e30b 100644 --- a/lib/Analysis/BasicObjCFoundationChecks.cpp +++ b/lib/Analysis/BasicObjCFoundationChecks.cpp @@ -21,6 +21,7 @@ #include "clang/Analysis/PathSensitive/BugReporter.h" #include "clang/Analysis/PathDiagnostic.h" #include "clang/AST/Expr.h" +#include "clang/AST/ExprObjC.h" #include "clang/AST/ASTContext.h" #include "llvm/Support/Compiler.h" diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp index 299698f1f3..d666ab1f9c 100644 --- a/lib/CodeGen/CGObjC.cpp +++ b/lib/CodeGen/CGObjC.cpp @@ -14,7 +14,7 @@ #include "CGObjCRuntime.h" #include "CodeGenFunction.h" #include "CodeGenModule.h" -#include "clang/AST/Expr.h" +#include "clang/AST/ExprObjC.h" #include "llvm/Constant.h" using namespace clang; using namespace CodeGen; diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index f403858e75..a7135ea4cf 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -15,6 +15,7 @@ #include "clang/Basic/LangOptions.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Expr.h" +#include "clang/AST/ExprObjC.h" #include "clang/AST/StmtVisitor.h" #include "clang/AST/Type.h" #include "clang/Parse/Scope.h" diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 7dda9b141d..04561f5f62 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -16,6 +16,7 @@ #include "clang/AST/ASTContext.h" #include "clang/AST/Expr.h" #include "clang/AST/ExprCXX.h" +#include "clang/AST/ExprObjC.h" #include "clang/Parse/DeclSpec.h" #include "clang/Lex/Preprocessor.h" #include "clang/Lex/LiteralSupport.h" diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp index 62d43616b5..c55c05893f 100644 --- a/lib/Sema/SemaExprObjC.cpp +++ b/lib/Sema/SemaExprObjC.cpp @@ -14,7 +14,7 @@ #include "Sema.h" #include "clang/AST/ASTContext.h" #include "clang/AST/DeclObjC.h" -#include "clang/AST/Expr.h" +#include "clang/AST/ExprObjC.h" using namespace clang; Sema::ExprResult Sema::ParseObjCStringLiteral(SourceLocation *AtLocs, |