diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-11-07 17:33:42 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-11-07 17:33:42 +0000 |
commit | efaa93aaa2653f4eb40e6a22e504a448da94aaf8 (patch) | |
tree | 5361c9696519f5b4df75e82d1673469266e7f674 /lib/Parse/Parser.cpp | |
parent | 90f93d4c6e257903c951c5ff22cf3cf3806fca63 (diff) |
Tighten up the conditions under which we consider ourselves to be
entering the context of a nested-name-specifier. Fixes
<rdar://problem/10397846>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143967 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/Parser.cpp')
-rw-r--r-- | lib/Parse/Parser.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp index fabb8e2a59..6e84e42968 100644 --- a/lib/Parse/Parser.cpp +++ b/lib/Parse/Parser.cpp @@ -1205,7 +1205,8 @@ bool Parser::TryAnnotateTypeOrScopeToken(bool EnteringContext, bool NeedType) { // simple-template-id SourceLocation TypenameLoc = ConsumeToken(); CXXScopeSpec SS; - if (ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/ParsedType(), false, + if (ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/ParsedType(), + /*EnteringContext=*/false, 0, /*IsTypename*/true)) return true; if (!SS.isSet()) { @@ -1484,7 +1485,8 @@ bool Parser::ParseMicrosoftIfExistsCondition(IfExistsCondition& Result) { } // Parse nested-name-specifier. - ParseOptionalCXXScopeSpecifier(Result.SS, ParsedType(), false); + ParseOptionalCXXScopeSpecifier(Result.SS, ParsedType(), + /*EnteringContext=*/false); // Check nested-name specifier. if (Result.SS.isInvalid()) { |