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

Richard Smith via All-commits all-commits at lists.llvm.org
Thu Dec 17 23:23:34 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 638867afd4bce4a2c56dea041299428af3727d61
      https://github.com/llvm/llvm-project/commit/638867afd4bce4a2c56dea041299428af3727d61
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2020-12-17 (Thu, 17 Dec 2020)

  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/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.


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

  Changed paths:
    M clang/include/clang/AST/Type.h
    M clang/lib/AST/Type.cpp
    M clang/lib/Sema/SemaConcept.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaTemplate.cpp
    A clang/test/SemaTemplate/instantiate-static-local.cpp

  Log Message:
  -----------
  Where possible, don't try to ask whether a template argument is
dependent until it's been converted to match its parameter.

The type of a non-type template parameter can in general affect whether
the template argument is dependent.

Note that this is not always possible. For template arguments that name
static local variables in templates, the type of the template parameter
affects whether the argument is dependent, so the query is imprecise
until we know the parameter type. For example, in:

template<typename T> void f() {
  static const int n = 5;
  typename T::template X<n> x;
}

... we don't know whether 'n' is dependent until we know whether the
corresponding template parameter is of type 'int' or 'const int&'.


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

  Changed paths:
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/test/SemaTemplate/class-template-decl.cpp

  Log Message:
  -----------
  Ensure that we transform types into the current instantiation even if
they're only instantiation-dependent.


Compare: https://github.com/llvm/llvm-project/compare/d599ed49b355...4b388859f527


More information about the All-commits mailing list