[all-commits] [llvm/llvm-project] 5a684b: Ensure we don't strip the ConstantExpr carrying a ...

Richard Smith via All-commits all-commits at lists.llvm.org
Tue Jan 19 12:49:06 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5a684b70dc74f9f671f8eb61993a25769ec68117
      https://github.com/llvm/llvm-project/commit/5a684b70dc74f9f671f8eb61993a25769ec68117
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2021-01-19 (Tue, 19 Jan 2021)

  Changed paths:
    M clang/lib/Sema/SemaTemplateInstantiate.cpp
    M clang/test/SemaTemplate/temp_arg_nontype_cxx17.cpp

  Log Message:
  -----------
  Ensure we don't strip the ConstantExpr carrying a non-type template
argument's value off it during substitution.


  Commit: da986511fb9da1a46a0ca4dba2e49e2426036303
      https://github.com/llvm/llvm-project/commit/da986511fb9da1a46a0ca4dba2e49e2426036303
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2021-01-19 (Tue, 19 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/coroutines.cpp
    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:
  -----------
  Revert "DR2064: decltype(E) is only a dependent type if E is type-dependent, not
if E is merely instantiation-dependent."

This change leaves us unable to distinguish between different function
templates that differ in only instantiation-dependent ways, for example

template<typename T> decltype(int(T())) f();
template<typename T> decltype(int(T(0))) f();

We'll need substantially better support for types that are
instantiation-dependent but not dependent before we can go ahead with
this change.

This reverts commit e3065ce238475ec202c707f4c58d90df171626ca.


Compare: https://github.com/llvm/llvm-project/compare/7bd3702b6404...da986511fb9d


More information about the All-commits mailing list