summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/attr-ownership.c
Commit message (Collapse)AuthorAgeFilesLines
* Append new attributes to the end of an AttributeList.Michael Kruse2018-08-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Revert "Append new attributes to the end of an AttributeList."Michael Kruse2018-06-251-3/+3
| | | | | | | This reverts commit r335084 as requested by David Jones and Eric Christopher because of differences of emitted warnings. llvm-svn: 335516
* Append new attributes to the end of an AttributeList.Michael Kruse2018-06-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... 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, and therefore printed in the wrong order by -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 effects, especially for 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 attribute's order was changed instead. It also causes some 'previous occurrence here' hints to be textually after the main marker. This typically happens when attributes are merged, but are incompatible. 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 reversed. 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, which often is on the same line. Differential Revision: https://reviews.llvm.org/D48100 llvm-svn: 335084
* [Attr] Use -fsyntax-only in testJoel E. Denny2018-03-021-1/+1
| | | | | | Suggested at: https://reviews.llvm.org/D43248 llvm-svn: 326603
* Fix several accidental DOS line endings in source filesDimitry Andric2016-01-031-6/+6
| | | | | | | | | | | | | | | Summary: There are a number of files in the tree which have been accidentally checked in with DOS line endings. Convert these to native line endings. There are also a few files which have DOS line endings on purpose, and I have set the svn:eol-style property to 'CRLF' on those. Reviewers: joerg, aaron.ballman Subscribers: aaron.ballman, cfe-commits Differential Revision: http://reviews.llvm.org/D15849 llvm-svn: 256704
* Improving the diagnostic for cases where the attribute only appertains to a ↵Aaron Ballman2015-11-041-1/+2
| | | | | | function with a prototype. llvm-svn: 252055
* Amending r249721 to properly handle pathological attribute-related names ↵Aaron Ballman2015-10-091-3/+4
| | | | | | | | like __ and ____. Patch by Adrian Zgorzalek! llvm-svn: 249833
* Implemented a diagnostic to handle multiple, distinct ownership_return ↵Aaron Ballman2014-07-311-0/+5
| | | | | | attributes on the same declaration. This removes a FIXME from the code. llvm-svn: 214436
* Updated the wording of two attribute-related diagnostics so that they print ↵Aaron Ballman2014-01-021-3/+3
| | | | | | the offending attribute name. Also updates the associated test cases. llvm-svn: 198355
* Switch attribute test line endings from CRLFAlp Toker2013-10-201-19/+19
| | | | | | The convention is LF unless specifically testing line endings. llvm-svn: 193056
* Updated the way the ownership attributes are semantically diagnosed. Added ↵Aaron Ballman2013-09-161-0/+19
test cases for the semantics checks. llvm-svn: 190802
OpenPOWER on IntegriCloud