hanchenye-llvm-project/clang/test/SemaTemplate
Richard Smith 5159bbad8b PR38627: Fix handling of exception specification adjustment for
destructors.

We previously tried to patch up the exception specification after
completing the class, which went wrong when the exception specification
was needed within the class body (in particular, by a friend
redeclaration of the destructor in a nested class). We now mark the
destructor as having a not-yet-computed exception specification
immediately after creating it.

This requires delaying various checks against the exception
specification (where we'd previously have just got the wrong exception
specification, and now find we have an exception specification that we
can't compute yet) when those checks fire while the class is being
defined.

This also exposed an issue that we were missing a CodeSynthesisContext
for computation of exception specifications (otherwise we'd fail to make
the module containing the definition of the class visible when computing
its members' exception specs). Adding that incidentally also gives us a
diagnostic quality improvement.

This has also exposed an pre-existing problem: making the exception
specification evaluation context a non-SFINAE context (as it should be)
results in a bootstrap failure; PR38850 filed for this.

llvm-svn: 341499
2018-09-05 22:30:37 +00:00
..
ackermann.cpp
address-spaces.cpp
address_space-dependent.cpp
alias-church-numerals.cpp
alias-nested-nontag.cpp
alias-template-template-param.cpp
alias-templates.cpp Factor out common code for diagnosing missing template arguments. 2018-04-26 01:08:00 +00:00
alignas.cpp PR35028: Retain duplicate alignas attributes in template instantiation. 2018-01-04 01:02:18 +00:00
ambiguous-ovl-print.cpp
anonymous-union.cpp
argument-dependent-lookup.cpp PR38257: don't perform ADL when instantiating a unary & operator that turns out 2018-07-22 05:21:47 +00:00
array-redeclaration.cpp
array-to-pointer-decay.cpp
atomics.cpp
attributes.cpp Append new attributes to the end of an AttributeList. 2018-08-03 01:21:16 +00:00
canonical-expr-type-0x.cpp
canonical-expr-type.cpp
class-template-ctor-initializer.cpp
class-template-decl.cpp
class-template-id-2.cpp
class-template-id.cpp
class-template-spec.cpp Implement C++ DR727, which permits explicit specializations at class scope. 2018-03-16 13:36:56 +00:00
constexpr-instantiate.cpp
constructor-template.cpp
copy-ctor-assign.cpp
crash-8204126.cpp
crash-10438657.cpp
crash-unparsed-exception.cpp
crash.cpp
current-instantiation.cpp
cxx1z-decomposition.cpp
cxx1z-fold-expressions.cpp
cxx1z-using-declaration.cpp
cxx17-inline-variables.cpp In C++17, when instantiating an out-of-line definition of an inline static data 2018-01-10 23:08:26 +00:00
deduction-crash.cpp
deduction.cpp
default-arguments-cxx0x.cpp
default-arguments.cpp
default-expr-arguments-2.cpp Re-commit r321223, which adds a printing policy to the ASTDumper. 2017-12-21 21:42:42 +00:00
default-expr-arguments-3.cpp Re-commit r321223, which adds a printing policy to the ASTDumper. 2017-12-21 21:42:42 +00:00
default-expr-arguments.cpp
delegating-constructors.cpp
dependent-base-classes.cpp Improve diagnostics and error recovery for template name lookup. 2018-05-11 02:43:08 +00:00
dependent-base-member-init.cpp
dependent-class-member-operator.cpp
dependent-expr.cpp
dependent-names-no-std.cpp
dependent-names.cpp PR37680: fix faulty assertion condition. 2018-06-06 16:36:56 +00:00
dependent-sized_array.cpp
dependent-template-recover.cpp Diagnose missing 'template' keywords in contexts where a comma is not a 2018-06-27 01:32:04 +00:00
dependent-type-identity.cpp
derived.cpp
destructor-template.cpp
elaborated-type-specifier.cpp
enum-argument.cpp
enum-bool.cpp
enum-forward.cpp
example-typelist.cpp
exception-spec-crash.cpp
explicit-instantiation.cpp
explicit-specialization-member.cpp
ext-vector-type.cpp
ext_ms_template_spec.cpp Implement C++ DR727, which permits explicit specializations at class scope. 2018-03-16 13:36:56 +00:00
extension-sfinae.cpp
extern-templates.cpp
fibonacci.cpp
friend-template.cpp
friend.cpp
fun-template-def.cpp
function-pointer-qualifier.cpp [Sema] Do not match function type with const T in template argument deduction 2018-05-03 01:43:23 +00:00
function-template-specialization-noreturn.cpp
function-template-specialization.cpp Implement C++ DR727, which permits explicit specializations at class scope. 2018-03-16 13:36:56 +00:00
implicit-instantiation-1.cpp
inject-templated-friend-post.cpp
inject-templated-friend.cpp
injected-class-name.cpp
instantiate-after-fatal-cxx17.cpp [c++17] Fix assertion on synthesizing deduction guides after a fatal error. 2018-05-14 22:49:44 +00:00
instantiate-anonymous-union.cpp
instantiate-array.cpp
instantiate-attr.cpp
instantiate-c99.cpp
instantiate-call.cpp
instantiate-case.cpp
instantiate-cast.cpp
instantiate-clang.cpp
instantiate-complete.cpp
instantiate-decl-dtor.cpp
instantiate-decl-init.cpp
instantiate-declref-ice.cpp
instantiate-declref.cpp
instantiate-deeply.cpp
instantiate-default-assignment-operator.cpp
instantiate-dependent-nested-name.cpp
instantiate-elab-type-specifier.cpp
instantiate-enum-2.cpp
instantiate-enum.cpp
instantiate-exception-spec-cxx11.cpp
instantiate-exception-spec.cpp
instantiate-explicitly-after-fatal.cpp
instantiate-expr-1.cpp
instantiate-expr-2.cpp
instantiate-expr-3.cpp
instantiate-expr-4.cpp
instantiate-expr-5.cpp
instantiate-expr-6.cpp
instantiate-expr-basic.cpp
instantiate-field.cpp
instantiate-friend-class.cpp
instantiate-friend-function.cpp
instantiate-function-1.cpp
instantiate-function-1.mm
instantiate-function-2.cpp
instantiate-function-params.cpp
instantiate-init.cpp PR38627: Fix handling of exception specification adjustment for 2018-09-05 22:30:37 +00:00
instantiate-invalid.cpp
instantiate-local-class.cpp
instantiate-member-class.cpp
instantiate-member-expr.cpp
instantiate-member-initializers.cpp
instantiate-member-pointers.cpp
instantiate-member-template.cpp
instantiate-method.cpp Implement C++ DR727, which permits explicit specializations at class scope. 2018-03-16 13:36:56 +00:00
instantiate-non-dependent-types.cpp
instantiate-non-type-template-parameter.cpp
instantiate-objc-1.mm
instantiate-overload-candidates.cpp
instantiate-overloaded-arrow.cpp
instantiate-partial-spec.cpp
instantiate-scope.cpp
instantiate-self.cpp
instantiate-sizeof.cpp
instantiate-static-var.cpp
instantiate-subscript.cpp
instantiate-template-template-parm.cpp
instantiate-try-catch.cpp
instantiate-type.cpp
instantiate-typedef.cpp
instantiate-typeof.cpp
instantiate-using-decl.cpp
instantiate-var-template.cpp
instantiation-backtrace.cpp
instantiation-default-1.cpp
instantiation-default-2.cpp
instantiation-default-3.cpp
instantiation-depth-defarg.cpp
instantiation-depth-default.cpp [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
instantiation-depth-exception-spec.cpp
instantiation-depth-subst-2.cpp
instantiation-depth-subst.cpp
instantiation-depth.cpp
instantiation-order.cpp
issue150.cpp
late-parsing-eager-instantiation.cpp [MS] Fix late-parsed template infinite loop in eager instantiation 2018-03-26 18:22:47 +00:00
lookup-dependent-bases.cpp
member-access-ambig.cpp
member-access-expr.cpp
member-function-template.cpp
member-inclass-init-value-dependent.cpp
member-initializers.cpp
member-template-access-expr.cpp
metafun-apply.cpp Improve diagnostics and error recovery for template name lookup. 2018-05-11 02:43:08 +00:00
missing-class-keyword-crash.cpp
ms-class-specialization-class-scope.cpp
ms-class-specialization-duplicate.cpp
ms-delayed-default-template-args.cpp
ms-function-specialization-class-scope.cpp Implement C++ DR727, which permits explicit specializations at class scope. 2018-03-16 13:36:56 +00:00
ms-if-exists.cpp
ms-lookup-template-base-classes.cpp
ms-sizeof-missing-typename.cpp
nested-deduction-guides.cpp When instantiating a deduction guide, transform its name. 2017-12-21 19:43:39 +00:00
nested-incomplete-class.cpp
nested-linkage.cpp
nested-name-spec-template.cpp Improve diagnostics and error recovery for template name lookup. 2018-05-11 02:43:08 +00:00
nested-template.cpp Fix a couple of places where we assumed that non-type template parameters are always rvalues. 2018-02-14 02:07:53 +00:00
operator-function-id-template.cpp
operator-template.cpp
overload-candidates.cpp
overload-uneval.cpp
overloaded-functions.cpp
pack-deduction.cpp Fix failing testcase to actually be valid. 2018-07-19 19:05:13 +00:00
partial-order.cpp
partial-spec-instantiate.cpp [Sema] Fix assertion when constructor is disabled with partially specialized template. 2018-05-16 18:28:58 +00:00
pragma-ms_struct.cpp
qualified-id.cpp
qualified-names-diag.cpp
rdar9173693.cpp
recovery-crash.cpp
recursive-template-instantiation.cpp
resolve-single-template-id.cpp
self-comparison.cpp
sizeof-pack.cpp Fix a couple of places where we assumed that non-type template parameters are always rvalues. 2018-02-14 02:07:53 +00:00
stmt-expr.cpp Fix crash when trying to pack-expand a GNU statement expression. 2018-02-03 00:44:57 +00:00
temp-param-subst-linear.cpp When substituting previously-checked template arguments into a template 2018-03-08 01:07:33 +00:00
temp.cpp
temp_arg.cpp
temp_arg_enum_printing.cpp [AST] Incorrectly qualified unscoped enumeration as template actual parameter. 2017-12-21 21:47:22 +00:00
temp_arg_enum_printing_more.cpp [AST] Incorrectly qualified unscoped enumeration as template actual parameter. 2017-12-21 21:47:22 +00:00
temp_arg_nontype.cpp
temp_arg_nontype_cxx1z.cpp [Sema] Ensure an auto non-type template parameter is dependent 2018-08-07 22:59:02 +00:00
temp_arg_nontype_cxx11.cpp Fix explicit template parameter reporting for narrowing conversions 2018-05-07 17:05:20 +00:00
temp_arg_pack.cpp Fix assert when template argument deduction's original call arg checking triggers class template instantiation. 2018-02-20 23:47:12 +00:00
temp_arg_template.cpp
temp_arg_template_cxx1z.cpp
temp_arg_type.cpp
temp_class_order.cpp
temp_class_spec.cpp
temp_class_spec_blocks.cpp
temp_class_spec_neg.cpp Implement C++ DR727, which permits explicit specializations at class scope. 2018-03-16 13:36:56 +00:00
temp_explicit.cpp
temp_explicit_cxx0x.cpp
temp_func_order.cpp
template-class-traits.cpp
template-decl-fail.cpp
template-id-expr.cpp Improve diagnostics and error recovery for template name lookup. 2018-05-11 02:43:08 +00:00
template-id-printing.cpp
typename-specifier-2.cpp
typename-specifier-3.cpp
typename-specifier-4.cpp
typename-specifier.cpp
typo-dependent-name.cpp Improve diagnostics and error recovery for template name lookup. 2018-05-11 02:43:08 +00:00
typo-template-name.cpp
undefined-template.cpp Suppress undefined-template warnings when the pattern is declared in a system header. 2018-01-02 19:10:12 +00:00
unresolved-construct.cpp
unused-variables.cpp
value-dependent-null-pointer-constant.cpp
virtual-member-functions.cpp
warn-thread-safety-analysis.cpp Fix some handling of AST nodes with diagnostics. 2018-03-28 04:16:13 +00:00