llvm-project/clang/test/Misc
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
..
Inputs
amdgcn.languageOptsOpenCL.cl
ast-dump-arm-attr.c
ast-dump-attr.cpp Reland "[Attr] Fix parameter indexing for several attributes" 2018-03-13 14:51:22 +00:00
ast-dump-attr.m Allow the NS, CF, and ObjC attributes to be used with -fdouble-square-bracket-attributes. The syntactic locations for such attributes on ObjC constructs have been specifically chosen to follow the GNU attribute syntactic locations. 2018-02-12 13:38:25 +00:00
ast-dump-c-attr.c Add -f[no-]double-square-bracket-attributes as new driver options to control use of [[]] attributes in all language modes. This is the initial implementation of WG14 N2165, which is a proposal to add [[]] attributes to C2x, but also allows you to enable these attributes in C++98, or disable them in C++11 or later. 2017-10-15 15:01:42 +00:00
ast-dump-color.cpp Re-commit r321223, which adds a printing policy to the ASTDumper. 2017-12-21 21:42:42 +00:00
ast-dump-comment.cpp
ast-dump-decl.c
ast-dump-decl.cpp Implement C++ DR727, which permits explicit specializations at class scope. 2018-03-16 13:36:56 +00:00
ast-dump-decl.m
ast-dump-decl.mm
ast-dump-invalid.cpp Re-commit r321223, which adds a printing policy to the ASTDumper. 2017-12-21 21:42:42 +00:00
ast-dump-lookups.cpp
ast-dump-msp430-attr.c
ast-dump-pipe.cl
ast-dump-stmt.c Track in the AST whether the operand to a UnaryOperator can overflow and then use that logic when evaluating constant expressions and emitting codegen. 2018-01-09 13:07:03 +00:00
ast-dump-stmt.cpp
ast-dump-stmt.m
ast-dump-templates.cpp
ast-dump-wchar.cpp
ast-print-bool.c [AST] Fix -ast-print for _Bool when have diagnostics 2018-05-14 18:41:44 +00:00
ast-print-char-literal.cpp
ast-print-enum-decl.c [AST] Fix printing tag decl groups in decl contexts 2018-05-15 00:44:14 +00:00
ast-print-objectivec.m [AST][ObjC] Print implicit property expression that only has a setter without crashing 2018-05-23 00:52:20 +00:00
ast-print-out-of-line-func.cpp
ast-print-pragmas-xfail.cpp Fix typos in clang 2018-04-06 15:14:32 +00:00
ast-print-pragmas.cpp Append new attributes to the end of an AttributeList. 2018-08-03 01:21:16 +00:00
ast-print-record-decl.c [Attr] Don't print implicit attributes 2018-05-15 22:16:47 +00:00
attr-print-emit.cpp [Attr] Merge two dependent tests from different directories 2018-03-13 22:18:29 +00:00
attr-source-range.cpp
backend-optimization-failure-nodbg.cpp
backend-optimization-failure.cpp
backend-resource-limit-diagnostics.cl
backend-stack-frame-diagnostics-fallback.cpp
backend-stack-frame-diagnostics.cpp Recommit r335063: [Darwin] Add a warning for missing include path for libstdc++ 2018-06-19 22:47:53 +00:00
caret-diags-macros.c
caret-diags-multiline.cpp
caret-diags-scratch-buffer.c
cc1as-asm.s
cc1as-compress.s
cc1as-split-dwarf.s Reland r332885, "CodeGen, Driver: Start using direct split dwarf emission in clang." 2018-05-22 18:52:37 +00:00
dev-fd-fs.c Restrict a test using named file descriptors to using the system shell 2018-04-03 18:22:14 +00:00
diag-aka-types.cpp
diag-format.c Fix diag-format test to not care about what cl.exe is on path 2018-04-27 22:32:21 +00:00
diag-greatergreater.cpp PR37189 Fix incorrect end source location and spelling for a split '>>' token. 2018-04-30 05:25:48 +00:00
diag-line-wrapping.cpp
diag-macro-backtrace.c
diag-macro-backtrace2.c DR1687: When overload resolution selects a built-in operator, implicit 2018-06-27 20:30:34 +00:00
diag-mapping.c
diag-mapping2.c
diag-null-bytes-in-line.cpp
diag-presumed.c
diag-special-chars.c
diag-template-diffing-color.cpp
diag-template-diffing-cxx98.cpp
diag-template-diffing.cpp Fix test failure after r333485. Try 2. 2018-05-30 02:20:40 +00:00
diag-trailing-null-bytes.cpp
diag-verify.cpp
diagnostic-crash.cpp
driver-verify.c
emit-html-insert.c
emit-html.c
error-limit-multiple-notes.cpp
error-limit.c
find-diagnostic-id.c
freebsd-arm-size_t.c
include-stack-for-note-flag.cpp
integer-literal-printing.cpp
interpreter.c
languageOptsOpenCL.cl
macro-backtrace.c
message-length.c
nvptx.languageOptsOpenCL.cl
permissions.cpp
pr32207.c
pragma-attribute-cxx-subject-match-rules.cpp
pragma-attribute-cxx.cpp
pragma-attribute-objc-subject-match-rules.m
pragma-attribute-objc.m
pragma-attribute-strict-subjects.c
pragma-attribute-supported-attributes-list.test Implement cpu_dispatch/cpu_specific Multiversioning 2018-07-20 14:13:28 +00:00
predefines.c
r600.languageOptsOpenCL.cl
reduced-diags-macros-backtrace.cpp
reduced-diags-macros.cpp
remap-file.c
serialized-diags-bcanalyzer.c Add tests for llvm-bcanalyzer stream types 2018-04-22 00:04:35 +00:00
serialized-diags-driver.c
serialized-diags-frontend.c
serialized-diags-no-category.c
serialized-diags-no-issue.c
serialized-diags-really-long-text.cpp
serialized-diags-single-issue.c
serialized-diags-stable.c
serialized-diags.c
serialized-diags.h
serialized-diags.m
show-diag-options.c
tabstop.c
target-invalid-cpu-note.c [X86] Introduce archs: goldmont-plus & tremont 2018-04-16 08:10:10 +00:00
target-parser.c
unnecessary-elipses.cpp
unprintable.c
verify.c
warn-in-system-header.c
warn-in-system-header.h
warn-sysheader.cpp
warning-flags-enabled.c
warning-flags-tree.c
warning-flags.c Add warning flag -Wordered-compare-function-pointers. 2018-05-05 00:09:51 +00:00
win32-macho.c
working-directory.c
wrong-encoding.c
wrong-encoding2.c