[all-commits] [llvm/llvm-project] 6f30ef: [Clang] Modify Parser::ParseLambdaExpressionAfterI...

Shafik Yaghmour via All-commits all-commits at lists.llvm.org
Tue Aug 29 11:31:27 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6f30ef360127ffb3346fd3d3e60a229ed44dc667
      https://github.com/llvm/llvm-project/commit/6f30ef360127ffb3346fd3d3e60a229ed44dc667
  Author: Shafik Yaghmour <shafik.yaghmour at intel.com>
  Date:   2023-08-29 (Tue, 29 Aug 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Parse/ParseExprCXX.cpp
    M clang/test/Parser/cxx2a-template-lambdas.cpp
    M clang/test/SemaCXX/subst-func-type-invalid-ret-type.cpp

  Log Message:
  -----------
  [Clang] Modify Parser::ParseLambdaExpressionAfterIntroducer to check whether the lambda-declarator is valid

We had a couple of crashes due to invalid lambda trailing return types that
were diagnosed but not treated as errors during parsing. So now in
Parser::ParseLambdaExpressionAfterIntroducer(...) after ActOnStartOfLambdaDefinition(...)
we also check if the lambda-declarator is invalid and if so we end up in ActOnLambdaError(...).

Fixes: https://github.com/llvm/llvm-project/issues/64962
https://github.com/llvm/llvm-project/issues/28679

Differential Revision: https://reviews.llvm.org/D158808




More information about the All-commits mailing list