llvm-project/clang/test/SemaTemplate
Michael Kruse dc5ce72afa Append new attributes to the end of an AttributeList.
Recommit of r335084 after revert in r335516.

... instead of prepending it at the beginning (the original behavior
since implemented in r122535 2010-12-23). This builds up an
AttributeList in the the order in which the attributes appear in the
source.

The reverse order caused nodes for attributes in the AST (e.g. LoopHint)
to be in the reverse order, and therefore printed in the wrong order in
-ast-dump. Some TODO comments mention this. The order was explicitly
reversed for enable_if attribute overload resolution and name mangling,
which is not necessary anymore with this patch.

The change unfortunately has some secondary effect, especially on
diagnostic output. In the simplest cases, the CHECK lines or expected
diagnostic were changed to the the new output. If the kind of
error/warning changed, the attributes' order was changed instead.

This unfortunately causes some 'previous occurrence here' hints to be
textually after the main marker. This typically happens when attributes
are merged, but are incompatible to each other. Interchanging the role
of the the main and note SourceLocation will also cause the case where
two different declaration's attributes (in contrast to multiple
attributes of the same declaration) are merged to be reverse. There is
no easy fix because sometimes previous attributes are merged into a new
declaration's attribute list, sometimes new attributes are added to a
previous declaration's attribute list. Since 'previous occurrence here'
pointing to locations after the main marker is not rare, I left the
markers as-is; it is only relevant when the attributes are declared in
the same declaration anyway.

Differential Revision: https://reviews.llvm.org/D48100

