[all-commits] [llvm/llvm-project] 5b5a11: PR45124: Don't leave behind pending cleanups when ...

Richard Smith via All-commits all-commits at lists.llvm.org
Thu Mar 12 04:46:31 PDT 2020


  Branch: refs/heads/release/10.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 5b5a111c6794a0bb0385d04721ea854dd56da357
      https://github.com/llvm/llvm-project/commit/5b5a111c6794a0bb0385d04721ea854dd56da357
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2020-03-11 (Wed, 11 Mar 2020)

  Changed paths:
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp

  Log Message:
  -----------
  PR45124: Don't leave behind pending cleanups when declaring implicit
deduction guides.

Previously if an implicit deduction guide had a default argument with a
cleanup, we'd leave the 'pending cleanup' flag set after declaring the
implicit guide. But it turns out that there's no reason to even
substitute into the default argument when declaring an implicit
deduction guide: we only need to record that the default argument
exists, not what it is, since we never actually form a call to a
deduction guide.

(cherry picked from commit 6d894afdea433879f54e5ba07e827db006645b7b)


  Commit: 5e062819d5adeb2526f1b8393edf5a265bef1591
      https://github.com/llvm/llvm-project/commit/5e062819d5adeb2526f1b8393edf5a265bef1591
  Author: Hans Wennborg <hans at chromium.org>
  Date:   2020-03-12 (Thu, 12 Mar 2020)

  Changed paths:
    M clang/include/clang/AST/Expr.h
    M clang/include/clang/Sema/Sema.h
    M clang/lib/AST/ASTImporter.cpp
    M clang/lib/Parse/ParseExpr.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Sema/SemaExprCXX.cpp
    M clang/lib/Sema/TreeTransform.h
    M clang/test/SemaTemplate/dependent-expr.cpp

  Log Message:
  -----------
  Revert "PR45083: Mark statement expressions as being dependent if they appear in"

This turned out to cause problems, and was reverted on master together
with its follow-up change in 66addf8e803618758457e4d578c5084e322ca448.

This reverts commit 3a843031a5ad83a00d2603f623881cb2b2bf719d.


  Commit: d9bd6e3c1943e03b783f11d9f2e224ff83f83a7b
      https://github.com/llvm/llvm-project/commit/d9bd6e3c1943e03b783f11d9f2e224ff83f83a7b
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2020-03-12 (Thu, 12 Mar 2020)

  Changed paths:
    M clang/include/clang/AST/Expr.h
    M clang/include/clang/AST/Stmt.h
    M clang/include/clang/Sema/Sema.h
    M clang/include/clang/Sema/Template.h
    M clang/lib/AST/ASTImporter.cpp
    M clang/lib/Parse/ParseExpr.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Sema/SemaExprCXX.cpp
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/lib/Sema/SemaTemplateInstantiate.cpp
    M clang/lib/Sema/TreeTransform.h
    M clang/lib/Serialization/ASTReaderStmt.cpp
    M clang/lib/Serialization/ASTWriterStmt.cpp
    M clang/test/SemaTemplate/dependent-expr.cpp

  Log Message:
  -----------
  PR45083: Mark statement expressions as being dependent if they appear in
a dependent context.

This matches the GCC behavior.

We track the enclosing template depth when determining whether a
statement expression is within a dependent context; there doesn't appear
to be any other reliable way to determine this.

We previously assumed they were neither value- nor
instantiation-dependent under any circumstances, which would lead to
crashes and other misbehavior.

(cherry picked from commit 5c845c1c50ac89a6f12557d1571678f3d1432478)


Compare: https://github.com/llvm/llvm-project/compare/4e41127f04d7...d9bd6e3c1943


More information about the All-commits mailing list