aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2007-10-31 18:48:14 +0000
committerFariborz Jahanian <fjahanian@apple.com>2007-10-31 18:48:14 +0000
commit3a3ca1b35a7121aea0bf465a192dce748465e10f (patch)
tree412075ffef4feb9054827a049df26c445b0a2f05 /include/clang
parent8ee529b5671295ea38c249df8b9d3766c905cfa7 (diff)
Fixed problem with rewriting stand-alone @implementation (with no matching @interface).
A new test case added. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43568 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/AST/DeclObjC.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h
index 0ca98bb6ec..dcff5ea36e 100644
--- a/include/clang/AST/DeclObjC.h
+++ b/include/clang/AST/DeclObjC.h
@@ -72,19 +72,21 @@ class ObjcInterfaceDecl : public TypeDecl {
/// List of categories defined for this class.
ObjcCategoryDecl *CategoryList;
- bool ForwardDecl; // declared with @class.
+ bool ForwardDecl:1; // declared with @class.
+ bool InternalInterface:1; // true - no @interface for @implementation
SourceLocation EndLoc; // marks the '>', '}', or identifier.
SourceLocation AtEndLoc; // marks the end of the entire interface.
public:
ObjcInterfaceDecl(SourceLocation atLoc, unsigned numRefProtos,
- IdentifierInfo *Id, bool FD = false)
+ IdentifierInfo *Id, bool FD = false,
+ bool isInternal = false)
: TypeDecl(ObjcInterface, atLoc, Id, 0), SuperClass(0),
ReferencedProtocols(0), NumReferencedProtocols(-1), Ivars(0),
NumIvars(-1),
InstanceMethods(0), NumInstanceMethods(-1),
ClassMethods(0), NumClassMethods(-1),
- CategoryList(0), ForwardDecl(FD) {
+ CategoryList(0), ForwardDecl(FD), InternalInterface(isInternal) {
AllocIntfRefProtocols(numRefProtos);
}
@@ -148,7 +150,7 @@ public:
/// ImplicitInterfaceDecl - check that this is an implicitely declared
/// ObjcInterfaceDecl node. This is for legacy objective-c @implementation
/// declaration without an @interface declaration.
- bool ImplicitInterfaceDecl() const { return getLocation().isInvalid(); }
+ bool ImplicitInterfaceDecl() const { return InternalInterface; }
static bool classof(const Decl *D) { return D->getKind() == ObjcInterface; }
static bool classof(const ObjcInterfaceDecl *D) { return true; }