[all-commits] [llvm/llvm-project] e3065c: DR2064: decltype(E) is only a dependent type if E ...

Richard Smith via All-commits all-commits at lists.llvm.org
Mon Jan 18 21:10:08 PST 2021


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

  Changed paths:
    M clang/include/clang/AST/DependenceFlags.h
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/AST/ItaniumMangle.cpp
    M clang/lib/AST/Type.cpp
    M clang/test/CXX/drs/dr20xx.cpp
    M clang/test/CodeGenCXX/mangle-subst.cpp
    M clang/test/Sema/invalid-bitwidth-expr.mm
    M clang/test/SemaCXX/invalid-template-base-specifier.cpp
    M clang/test/SemaTemplate/dependent-expr.cpp
    M clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp
    M clang/www/cxx_dr_status.html

  Log Message:
  -----------
  DR2064: decltype(E) is only a dependent type if E is type-dependent, not
if E is merely instantiation-dependent.

Previously reverted in 34e72a146111dd986889a0f0ec8767b2ca6b2913;
re-committed with a fix to an issue that caused name mangling to assert.


  Commit: fbb83f18b5485218ad3c36c1d079c89f061372b8
      https://github.com/llvm/llvm-project/commit/fbb83f18b5485218ad3c36c1d079c89f061372b8
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2021-01-18 (Mon, 18 Jan 2021)

  Changed paths:
    M clang/include/clang/AST/Type.h
    M clang/lib/AST/ItaniumMangle.cpp
    M clang/test/CXX/drs/dr15xx.cpp
    M clang/test/CodeGenCXX/mangle-template.cpp
    A clang/test/SemaTemplate/instantiation-dependence.cpp
    M clang/test/SemaTemplate/partial-spec-instantiate.cpp
    M clang/www/cxx_dr_status.html

  Log Message:
  -----------
  PR24076, PR33655, C++ CWG 1558: Consider the instantiation-dependence of
the nested-name-specifier when determining whether a qualified type is
instantiation-dependent.

Previously reverted in 25a02c3d1a688d3cd18faef96c75fa553efbbac7 due to
causing us to reject some code. It turns out that the rejected code was
ill-formed (no diagnostic required).


  Commit: 5a391d38ac6c561ba908334d427f26124ed9132e
      https://github.com/llvm/llvm-project/commit/5a391d38ac6c561ba908334d427f26124ed9132e
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2021-01-18 (Mon, 18 Jan 2021)

  Changed paths:
    M clang/include/clang/AST/Expr.h
    M clang/include/clang/AST/TemplateBase.h
    M clang/include/clang/Sema/Sema.h
    M clang/lib/AST/ComputeDependence.cpp
    M clang/lib/AST/Expr.cpp
    M clang/lib/AST/ExprCXX.cpp
    M clang/lib/AST/ExprConstant.cpp
    M clang/lib/AST/TemplateBase.cpp
    M clang/lib/Sema/SemaOverload.cpp
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/lib/Sema/SemaTemplateInstantiate.cpp
    M clang/test/OpenMP/distribute_dist_schedule_messages.cpp
    M clang/test/OpenMP/distribute_parallel_for_dist_schedule_messages.cpp
    M clang/test/OpenMP/distribute_parallel_for_simd_dist_schedule_messages.cpp
    M clang/test/OpenMP/distribute_simd_dist_schedule_messages.cpp
    M clang/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp
    M clang/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp
    M clang/test/OpenMP/target_simd_collapse_messages.cpp
    M clang/test/OpenMP/target_teams_distribute_dist_schedule_messages.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_messages.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_messages.cpp
    M clang/test/OpenMP/target_teams_distribute_simd_dist_schedule_messages.cpp
    M clang/test/OpenMP/target_update_from_messages.cpp
    M clang/test/OpenMP/target_update_to_messages.cpp
    M clang/test/OpenMP/task_messages.cpp
    M clang/test/OpenMP/teams_distribute_dist_schedule_messages.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_dist_schedule_messages.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_messages.cpp
    M clang/test/OpenMP/teams_distribute_simd_dist_schedule_messages.cpp
    M clang/test/SemaCXX/warn-unused-lambda-capture.cpp
    A clang/test/SemaTemplate/temp_arg_nontype_cxx17.cpp
    R clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp
    M clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp

  Log Message:
  -----------
  Following up on PR48517, fix handling of template arguments that refer
