diff options
| author | John McCall <rjmccall@apple.com> | 2009-12-19 09:35:56 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2009-12-19 09:35:56 +0000 |
| commit | 4d6d6137a0fe49708006c88716107239e49f7d07 (patch) | |
| tree | afe311fc026dd42d00e6c58fbd0faa432b7b810f /clang/lib | |
| parent | 1f4ee7bd2f4105a04811a06294e4654c6e4058c4 (diff) | |
| download | bcm5719-llvm-4d6d6137a0fe49708006c88716107239e49f7d07.tar.gz bcm5719-llvm-4d6d6137a0fe49708006c88716107239e49f7d07.zip | |
Don't use EnterDeclaratorContext when rebuilding a type in the current
instantiation, since we're not using a Scope object for that anyway.
llvm-svn: 91770
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 4b960e81a55..4c2c658571c 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -1890,9 +1890,12 @@ Sema::HandleDeclarator(Scope *S, Declarator &D, 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()); |