llvm-svn: 338800
2018-08-03 01:21:16 +00:00
..
ackermann.cpp
address-spaces.cpp
address_space-dependent.cpp [OpenCL] Add LangAS::opencl_private to represent private address space in AST 2017-10-13 03:37:48 +00:00
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 PR6037 2015-01-19 01:44:02 +00:00
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 [Sema] Don't diagnose an array type mismatch when the new or previous 2016-09-01 01:03:21 +00:00
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 Preserve numeric literal suffixes during type canonicalization. 2014-11-20 03:37:32 +00:00
class-template-ctor-initializer.cpp [Lit Test] Updated 34 Lit tests to be C++11 compatible. 2015-11-17 20:25:05 +00:00
class-template-decl.cpp Switch to gnu++14 as the default dialect. 2017-12-09 12:09:54 +00:00
class-template-id-2.cpp
class-template-id.cpp PR10405 - Desugar FunctionType and TemplateSpecializationType if any type that appears inside needs to be desugared. 2015-07-16 01:06:17 +00:00
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 Customize the SFINAE diagnostics for enable_if to provide the failed condition. 2017-07-05 20:20:14 +00:00
constructor-template.cpp [Lit Test] Updated 34 Lit tests to be C++11 compatible. 2015-11-17 20:25:05 +00:00
copy-ctor-assign.cpp
crash-8204126.cpp
crash-10438657.cpp Ensure all TypoExprs are diagnosed by the tree transform. 2014-11-20 22:06:44 +00:00
crash-unparsed-exception.cpp [Sema] Prevent InstantiateClass from checking unrelated exception specs. 2017-09-21 19:54:12 +00:00
crash.cpp PR17730: Add test that we don't crash on this testcase. (The bug is already fixed.) 2014-10-28 17:00:19 +00:00
current-instantiation.cpp
cxx1z-decomposition.cpp P0217R3: template instantiation support for decomposition declarations. 2016-08-12 01:55:21 +00:00
cxx1z-fold-expressions.cpp [c++20] P0515R3: Parsing support and basic AST construction for operator <=>. 2017-12-14 15:16:18 +00:00
cxx1z-using-declaration.cpp PR31606: Generalize our tentative DR resolution for inheriting copy/move 2017-01-13 20:46:54 +00:00
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 [Sema] Fix an assert-on-invalid by avoiding function template specialisation 2017-10-27 18:13:31 +00:00
deduction.cpp PR33318: Add missing full-expression checking to static_assert expression. 2017-06-06 01:34:24 +00:00
default-arguments-cxx0x.cpp [Sema] Prevent InstantiateClass from checking unrelated exception specs. 2017-09-21 19:54:12 +00:00
default-arguments.cpp When instantiating a friend function template, don't forget to inherit default template arguments from other declarations. 2017-05-10 00:01:13 +00:00
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 [Lit Test] Updated 34 Lit tests to be C++11 compatible. 2015-11-17 20:25:05 +00:00
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 Fix crash if StmtProfile finds a type-dependent member access for which we have 2016-10-24 18:47:04 +00:00
derived.cpp [Sema] Be consistent about diagnostic wording: always use "cannot". 2015-08-15 15:23:14 +00:00
destructor-template.cpp Fix PR 33189: Clang assertion on template destructor declaration 2017-06-30 22:43:54 +00:00
elaborated-type-specifier.cpp
enum-argument.cpp
enum-bool.cpp Use APSInt::isSameValue instead of operator== in a place where two APSInt's 2015-01-09 00:58:16 +00:00
enum-forward.cpp
example-typelist.cpp
exception-spec-crash.cpp
explicit-instantiation.cpp Switch to gnu++14 as the default dialect. 2017-12-09 12:09:54 +00:00
explicit-specialization-member.cpp [Sema] Fix an assert-on-invalid by avoiding function template specialisation 2017-10-27 18:13:31 +00:00
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 Don't suppress instantiation of definitions for variables subject to explicit 2017-10-18 22:45:01 +00:00
fibonacci.cpp
friend-template.cpp Revert "Address http://bugs.llvm.org/pr30994 so that a non-friend can properly replace a friend, and a visible friend can properly replace an invisible friend but not vice verse, and definitions are not replaced. This fixes the two FIXME in SemaTemplate/friend-template.cpp." 2017-04-17 20:57:40 +00:00
friend.cpp Use the most recent previous decl to check if inline is added after a definition 2015-04-08 00:04:47 +00:00
fun-template-def.cpp [Lit Test] Updated 34 Lit tests to be C++11 compatible. 2015-11-17 20:25:05 +00:00
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 Don't drop attributes when checking explicit specializations. 2014-12-19 23:52:45 +00:00
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 PR13403 (+duplicates): implement C++ DR1310 (http://wg21.link/cwg1310). 2017-01-19 21:00:13 +00:00
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 [Test] Make Lit tests C++11 compatible #9 2017-02-24 22:22:05 +00:00
instantiate-call.cpp
instantiate-case.cpp
instantiate-cast.cpp Lit C++11 Compatibility Patch #7 2016-04-13 20:00:45 +00:00
instantiate-clang.cpp
instantiate-complete.cpp
instantiate-decl-dtor.cpp
instantiate-decl-init.cpp PR20346: fix aggregate initialization / template instantiation bug: 2014-07-17 23:12:06 +00:00
instantiate-declref-ice.cpp
instantiate-declref.cpp
instantiate-deeply.cpp
instantiate-default-assignment-operator.cpp Fix/Improve SourceRange of explicitly defaulted members 2014-06-20 08:44:22 +00:00
instantiate-dependent-nested-name.cpp Revert "Don't build invalid AST nodes during recovery" 2014-12-18 18:17:42 +00:00
instantiate-elab-type-specifier.cpp
instantiate-enum-2.cpp
instantiate-enum.cpp PR13403 (+duplicates): implement C++ DR1310 (http://wg21.link/cwg1310). 2017-01-19 21:00:13 +00:00
instantiate-exception-spec-cxx11.cpp DR1330: instantiate exception-specifications when "needed". We previously did 2016-10-18 23:39:12 +00:00
instantiate-exception-spec.cpp Instantiate exception specifications when instantiating function types (other 2014-11-12 02:00:47 +00:00
instantiate-explicitly-after-fatal.cpp Fix crash-on-invalid bug in template instantiation. 2015-06-26 02:15:04 +00:00
instantiate-expr-1.cpp Fix tests Clang::Sema/statements.c and Clang::SemaTemplate/instantiate-expr-1.cpp when AArch64 is the default target. 2014-08-04 10:13:09 +00:00
instantiate-expr-2.cpp
instantiate-expr-3.cpp Support __builtin_ms_va_list. 2015-09-17 20:55:33 +00:00
instantiate-expr-4.cpp Lit C++11 Compatibility Patch #7 2016-04-13 20:00:45 +00:00
instantiate-expr-5.cpp
instantiate-expr-6.cpp Revert r107690 (for PR7417) and add a testcase that it breaks. The approach of 2015-10-05 20:05:21 +00:00
instantiate-expr-basic.cpp
instantiate-field.cpp
instantiate-friend-class.cpp
instantiate-friend-function.cpp Regression test for PR10856 2017-07-26 14:58:55 +00:00
instantiate-function-1.cpp
instantiate-function-1.mm
instantiate-function-2.cpp [Lit Test] Updated 20 Lit tests to be C++11 compatible. 2015-12-10 01:07:17 +00:00
instantiate-function-params.cpp
instantiate-init.cpp PR36055: fix computation of *-dependence in nested initializer lists. 2018-02-07 22:25:16 +00:00
instantiate-invalid.cpp
instantiate-local-class.cpp Only instantiate members of nested classes in local classes once, rather than once per enclosing class. 2017-01-04 23:45:01 +00:00
instantiate-member-class.cpp PR13403 (+duplicates): implement C++ DR1310 (http://wg21.link/cwg1310). 2017-01-19 21:00:13 +00:00
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 Update error message text. 2015-01-18 19:05:48 +00:00
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 Don't forget to substitute into the qualifier when instantiating the definition 2014-10-17 20:37:29 +00:00
instantiate-self.cpp PR12298 et al: don't recursively instantiate a template specialization from 2016-08-31 02:15:21 +00:00
instantiate-sizeof.cpp Add missing triple to instantiate-sizeof.cpp test 2016-03-11 19:17:53 +00:00
instantiate-static-var.cpp Don't warn about runtime behavior problems in variable initializers that we 2017-09-23 18:27:11 +00:00
instantiate-subscript.cpp
instantiate-template-template-parm.cpp
instantiate-try-catch.cpp
instantiate-type.cpp
instantiate-typedef.cpp
instantiate-typeof.cpp [C++11] Support for capturing of variable length arrays in lambda expression. 2014-08-28 04:28:19 +00:00
instantiate-using-decl.cpp Re-land r250592 without rejecting field refs in unevaluated contexts 2015-10-20 21:04:13 +00:00
instantiate-var-template.cpp PR24483: Delete some dead/incorrect code that triggered assertions. 2015-08-20 20:45:25 +00:00
instantiation-backtrace.cpp
instantiation-default-1.cpp When producing a name of a partial specialization in a diagnostic, use the 2016-12-24 04:09:05 +00:00
instantiation-default-2.cpp
instantiation-default-3.cpp
instantiation-depth-defarg.cpp
instantiation-depth-default.cpp Disable clang/test/SemaTemplate/instantiation-depth-default.cpp temporarily for targeting mingw32. It crashes. Investigating. 2016-08-30 15:38:18 +00:00
instantiation-depth-exception-spec.cpp PR12298 et al: don't recursively instantiate a template specialization from 2016-08-31 02:15:21 +00:00
instantiation-depth-subst-2.cpp
instantiation-depth-subst.cpp
instantiation-depth.cpp PR12298 et al: don't recursively instantiate a template specialization from 2016-08-31 02:15:21 +00:00
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 Limit our MSVC compat hack for nested names from dependent bases 2014-08-14 23:34:52 +00:00
member-access-ambig.cpp Print nested name specifiers for typedefs and type aliases 2017-03-10 15:04:58 +00:00
member-access-expr.cpp Lit C++11 Compatibility Patch #8 2016-04-14 23:47:07 +00:00
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 When producing a name of a partial specialization in a diagnostic, use the 2016-12-24 04:09:05 +00:00
ms-class-specialization-duplicate.cpp
ms-delayed-default-template-args.cpp [ms] Allow more unqualified lookup of types in dependent base classes 2016-05-24 21:23:54 +00:00
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 Improve diagnosis of unknown template name. 2017-05-10 21:32:16 +00:00
ms-sizeof-missing-typename.cpp PR13403 (+duplicates): implement C++ DR1310 (http://wg21.link/cwg1310). 2017-01-19 21:00:13 +00:00
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 Fix test case in pre-C++11 mode; address Aaron Ballman's code review. 2017-07-05 21:12:37 +00:00
overload-uneval.cpp
overloaded-functions.cpp When checking the template argument list, use a copy of that list for changes 2015-01-24 02:48:32 +00:00
pack-deduction.cpp Fix failing testcase to actually be valid. 2018-07-19 19:05:13 +00:00
partial-order.cpp Revert r295277 to fix buildbot. 2017-02-16 04:22:56 +00:00
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 [Lit Test] Updated 34 Lit tests to be C++11 compatible. 2015-11-17 20:25:05 +00:00
rdar9173693.cpp Revert "Improve declaration / expression disambiguation around ptr-operators, and use" 2015-02-23 22:36:28 +00:00
recovery-crash.cpp Lit C++11 Compatibility Patch #8 2016-04-14 23:47:07 +00:00
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 PR0091R3: Implement parsing support for using templates as types. 2017-01-26 20:40:47 +00:00
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 Revert r295277 to fix buildbot. 2017-02-16 04:22:56 +00:00
temp_arg_nontype_cxx1z.cpp [c++17] When deducing the type of a non-type template parameter from the type 2017-12-01 21:24:36 +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 PR10147: When substituting a template template argument, substitute in the most 2017-08-29 22:14:43 +00:00
temp_arg_template_cxx1z.cpp PR32185: Revert r291512 and add a testcase for PR32185. 2017-04-13 21:37:24 +00:00
temp_arg_type.cpp [c++1z] Support deducing B in noexcept(B). 2017-06-07 21:46:22 +00:00
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 [Test] Make Lit tests C++11 compatible #9 2017-02-24 22:22:05 +00:00
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 PR0091R3: Implement parsing support for using templates as types. 2017-01-26 20:40:47 +00:00
typename-specifier-4.cpp [Lit Test] Updated 26 Lit tests to be C++11 compatible. 2015-11-11 19:34:47 +00:00
typename-specifier.cpp Print nested name specifiers for typedefs and type aliases 2017-03-10 15:04:58 +00:00
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 When we see a '<' operator, check whether it's a probable typo for a template-id. 2017-05-10 02:30:28 +00:00
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 [Test] Make Lit tests C++11 compatible #9 2017-02-24 22:22:05 +00:00
virtual-member-functions.cpp [Lit Test] Make tests C++11 compatible - Microsoft diagnostics 2017-02-06 19:32:38 +00:00
warn-thread-safety-analysis.cpp Fix some handling of AST nodes with diagnostics. 2018-03-28 04:16:13 +00:00