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

Aaron Puchert via All-commits all-commits at lists.llvm.org
Wed Apr 22 13:39:26 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f43859a099fa3587123717be941fa63ba8d0d4f2
      https://github.com/llvm/llvm-project/commit/f43859a099fa3587123717be941fa63ba8d0d4f2
  Author: Aaron Puchert <aaronpuchert at alice-dsl.net>
  Date:   2020-04-22 (Wed, 22 Apr 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




More information about the All-commits mailing list