diff options
author | Jason Merrill <jason@redhat.com> | 2022-05-12 21:28:47 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2022-05-15 12:41:14 -0400 |
commit | 87e1f023aae945aedd7ea046e06b4f52318913f7 (patch) | |
tree | c4dba501cad0c5d096886f1803fe4d094ec49e57 /gcc | |
parent | ce46d6041358052dfa26f3720732f0357c5d72e7 (diff) | |
download | gcc-87e1f023aae945aedd7ea046e06b4f52318913f7.zip gcc-87e1f023aae945aedd7ea046e06b4f52318913f7.tar.gz gcc-87e1f023aae945aedd7ea046e06b4f52318913f7.tar.bz2 |
c++: parsing injected-class-name as template
While I was backporting the patch for PR102300, it occurred to me that it
would be cleaner to look through the injected-class-name earlier in the
function. I don't think this changes any test results.
gcc/cp/ChangeLog:
* parser.cc (cp_parser_template_name): Look through
injected-class-name.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/parser.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc index 8969ed0..d4dab6c 100644 --- a/gcc/cp/parser.cc +++ b/gcc/cp/parser.cc @@ -18646,6 +18646,9 @@ cp_parser_template_name (cp_parser* parser, (9.3.4), or in a type-only context other than a nested-name-specifier (13.8). */ + /* Handle injected-class-name. */ + decl = maybe_get_template_decl_from_type_decl (decl); + /* If DECL is a template, then the name was a template-name. */ if (TREE_CODE (decl) == TEMPLATE_DECL) { |