Revert "DR2064: decltype(E) is only a dependent type if E is type-dependent, not
authorRichard Smith <richard@metafoo.co.uk>
Tue, 19 Jan 2021 19:54:06 +0000 (11:54 -0800)
committerRichard Smith <richard@metafoo.co.uk>
Tue, 19 Jan 2021 20:48:40 +0000 (12:48 -0800)
commitda986511fb9da1a46a0ca4dba2e49e2426036303
tree16c1b3b1e4ba4fe2ae38873c2ddb7718e4703265
parent5a684b70dc74f9f671f8eb61993a25769ec68117
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.
12 files changed:
clang/include/clang/AST/DependenceFlags.h
clang/lib/AST/ASTContext.cpp
clang/lib/AST/ItaniumMangle.cpp
clang/lib/AST/Type.cpp
clang/test/CXX/drs/dr20xx.cpp
clang/test/CodeGenCXX/mangle-subst.cpp
clang/test/Sema/invalid-bitwidth-expr.mm
clang/test/SemaCXX/coroutines.cpp
clang/test/SemaCXX/invalid-template-base-specifier.cpp
clang/test/SemaTemplate/dependent-expr.cpp
clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp
clang/www/cxx_dr_status.html