summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/attr-deprecated.c
Commit message (Collapse)AuthorAgeFilesLines
* [Sema] Don't allow -Wunguarded-availability to be silenced with redeclsErik Pilkington2017-07-051-2/+2
| | | | | | Differential revision: https://reviews.llvm.org/D33816 llvm-svn: 307175
* Correct class-template deprecation behavior-REDUXErich Keane2017-03-231-10/+13
| | | | | | | | | | | | | | | | | | Correct class-template deprecation behavior Based on the comment in the test, and my reading of the standard, a deprecated warning should be issued in the following case: template<typename T> [[deprecated]] class Foo{}; Foo<int> f; This was not the case, because the ClassTemplateSpecializationDecl creation did not also copy the deprecated attribute. Note: I did NOT audit the complete set of attributes to see WHICH ones should be copied, so instead I simply copy ONLY the deprecated attribute. Previous DiffRev: https://reviews.llvm.org/D27486, was reverted. This patch fixes the issues brought up here by the reverter: https://reviews.llvm.org/rL298410 Differential Revision: https://reviews.llvm.org/D31245 llvm-svn: 298634
* Revert "Correct class-template deprecation behavior"Martin Bohme2017-03-221-10/+10
| | | | | | | This reverts commit r298410 (which produces incorrect warnings, see comments on https://reviews.llvm.org/rL298410). llvm-svn: 298504
* Revert "iFix Test deprecation behavior in C89 mode as a result of r298410"Martin Bohme2017-03-221-4/+1
| | | | | | | This reverts commit r298433. (Required to revert r298410, see comments there.) llvm-svn: 298503
* iFix Test deprecation behavior in C89 mode as a result of r298410Erich Keane2017-03-211-1/+4
| | | | llvm-svn: 298433
* Correct class-template deprecation behaviorErich Keane2017-03-211-10/+10
| | | | | | | | | | | | | Based on the comment in the test, and my reading of the standard, a deprecated warning should be issued in the following case: template<typename T> [[deprecated]] class Foo{}; Foo<int> f; This was not the case, because the ClassTemplateSpecializationDecl creation did not also copy the deprecated attribute. Note: I did NOT audit the complete set of attributes to see WHICH ones should be copied, so instead I simply copy ONLY the deprecated attribute. Differential Revision: https://reviews.llvm.org/D27486 llvm-svn: 298410
* Set the default C standard to C99 when targeting the PS4.Sunil Srivastava2016-04-271-0/+5
| | | | | | | | Patch by Douglas Yung! Differential Revision: http://reviews.llvm.org/D19003 llvm-svn: 267772
* Switch C compilations to C11 by default.Richard Smith2014-10-201-2/+2
| | | | | | | | This is long-since overdue, and matches GCC 5.0. This should also be backwards-compatible, because we already supported all of C11 as an extension in C99 mode. llvm-svn: 220244
* Implemented delayed processing of 'unavailable' checking, just like with ↵Ted Kremenek2013-12-181-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | '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
* Merge attributes on typedef decls.Eli Friedman2013-07-161-0/+4
| | | | | | | | | Not completely sure this is right, but it's clearly better than what we did before this commit (effectively dropping the attribute). <rdar://problem/14413117> llvm-svn: 186373
* Handle deprecation diagnostics correctly for C struct fields and Objective-C ↵Eli Friedman2012-08-081-1/+8
| | | | | | properties/ivars. <rdar://problem/6642337>. llvm-svn: 161534
* Unify the codepaths for emitting deprecation warnings. The test changes are ↵Eli Friedman2012-08-081-6/+6
| | | | | | just to account for us emitting notes more consistently. llvm-svn: 161528
* -Wdeprecated warning to include reference (as a note)Fariborz Jahanian2012-05-271-8/+8
| | | | | | to the declaration in this patch. // rdar://10893232 llvm-svn: 157537
* Remove a non-gcc-compatible extension that would apply attributes on ↵Eli Friedman2011-12-171-2/+2
| | | | | | declarations without a declarator to structs. Add a warning for ignored attributes. Patch by Michael Han. llvm-svn: 146796
* pinpoint name/location of deprecated/unavailable enumeratorFariborz Jahanian2011-11-281-1/+1
| | | | | | | 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-1/+1
| | | | | | | attributes from the enumeration type. // rdar://10201690 llvm-svn: 140800
* Check for deprecated/unavailable/etc attributes on fields that areDouglas Gregor2011-06-291-0/+2
| | | | | | initialized via initializer lists. Fixes <rdar://problem/9694686>. llvm-svn: 134099
* 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
* Parse attributes on enumerators and instantiate attributes on enum decls.John McCall2010-10-221-0/+11
| | | | llvm-svn: 117182
* Add support for differentiating between attributes ignored when handled andChandler Carruth2010-07-081-3/+1
| | | | | | | | unknown attributes that we discard. Add a diagnostic group for unknown attribute warnings to allow turning these off when we don't care. Also consolidates the tests for this case. llvm-svn: 107864
* 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
* Change our basic strategy for avoiding deprecation warnings when the decl useJohn McCall2009-11-041-0/+45
| | | | | | | | | | | | appears in a deprecated context. In the new strategy, we emit the warnings as usual unless we're currently parsing a declaration, where "declaration" is restricted to mean a decl group or a few special cases in Objective C. If we *are* parsing a declaration, we queue up the deprecation warnings until the declaration has been completely parsed, and then emit them only if the decl is not deprecated. We also standardize the bookkeeping for deprecation so as to avoid special cases. llvm-svn: 85998
* Implement rdar://6756623 - use of deprecated type in deprecated typedef ↵Chris Lattner2009-10-251-0/+6
| | | | | | should not warn llvm-svn: 85073
* When parsing a top level struct declaration, make sure to Chris Lattner2009-10-251-0/+6
| | | | | | | | | process decl attributes instead of dropping them on the floor. This allows us to diagnose cases like the testcase. Also don't diagnose deprecated stuff in ActOnTag: not all uses of tags may be 'uses', and SemaType does this now. llvm-svn: 85071
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-1/+1
| | | | llvm-svn: 81346
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* diagnose uses of deprecated typenames and tags.Chris Lattner2009-02-161-0/+2
| | | | | | We now pass all the deprecation tests in the objc.dg suite. llvm-svn: 64679
* add support for deprecated objc ivars.Chris Lattner2009-02-161-0/+1
| | | | llvm-svn: 64637
* Add support for deprecated members of RecordDecls (e.g. struct fields).Chris Lattner2009-02-161-0/+8
| | | | llvm-svn: 64634
* allow implementations of deprecated functions to use deprecated symbols.Chris Lattner2009-02-151-1/+1
| | | | llvm-svn: 64572
* new tests, it would be nice to not warn on the second one.Chris Lattner2009-02-141-0/+9
| | | | llvm-svn: 64549
* Start warning about unknown attributes.Anders Carlsson2009-02-131-1/+1
| | | | llvm-svn: 64447
* rename some attr tests for consistency.Chris Lattner2008-06-261-0/+25
llvm-svn: 52770
OpenPOWER on IntegriCloud