diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-03-23 15:26:55 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-03-23 15:26:55 +0000 |
commit | 9de672f6eb4a1f076163fd826418ca179e1341ec (patch) | |
tree | 3cd12bc884e14ec8ed8dfba0c5b0d835dae82933 /lib/Sema/SemaDecl.cpp | |
parent | b4e4c96b9e717ae747f8a22b432695d833b4c0d6 (diff) |
When recovering from a qualified typedef name, don't clear out the
DeclContext because we don't want a NULL DeclContext. Instead, use the
current context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99281 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index aaf39ef1f9..bf92ef829b 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -2131,7 +2131,8 @@ Sema::ActOnTypedefDeclarator(Scope* S, Declarator& D, DeclContext* DC, << D.getCXXScopeSpec().getRange(); D.setInvalidType(); // Pretend we didn't see the scope specifier. - DC = 0; + DC = CurContext; + Previous.clear(); } if (getLangOptions().CPlusPlus) { |