summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-02-17 20:20:37 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-02-17 20:20:37 +0000
commit0cf6625ff848d67569e7db9f13fa97c9a680c588 (patch)
tree540b6ad39cb428faa9433fd569ea7285f9bc84db
parent19c44508a1838e80f1aaf3dd18c9f8d8d3a59075 (diff)
downloadbcm5719-llvm-0cf6625ff848d67569e7db9f13fa97c9a680c588.tar.gz
bcm5719-llvm-0cf6625ff848d67569e7db9f13fa97c9a680c588.zip
All Decls have a DeclContext now, hooray! Fans of consistency rejoice.
Pass the DeclContext to ObjCIvarDecls as well. llvm-svn: 64801
-rw-r--r--clang/include/clang/AST/DeclObjC.h8
-rw-r--r--clang/lib/AST/DeclObjC.cpp8
-rw-r--r--clang/lib/Sema/SemaDecl.cpp2
3 files changed, 9 insertions, 9 deletions
diff --git a/clang/include/clang/AST/DeclObjC.h b/clang/include/clang/AST/DeclObjC.h
index 450fdc55f6c..88cf2276c71 100644
--- a/clang/include/clang/AST/DeclObjC.h
+++ b/clang/include/clang/AST/DeclObjC.h
@@ -504,13 +504,13 @@ public:
};
private:
- ObjCIvarDecl(SourceLocation L, IdentifierInfo *Id, QualType T,
- AccessControl ac, Expr *BW)
- : FieldDecl(ObjCIvar, 0, L, Id, T, BW, /*Mutable=*/false),
+ ObjCIvarDecl(DeclContext *DC, SourceLocation L, IdentifierInfo *Id,
+ QualType T, AccessControl ac, Expr *BW)
+ : FieldDecl(ObjCIvar, DC, L, Id, T, BW, /*Mutable=*/false),
DeclAccess(ac) {}
public:
- static ObjCIvarDecl *Create(ASTContext &C, SourceLocation L,
+ static ObjCIvarDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L,
IdentifierInfo *Id, QualType T,
AccessControl ac, Expr *BW = NULL);
diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp
index 162ead60f89..506d3e4c387 100644
--- a/clang/lib/AST/DeclObjC.cpp
+++ b/clang/lib/AST/DeclObjC.cpp
@@ -78,10 +78,10 @@ void ObjCInterfaceDecl::Destroy(ASTContext& C) {
}
-ObjCIvarDecl *ObjCIvarDecl::Create(ASTContext &C, SourceLocation L,
- IdentifierInfo *Id, QualType T,
- AccessControl ac, Expr *BW) {
- return new (C) ObjCIvarDecl(L, Id, T, ac, BW);
+ObjCIvarDecl *ObjCIvarDecl::Create(ASTContext &C, DeclContext *DC,
+ SourceLocation L, IdentifierInfo *Id,
+ QualType T, AccessControl ac, Expr *BW) {
+ return new (C) ObjCIvarDecl(DC, L, Id, T, ac, BW);
}
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index b5e6bd69739..5eb2e6a95ba 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -3559,7 +3559,7 @@ Sema::DeclTy *Sema::ActOnIvar(Scope *S,
: ObjCIvarDecl::None;
// Construct the decl.
- ObjCIvarDecl *NewID = ObjCIvarDecl::Create(Context, Loc, II, T, ac,
+ ObjCIvarDecl *NewID = ObjCIvarDecl::Create(Context, CurContext, Loc, II, T,ac,
(Expr *)BitfieldWidth);
if (II) {
OpenPOWER on IntegriCloud