diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-11-08 17:17:31 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-11-08 17:17:31 +0000 |
commit | ef6e647b8d3268a765c2c4dd7f8a73cad281a8e6 (patch) | |
tree | 7c2cf4ee0c7bb0ef71add2c96f621cdfd3f1ea2b /lib/Sema/Sema.cpp | |
parent | 751810234ffb45327f23c5f9fda0b944e480bd2b (diff) |
Implement Sema support for C++ nested-name-specifiers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58916 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r-- | lib/Sema/Sema.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index 2113417753..532be59cd4 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -35,7 +35,7 @@ static inline RecordDecl *CreateStructDecl(ASTContext &C, const char *Name) void Sema::ActOnTranslationUnitScope(SourceLocation Loc, Scope *S) { TUScope = S; - CurContext = Context.getTranslationUnitDecl(); + PushDeclContext(Context.getTranslationUnitDecl()); if (!PP.getLangOptions().ObjC1) return; // Synthesize "typedef struct objc_selector *SEL;" @@ -81,8 +81,8 @@ void Sema::ActOnTranslationUnitScope(SourceLocation Loc, Scope *S) { } Sema::Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer) - : PP(pp), Context(ctxt), Consumer(consumer), CurContext(0), CurBlock(0), - PackContext(0), IdResolver(pp.getLangOptions()) { + : PP(pp), Context(ctxt), Consumer(consumer), CurContext(0),PreDeclaratorDC(0), + CurBlock(0), PackContext(0), IdResolver(pp.getLangOptions()) { // Get IdentifierInfo objects for known functions for which we // do extra checking. |