to dependent declarations.

Treat an id-expression that names a local variable in a templated
function as being instantiation-dependent.

This addresses a language defect whereby a reference to a dependent
declaration can be formed without any construct being value-dependent.
Fixing that through value-dependence turns out to be problematic, so
instead this patch takes the approach (proposed on the core reflector)
of allowing the use of pointers or references to (but not values of)
dependent declarations inside value-dependent expressions, and instead
treating template arguments as dependent if they evaluate to a constant
involving such dependent declarations.

This ends up affecting a bunch of OpenMP tests, due to OpenMP
imprecisely handling instantiation-dependent constructs, bailing out
early instead of processing dependent constructs to the extent possible
when handling the template.

Previously committed as 8c1f2d15b826591cdf6bd6b468b8a7d23377b29e, and
reverted because a dependency commit was reverted.


  Commit: 4b574008aef5a7235c1f894ab065fe300d26e786
      https://github.com/llvm/llvm-project/commit/4b574008aef5a7235c1f894ab065fe300d26e786
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2021-01-18 (Mon, 18 Jan 2021)

  Changed paths:
    M clang-tools-extra/clangd/DumpAST.cpp
    M clang-tools-extra/clangd/FindTarget.cpp
    M clang-tools-extra/clangd/index/remote/Client.cpp
    M clang/include/clang/AST/ASTContext.h
    M clang/include/clang/AST/PropertiesBase.td
    M clang/include/clang/AST/RecursiveASTVisitor.h
    M clang/include/clang/AST/TemplateArgumentVisitor.h
    M clang/include/clang/AST/TemplateBase.h
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Sema/Sema.h
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/AST/ASTImporter.cpp
    M clang/lib/AST/ASTStructuralEquivalence.cpp
    M clang/lib/AST/Decl.cpp
    M clang/lib/AST/ItaniumMangle.cpp
    M clang/lib/AST/MicrosoftMangle.cpp
    M clang/lib/AST/ODRHash.cpp
    M clang/lib/AST/StmtProfile.cpp
    M clang/lib/AST/TemplateBase.cpp
    M clang/lib/AST/TypeLoc.cpp
    M clang/lib/CodeGen/CGDebugInfo.cpp
    M clang/lib/CodeGen/CGExprConstant.cpp
    M clang/lib/Index/USRGeneration.cpp
    M clang/lib/Sema/SemaLookup.cpp
    M clang/lib/Sema/SemaOverload.cpp
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/lib/Sema/SemaTemplateDeduction.cpp
    M clang/lib/Sema/SemaTemplateInstantiate.cpp
    M clang/lib/Sema/SemaTemplateVariadic.cpp
    M clang/lib/Sema/TreeTransform.h
    M clang/lib/Serialization/ASTReader.cpp
    M clang/lib/Serialization/ASTWriter.cpp
    M clang/test/CodeGenCXX/mangle-ms-templates.cpp
    M clang/test/CodeGenCXX/mangle-template.cpp
    A clang/test/CodeGenCXX/template-arguments.cpp
    M clang/test/SemaTemplate/temp_arg_nontype_cxx17.cpp
    M clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp
    M clang/tools/libclang/CIndex.cpp
    M clang/tools/libclang/CXCursor.cpp
    M lldb/include/lldb/lldb-enumerations.h
    M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

  Log Message:
  -----------
  [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

Previously committed as 9e08e51a20d0d2b1c5724bb17e969d036fced4cd, and
reverted because a dependency commit was reverted. This incorporates the
following follow-on commits that were also reverted:

7e84aa1b81e72d44bcc58ffe1731bfc7abb73ce0 by Simon Pilgrim
ed13d8c66781b50ff007cb089c5905f9bb9e8af2 by me
95c7b6cadbc9a3d4376ef44edbeb3c8bb5b8d7fc by Sam McCall
430d5d8429473c2b10b109991d7577a3cea41140 by Dave Zarzycki


Compare: https://github.com/llvm/llvm-project/compare/e147eccafa15...4b574008aef5


More information about the All-commits mailing list