From db0ee1da16e9dbec19b144c9cd96ee9f55fe0c53 Mon Sep 17 00:00:00 2001 From: John McCall Date: Sat, 19 Dec 2009 10:53:49 +0000 Subject: [PATCH] Kill off PreDeclaratorDC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91772 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/Sema.cpp | 4 ++-- lib/Sema/Sema.h | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index ef6147420b..6119b13b73 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -350,7 +350,7 @@ Sema::Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer, : LangOpts(pp.getLangOptions()), PP(pp), Context(ctxt), Consumer(consumer), Diags(PP.getDiagnostics()), SourceMgr(PP.getSourceManager()), ExternalSource(0), CodeCompleter(CodeCompleter), CurContext(0), - PreDeclaratorDC(0), CurBlock(0), PackContext(0), ParsingDeclDepth(0), + CurBlock(0), PackContext(0), ParsingDeclDepth(0), IdResolver(pp.getLangOptions()), StdNamespace(0), StdBadAlloc(0), GlobalNewDeleteDeclared(false), CompleteTranslationUnit(CompleteTranslationUnit), @@ -815,7 +815,7 @@ void Sema::ActOnEndOfTranslationUnit() { //===----------------------------------------------------------------------===// DeclContext *Sema::getFunctionLevelDeclContext() { - DeclContext *DC = PreDeclaratorDC ? PreDeclaratorDC : CurContext; + DeclContext *DC = CurContext; while (isa(DC)) DC = DC->getParent(); diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h index 28993c7c5a..41081f2f13 100644 --- a/lib/Sema/Sema.h +++ b/lib/Sema/Sema.h @@ -192,10 +192,6 @@ public: /// CurContext - This is the current declaration context of parsing. DeclContext *CurContext; - /// PreDeclaratorDC - Keeps the declaration context before switching to the - /// context of a declarator's nested-name-specifier. - DeclContext *PreDeclaratorDC; - /// CurBlock - If inside of a block definition, this contains a pointer to /// the active block object that represents it. BlockSemaInfo *CurBlock; -- 2.40.0