summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseExprCXX.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2018-06-22 19:50:19 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2018-06-22 19:50:19 +0000
commit69bc9aa22f22ff3dd8c649a7f6bedbe706410c4c (patch)
tree018492a86c0c4302620769fc200152b5cc83785c /clang/lib/Parse/ParseExprCXX.cpp
parent5421b378931813500392228d432980b71e33ce66 (diff)
downloadbcm5719-llvm-69bc9aa22f22ff3dd8c649a7f6bedbe706410c4c.tar.gz
bcm5719-llvm-69bc9aa22f22ff3dd8c649a7f6bedbe706410c4c.zip
Restore pre-r335182 behavior for naming inherited constructors as
members of dependent contexts. This permits cases where the names before and after the '::' in a dependent inherited constructor using-declaration do not match, but where we can nonetheless tell when parsing the template that a constructor is being named. Under (open) core language DR 2070, such cases will probably be ill-formed, but r335182 does not quite give that result and didn't intend to change this, so restore the old behavior for now. llvm-svn: 335381
Diffstat (limited to 'clang/lib/Parse/ParseExprCXX.cpp')
-rw-r--r--clang/lib/Parse/ParseExprCXX.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseExprCXX.cpp b/clang/lib/Parse/ParseExprCXX.cpp
index 26b8a0f7793..12aee8cff3d 100644
--- a/clang/lib/Parse/ParseExprCXX.cpp
+++ b/clang/lib/Parse/ParseExprCXX.cpp
@@ -2505,7 +2505,8 @@ bool Parser::ParseUnqualifiedId(CXXScopeSpec &SS, bool EnteringContext,
if (AllowConstructorName &&
Actions.isCurrentClassName(*Id, getCurScope(), &SS)) {
// We have parsed a constructor name.
- ParsedType Ty = Actions.getConstructorName(*Id, IdLoc, getCurScope(), SS);
+ ParsedType Ty = Actions.getConstructorName(*Id, IdLoc, getCurScope(), SS,
+ EnteringContext);
if (!Ty)
return true;
Result.setConstructorName(Ty, IdLoc, IdLoc);
@@ -2555,7 +2556,8 @@ bool Parser::ParseUnqualifiedId(CXXScopeSpec &SS, bool EnteringContext,
<< FixItHint::CreateRemoval(
SourceRange(TemplateId->LAngleLoc, TemplateId->RAngleLoc));
ParsedType Ty = Actions.getConstructorName(
- *TemplateId->Name, TemplateId->TemplateNameLoc, getCurScope(), SS);
+ *TemplateId->Name, TemplateId->TemplateNameLoc, getCurScope(), SS,
+ EnteringContext);
if (!Ty)
return true;
Result.setConstructorName(Ty, TemplateId->TemplateNameLoc,
OpenPOWER on IntegriCloud