diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2014-05-03 02:18:46 +0000 |
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2014-05-03 02:18:46 +0000 |
| commit | 22fcb08357b78bc747a33503270b51db521e9d96 (patch) | |
| tree | 57d80898c3a525be4891b5a25eb093ae19d2f142 /clang/lib | |
| parent | 843571130fb050bf3417b2382d8d7215d4c0f2bb (diff) | |
| download | bcm5719-llvm-22fcb08357b78bc747a33503270b51db521e9d96.tar.gz bcm5719-llvm-22fcb08357b78bc747a33503270b51db521e9d96.zip | |
Sema: Implement DR244
Naming the destructor using a typedef-name for the class-name is
well-formed.
This fixes PR19620.
llvm-svn: 207892
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaExprCXX.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index 6f60406a4ee..a5ecba7310f 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -144,8 +144,10 @@ ParsedType Sema::getDestructorName(SourceLocation TildeLoc, AlreadySearched = true; LookupCtx = DC; isDependent = false; - } else if (DC && isa<CXXRecordDecl>(DC)) + } else if (DC && isa<CXXRecordDecl>(DC)) { LookAtPrefix = false; + LookInScope = true; + } // The second case from the C++03 rules quoted further above. NestedNameSpecifier *Prefix = 0; @@ -163,8 +165,6 @@ ParsedType Sema::getDestructorName(SourceLocation TildeLoc, LookupCtx = computeDeclContext(SS, EnteringContext); isDependent = LookupCtx && LookupCtx->isDependentContext(); } - - LookInScope = false; } else if (ObjectTypePtr) { // C++ [basic.lookup.classref]p3: // If the unqualified-id is ~type-name, the type-name is looked up |

