[all-commits] [llvm/llvm-project] a42fd8: Remove redundant CXXScopeSpec from TemplateIdAnnot...

Richard Smith via All-commits all-commits at lists.llvm.org
Fri Jan 17 15:47:36 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a42fd84cff265b7e9faa3fe42885ee171393e4db
      https://github.com/llvm/llvm-project/commit/a42fd84cff265b7e9faa3fe42885ee171393e4db
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2020-01-17 (Fri, 17 Jan 2020)

  Changed paths:
    M clang/include/clang/Parse/Parser.h
    M clang/include/clang/Sema/ParsedTemplate.h
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Parse/ParseDecl.cpp
    M clang/lib/Parse/ParseDeclCXX.cpp
    M clang/lib/Parse/ParseExpr.cpp
    M clang/lib/Parse/ParseExprCXX.cpp
    M clang/lib/Parse/ParseTemplate.cpp
    M clang/lib/Parse/ParseTentative.cpp
    M clang/lib/Parse/Parser.cpp
    M clang/lib/Sema/SemaExprCXX.cpp
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/test/CXX/temp/temp.res/temp.dep/temp.dep.constexpr/p2.cpp
    M clang/test/Parser/cxx-decl.cpp
    M clang/test/SemaTemplate/ms-delayed-default-template-args.cpp
    M clang/test/SemaTemplate/rdar9173693.cpp

  Log Message:
  -----------
  Remove redundant CXXScopeSpec from TemplateIdAnnotation.

A TemplateIdAnnotation represents only a template-id, not a
nested-name-specifier plus a template-id. Don't make a redundant copy of
the CXXScopeSpec and store it on the template-id annotation.

This slightly improves error recovery by more properly handling the case
where we would form an invalid CXXScopeSpec while parsing a typename
specifier, instead of accidentally putting the token stream into a
broken "annot_template_id with a scope specifier, but with no preceding
annot_cxxscope token" state.




More information about the All-commits mailing list