[cfe-commits] r39266 - in /cfe/cfe/trunk: AST/ASTContext.cpp AST/Sema.h Sema/Sema.h

sabre at cs.uiuc.edu sabre at cs.uiuc.edu
Wed Jul 11 09:42:11 PDT 2007


Author: sabre
Date: Wed Jul 11 11:42:10 2007
New Revision: 39266

URL: http://llvm.org/viewvc/llvm-project?rev=39266&view=rev
Log:
Make name lookup properly obey C namespaces, simplify decl construction byeliminating the 'next' pointer from the ctor, and add initial support forparsing struct/union tags.

Modified:
    cfe/cfe/trunk/AST/ASTContext.cpp
    cfe/cfe/trunk/AST/Sema.h
    cfe/cfe/trunk/Sema/Sema.h

Modified: cfe/cfe/trunk/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/AST/ASTContext.cpp?rev=39266&r1=39265&r2=39266&view=diff

==============================================================================
--- cfe/cfe/trunk/AST/ASTContext.cpp (original)
+++ cfe/cfe/trunk/AST/ASTContext.cpp Wed Jul 11 11:42:10 2007
@@ -211,7 +211,7 @@
 
   // FIXME: does this lose qualifiers from the typedef??
   
-  Type *Canonical = Decl->getType().getTypePtr();
+  Type *Canonical = Decl->getUnderlyingType().getTypePtr();
   Types.push_back(new TypeNameType(Decl, Canonical));
   return Types.back();
 }

Modified: cfe/cfe/trunk/AST/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/AST/Sema.h?rev=39266&r1=39265&r2=39266&view=diff

==============================================================================
--- cfe/cfe/trunk/AST/Sema.h (original)
+++ cfe/cfe/trunk/AST/Sema.h Wed Jul 11 11:42:10 2007
@@ -74,7 +74,7 @@
   virtual DeclTy *ParseFunctionDefBody(DeclTy *Decl, StmtTy *Body);
   virtual void PopScope(SourceLocation Loc, Scope *S);
   
-  Decl *ParseTypedefDecl(Scope *S, Declarator &D, Decl *PrevDecl);
+  Decl *ParseTypedefDecl(Scope *S, Declarator &D);
   
   /// ParsedFreeStandingDeclSpec - This method is invoked when a declspec with
   /// no declarator (e.g. "struct foo;") is parsed.
@@ -83,6 +83,10 @@
   Decl *ImplicitlyDefineFunction(SourceLocation Loc, IdentifierInfo &II,
                                  Scope *S);
   
+  virtual DeclTy *ParseStructUnionTag(Scope *S, bool isUnion,
+                                      SourceLocation KWLoc,IdentifierInfo *Name,
+                                      SourceLocation NameLoc);
+  
   //===--------------------------------------------------------------------===//
   // Statement Parsing Callbacks: SemaStmt.cpp.
 

Modified: cfe/cfe/trunk/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Sema/Sema.h?rev=39266&r1=39265&r2=39266&view=diff

==============================================================================
--- cfe/cfe/trunk/Sema/Sema.h (original)
+++ cfe/cfe/trunk/Sema/Sema.h Wed Jul 11 11:42:10 2007
@@ -74,7 +74,7 @@
   virtual DeclTy *ParseFunctionDefBody(DeclTy *Decl, StmtTy *Body);
   virtual void PopScope(SourceLocation Loc, Scope *S);
   
-  Decl *ParseTypedefDecl(Scope *S, Declarator &D, Decl *PrevDecl);
+  Decl *ParseTypedefDecl(Scope *S, Declarator &D);
   
   /// ParsedFreeStandingDeclSpec - This method is invoked when a declspec with
   /// no declarator (e.g. "struct foo;") is parsed.
@@ -83,6 +83,10 @@
   Decl *ImplicitlyDefineFunction(SourceLocation Loc, IdentifierInfo &II,
                                  Scope *S);
   
+  virtual DeclTy *ParseStructUnionTag(Scope *S, bool isUnion,
+                                      SourceLocation KWLoc,IdentifierInfo *Name,
+                                      SourceLocation NameLoc);
+  
   //===--------------------------------------------------------------------===//
   // Statement Parsing Callbacks: SemaStmt.cpp.
 





More information about the cfe-commits mailing list