[cfe-commits] r91770 - /cfe/trunk/lib/Sema/SemaDecl.cpp
    John McCall 
    rjmccall at apple.com
       
    Sat Dec 19 01:35:56 PST 2009
    
    
  
Author: rjmccall
Date: Sat Dec 19 03:35:56 2009
New Revision: 91770
URL: http://llvm.org/viewvc/llvm-project?rev=91770&view=rev
Log:
Don't use EnterDeclaratorContext when rebuilding a type in the current
instantiation, since we're not using a Scope object for that anyway.
Modified:
    cfe/trunk/lib/Sema/SemaDecl.cpp
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=91770&r1=91769&r2=91770&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Sat Dec 19 03:35:56 2009
@@ -1890,9 +1890,12 @@
     if (DeclContext *DC = computeDeclContext(D.getCXXScopeSpec(), true)) {
       // FIXME: Preserve type source info.
       QualType T = GetTypeFromParser(DS.getTypeRep());
-      EnterDeclaratorContext(S, DC);
+
+      DeclContext *SavedContext = CurContext;
+      CurContext = DC;
       T = RebuildTypeInCurrentInstantiation(T, D.getIdentifierLoc(), Name);
-      ExitDeclaratorContext(S);
+      CurContext = SavedContext;
+
       if (T.isNull())
         return DeclPtrTy();
       DS.UpdateTypeRep(T.getAsOpaquePtr());
    
    
More information about the cfe-commits
mailing list