[cfe-commits] r64801 - in /cfe/trunk: include/clang/AST/DeclObjC.h lib/AST/DeclObjC.cpp lib/Sema/SemaDecl.cpp

Argiris Kirtzidis akyrtzi at gmail.com
Tue Feb 17 12:20:37 PST 2009


Author: akirtzidis
Date: Tue Feb 17 14:20:37 2009
New Revision: 64801

URL: http://llvm.org/viewvc/llvm-project?rev=64801&view=rev
Log:
All Decls have a DeclContext now, hooray! Fans of consistency rejoice.

Pass the DeclContext to ObjCIvarDecls as well.

Modified:
    cfe/trunk/include/clang/AST/DeclObjC.h
    cfe/trunk/lib/AST/DeclObjC.cpp
    cfe/trunk/lib/Sema/SemaDecl.cpp

Modified: cfe/trunk/include/clang/AST/DeclObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=64801&r1=64800&r2=64801&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Tue Feb 17 14:20:37 2009
@@ -504,13 +504,13 @@
   };
   
 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);
     

Modified: cfe/trunk/lib/AST/DeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclObjC.cpp?rev=64801&r1=64800&r2=64801&view=diff

==============================================================================
--- cfe/trunk/lib/AST/DeclObjC.cpp (original)
+++ cfe/trunk/lib/AST/DeclObjC.cpp Tue Feb 17 14:20:37 2009
@@ -78,10 +78,10 @@
 }
 
 
-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);
 }
 
 

Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=64801&r1=64800&r2=64801&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Tue Feb 17 14:20:37 2009
@@ -3559,7 +3559,7 @@
                                         : 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) {





More information about the cfe-commits mailing list