[all-commits] [llvm/llvm-project] 9c8051: PR45000: Let Sema::SubstParmVarDecl handle default...

Aaron Puchert via All-commits all-commits at lists.llvm.org
Wed May 6 20:09:45 PDT 2020


  Branch: refs/heads/release/10.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 9c80516d3e3aae34b7dd7ee0204170c888fd7235
      https://github.com/llvm/llvm-project/commit/9c80516d3e3aae34b7dd7ee0204170c888fd7235
  Author: Aaron Puchert <aaronpuchert at alice-dsl.net>
  Date:   2020-05-06 (Wed, 06 May 2020)

  Changed paths:
    M clang/include/clang/AST/DeclBase.h
    M clang/lib/AST/DeclBase.cpp
    M clang/lib/Sema/SemaTemplateInstantiate.cpp
    M clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
    M clang/lib/Sema/TreeTransform.h
    M clang/test/SemaCXX/vartemplate-lambda.cpp
    M clang/test/SemaTemplate/instantiate-local-class.cpp

  Log Message:
  -----------
  PR45000: Let Sema::SubstParmVarDecl handle default args of lambdas in initializers

Summary:
We extend the behavior for local functions and methods of local classes
to lambdas in variable initializers. The initializer is not a separate
scope, but we treat it as such.

We also remove the (faulty) instantiation of default arguments in
TreeTransform::TransformLambdaExpr, because it doesn't do proper
initialization, and if it did, we would do it twice (and thus also emit
eventual errors twice).

Reviewed By: rsmith

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

(cherry picked from commit f43859a099fa3587123717be941fa63ba8d0d4f2)




More information about the All-commits mailing list