summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/attributes.c
Commit message (Collapse)AuthorAgeFilesLines
* Require commas to separate multiple GNU-style attributes in the same ↵Aaron Ballman2019-06-181-2/+10
| | | | | | | | attribute list. Fixes PR38352. llvm-svn: 363676
* Uniformed parsing of GNU attributes at line beginnning and added GNU ↵Abramo Bagnara2014-08-161-0/+10
| | | | | | attributes parsing FIXMEs. llvm-svn: 215814
* Properly diagnose standard C++ attributes which have optional argument lists ↵Aaron Ballman2014-04-141-2/+1
| | | | | | | | | | | when the arguments are elided. eg) [[deprecated()]] // error [[deprecated]] // OK [[deprecated("")]] // OK [[gnu::deprecated()]] // OK llvm-svn: 206186
* Using the quoted version of an attribute name for consistency with other ↵Aaron Ballman2014-01-021-6/+6
| | | | | | attribute diagnostics. llvm-svn: 198326
* Factor out custom parsing for iboutletcollection and vec_type_hint attributesRichard Smith2013-10-311-1/+1
| | | | | | | | | into a separate "parse an attribute that takes a type argument" codepath. This results in both codepaths being a lot cleaner and simpler, and fixes some bugs where the type argument handling bled into the expression argument handling and caused us to both accept invalid and reject valid attribute arguments. llvm-svn: 193731
* Allow thread safety attributes on function definitions.DeLesley Hutchins2012-02-161-0/+35
| | | | | | | | For compatibility with gcc, clang will now parse gcc attributes on function definitions, but issue a warning if the attribute is not a thread safety attribute. Warning controlled by -Wgcc-compat. llvm-svn: 150698
* Refactor __attribute__ parsing, and add a diagnostic if the r_paren at the endRichard Smith2011-10-171-0/+5
| | | | | | of an attrib is missing. gcc does not allow the closing parenthesis to be omitted. llvm-svn: 142255
* fix PR6287 by accepting and ignoring the returns_twice attribute.Chris Lattner2010-04-121-0/+4
| | | | llvm-svn: 101005
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Fix attribute between function decl ')' and '{' or '=0'John Thompson2009-11-251-0/+1
| | | | llvm-svn: 89894
* Simplify the scheme used for keywords, and change the classification Eli Friedman2009-04-281-25/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scheme to be more useful. The new scheme introduces a set of categories that should be more readable, and also reflects what we want to consider as an extension more accurately. Specifically, it makes the "what is a keyword" determination accurately reflect whether the keyword is a GNU or Microsoft extension. I also introduced separate flags for keyword aliases; this is useful because the classification of the aliases is mostly unrelated to the classification of the original keyword. This patch treats anything that's in the implementation namespace (prefixed with "__", or "_X" where "X" is any upper-case letter) as a keyword without marking it as an extension. This is consistent with the standards in that an implementation is allowed to define arbitrary extensions in the implementation namespace without violating the standard. This gets rid of all the nasty "extension used" warnings for stuff like __attribute__ in -pedantic mode. We still warn for extensions outside of the the implementation namespace, like typeof. If someone wants to implement -Wextensions or something like that, we could add additional information to the keyword table. This also removes processing for the unused "Boolean" language option; such an extension isn't supported on any other C implementation, so I don't see any point to adding it. The changes to test/CodeGen/inline.c are required because previously, we weren't actually disabling the "inline" keyword in -std=c89 mode. I'll remove Boolean and NoExtensions from LangOptions in a follow-up commit. llvm-svn: 70281
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Support attributes in *yet another* place. Is there any place you Chris Lattner2008-10-201-0/+12
| | | | | | can't stick an attributes? llvm-svn: 57795
* Fix a parser bug where we let attributes interfere with our disambiguationChris Lattner2008-10-201-4/+43
| | | | | | | | | | | | | | | | | | | of whether a '(' was a grouping paren or the start of a function declarator. This is PR2796. Now we eat the attribute before deciding whether the paren is grouping or not, then apply it to the resultant decl or to the first argument as needed. One somewhat surprising aspect of this is that attributes interact with implicit int in cases like this: void a(x, y) // k&r style function void b(__attribute__(()) x, y); // function with two implicit int arguments void c(x, __attribute__(()) y); // error, can't have attr in identifier list. Fun stuff. llvm-svn: 57790
* rename -parse-ast-print to -ast-printChris Lattner2007-10-111-1/+1
| | | | | | | rename -parse-ast-dump to -ast-dump remove -parse-ast, which is redundant with -fsyntax-only llvm-svn: 42852
* Removed option "-parse-ast-check" from clang driver. This is now implementedTed Kremenek2007-09-261-1/+1
| | | | | | | | | | | | using "-parse-ast -verify". Updated all test cases (using a sed script) that invoked -parse-ast-check to now use -parse-ast -verify. Fixed a bug where using "-verify" instead of "-parse-ast-check" would not correctly create the DiagClient needed to accumulate diagnostics. llvm-svn: 42365
* -pedantic no longer defaults to on.Chris Lattner2007-07-121-1/+1
| | | | llvm-svn: 39785
* Submitted by: Bill WendlingBill Wendling2007-06-271-2/+2
| | | | | | - Converted to use the -parse-ast-check flag. llvm-svn: 39681
* new testcaseChris Lattner2006-10-171-0/+6
llvm-svn: 39000
OpenPOWER on IntegriCloud