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 | b525ef87fc486030af821ea957b38d63b1b78899 (patch) | |
| tree | d068d2272cce0dd43875c81b53cf74e162abeb5a /clang/lib/Sema | |
| parent | 274fc82289223f8b15f9621f4459428ae2812803 (diff) | |
| download | bcm5719-llvm-b525ef87fc486030af821ea957b38d63b1b78899.tar.gz bcm5719-llvm-b525ef87fc486030af821ea957b38d63b1b78899.zip | |
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.
llvm-svn: 99281
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index aaf39ef1f94..bf92ef829be 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/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) { |

