summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/attr-unavailable-message.c
Commit message (Collapse)AuthorAgeFilesLines
* [Sema] Don't allow -Wunguarded-availability to be silenced with redeclsErik Pilkington2017-07-051-4/+4
| | | | | | Differential revision: https://reviews.llvm.org/D33816 llvm-svn: 307175
* [TableGen] Ignore fake args for parsing-related arg counts.George Burgess IV2016-12-011-0/+2
| | | | | | | | | | | | | | | | | | We should complain about the following: ``` void foo() __attribute__((unavailable("a", "b"))); ``` Instead, we currently just ignore "b". (...We also end up ignoring "a", because we assume elsewhere that this attribute can only have 1 or 0 args.) This happens because `unavailable` has a fake enum arg, and `AttributeList::{getMinArgs,getMaxArgs}` include fake args in their counts. llvm-svn: 288388
* Implemented delayed processing of 'unavailable' checking, just like with ↵Ted Kremenek2013-12-181-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | 'deprecated'. Fixes <rdar://problem/15584219> and <rdar://problem/12241361>. This change looks large, but all it does is reuse and consolidate the delayed diagnostic logic for deprecation warnings with unavailability warnings. By doing so, it showed various inconsistencies between the diagnostics, which were close, but not consistent. It also revealed some missing "note:"'s in the deprecated diagnostics that were showing up in the unavailable diagnostics, etc. This change also changes the wording of the core deprecation diagnostics. Instead of saying "function has been explicitly marked deprecated" we now saw "'X' has been been explicitly marked deprecated". It turns out providing a bit more context is useful, and often we got the actual term wrong or it was not very precise (e.g., "function" instead of "destructor"). By just saying the name of the thing that is deprecated/deleted/unavailable we define this issue away. This diagnostic can likely be further wordsmithed to be shorter. llvm-svn: 197627
* err_attribute_not_string has been subsumed by err_attribute_argument_type.Aaron Ballman2013-07-301-3/+3
| | | | llvm-svn: 187400
* Removed a parameter from handleAttrWithMessage to make it more consistent ↵Aaron Ballman2013-07-181-0/+5
| | | | | | with other attribute handlers, as well as other attribute error messages. Added missing test cases for the unavailable attribute, and updated the deprecated test case. llvm-svn: 186578
* Unify the codepaths for emitting deprecation warnings. The test changes are ↵Eli Friedman2012-08-081-1/+1
| | | | | | just to account for us emitting notes more consistently. llvm-svn: 161528
* -Wdeprecated warning to include reference (as a note)Fariborz Jahanian2012-05-271-1/+1
| | | | | | to the declaration in this patch. // rdar://10893232 llvm-svn: 157537
* Modify how the -verify flag works. Currently, the verification string andRichard Trieu2011-12-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | diagnostic message are compared. If either is a substring of the other, then no error is given. This gives rise to an unexpected case: // expect-error{{candidate function has different number of parameters}} will match the following error messages from Clang: candidate function has different number of parameters (expected 1 but has 2) candidate function has different number of parameters It will also match these other error messages: candidate function function has different number of parameters number of parameters This patch will change so that the verification string must be a substring of the diagnostic message before accepting. Also, all the failing tests from this change have been corrected. Some stats from this cleanup: 87 - removed extra spaces around verification strings 70 - wording updates to diagnostics 40 - extra leading or trailing characters (typos, unmatched parens or quotes) 35 - diagnostic level was included (error:, warning:, or note:) 18 - flag name put in the warning (-Wprotocol) llvm-svn: 146619
* pinpoint name/location of deprecated/unavailable enumeratorFariborz Jahanian2011-11-281-4/+4
| | | | | | | whose enum has been made deprecated/unavailable in the warning. // rdar://10201690 llvm-svn: 145264
* c - Enumerators may inherit the deprecated/unavailable Fariborz Jahanian2011-09-291-0/+21
| | | | | | | attributes from the enumeration type. // rdar://10201690 llvm-svn: 140800
* Don't emit 'unavailable' errors inside an unavailable function. rdar://9623855.Argyrios Kyrtzidis2011-06-171-0/+10
| | | | llvm-svn: 133264
* Document Clang's support for attributes on individual enumerators andJohn McCall2010-11-081-0/+2
| | | | | | | tweak the documentation for deprecation-with-message. Provide __has_feature tests for both. rdar://problem/8605692 llvm-svn: 118435
* Patch for adding message to unavailable attribute.Fariborz Jahanian2010-10-061-0/+16
And its documentation. Finishes off // rdar: // 6734520. llvm-svn: 115862
OpenPOWER on IntegriCloud