summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/ParsedAttr.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move some definitions from Sema to Basic to fix shared libs buildErich Keane2019-09-161-70/+0
| | | | | | | | r371875 moved some functionality around to a Basic header file, but didn't move its definitions as well. This patch moves some things around so that shared library building can work. llvm-svn: 371985
* [NFCI]Create CommonAttributeInfo Type as base type of *Attr and ParsedAttr.Erich Keane2019-09-131-8/+12
| | | | | | | | | | | | In order to enable future improvements to our attribute diagnostics, this moves info from ParsedAttr into CommonAttributeInfo, then makes this type the base of the *Attr and ParsedAttr types. Quite a bit of refactoring took place, including removing a bunch of redundant Spelling Index propogation. Differential Revision: https://reviews.llvm.org/D67368 llvm-svn: 371875
* Allow standards-based attributes to have leading and trailing underscores.Aaron Ballman2019-08-151-1/+2
| | | | | | This gives library implementers a way to use standards-based attributes that do not conflict with user-defined macros of the same name. Attributes in C2x require this behavior normatively (C2x 6.7.11p4), but there's no reason to not have the same behavior in C++, especially given that such attributes may be used by a C library consumed by a C++ compilation. llvm-svn: 369033
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Allow a double-underscore spelling of Clang attributes using double square ↵Aaron Ballman2018-11-091-5/+6
| | | | | | | | | | bracket syntax. This matches a similar behavior with GCC accepting [[gnu::__attr__]] as a alias for [[gnu::attr]] in that clang attributes can now be spelled with two leading and trailing underscores. I had always intended for this to work, but missed the critical bit. We already had an existing test in test/Preprocessor/has_attribute.cpp for [[clang::__fallthrough__]] but using that spelling would still give an "unknown attribute" diagnostic. llvm-svn: 346547
* Introduce the _Clang scoped attribute token.Aaron Ballman2018-11-091-5/+9
| | | | | | Currently, we only accept clang as the scoped attribute identifier for double square bracket attributes provided by Clang, but this has the potential to conflict with user-defined macros. To help alleviate these concerns, this introduces the _Clang scoped attribute identifier as an alias for clang. It also introduces a warning with a fixit on the off chance someone attempts to use __clang__ as the scoped attribute (which is a predefined compiler identification macro). llvm-svn: 346521
* Support accepting __gnu__ as a scoped attribute namespace that aliases to gnu.Aaron Ballman2018-10-241-7/+19
| | | | | | This is useful in libstdc++ to avoid clashes with identifiers in the user's namespace. llvm-svn: 345132
* Fix Wundef NDEBUG warning; NFCSven van Haastregt2018-09-241-1/+1
| | | | | | | Check for definedness of the NDEBUG macro rather than its value, to be consistent with other uses. llvm-svn: 342876
* [NFC] Convert ParsedAttr to use llvm::TrailingObjectsErich Keane2018-08-091-2/+6
| | | | | | | | | | | ParsedAttr is using a hand-rolled trailing-objects implementation that gets cleaned up quite a bit by just using llvm::TrailingObjects. This is a large TrailingObjects list, but most things are length '0'. Differential Revision: https://reviews.llvm.org/D50531 llvm-svn: 339380
* [NFC] Rename clang::AttributeList to clang::ParsedAttrErich Keane2018-07-131-0/+235
Since The type no longer contains the 'next' item anymore, it isn't a list, so rename it to ParsedAttr to be more accurate. llvm-svn: 337005
OpenPOWER on IntegriCloud