summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/attr-deprecated.cpp
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
* Correct class-template deprecation behavior-REDUXErich Keane2017-03-231-6/+6
| | | | | | | | | | | | | | | | | | 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-6/+6
| | | | | | | This reverts commit r298410 (which produces incorrect warnings, see comments on https://reviews.llvm.org/rL298410). llvm-svn: 298504
* Correct class-template deprecation behaviorErich Keane2017-03-211-6/+6
| | | | | | | | | | | | | 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
* Add test to verify we emit warning when the deprecated virtual function is ↵Davide Italiano2015-07-231-0/+6
| | | | | | | | overloaded. Suggested by Richard Smith. llvm-svn: 242980
* [Sema] Diagnose use of declaration correctly.Davide Italiano2015-07-221-5/+5
| | | | | | | | | | | | | Before we skipped that for virtual functions not fully qualified (r81507). This commit basically reverts this to the older behaviour, which seems more consistent. We now also correctly consider ill-formed calls to deleted member functions, which were silently passed before in some cases. The review contains the whole discussion. PR: 20268 Differential Revision: http://reviews.llvm.org/D11334 llvm-svn: 242857
* Implemented delayed processing of 'unavailable' checking, just like with ↵Ted Kremenek2013-12-181-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | '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
* Sema: Only merge typedef attributes if the previous decl is a typedefJustin Bogner2013-10-081-0/+6
| | | | | | | | | | | | In r186373, we started merging attributes on typedefs, but this causes us to try to merge attributes even if the previous declaration was not a typedef. Only merge the attributes if the previous decl was also a typedef. Fixes rdar://problem/15044218 llvm-svn: 192146
* Attempt to fix this test on i686 targets.Nick Lewycky2013-02-121-1/+1
| | | | llvm-svn: 174953
* The meat of this patch is in BuildCXXMemberCalLExpr where we make it useNick Lewycky2013-02-121-1/+12
| | | | | | | | | | | | MarkMemberReferenced instead of marking functions referenced directly. An audit of callers to MarkFunctionReferenced and DiagnoseUseOfDecl also caused a few other changes: * don't mark functions odr-used when considering them for an initialization sequence. Do mark them referenced though. * the function nominated by the cleanup attribute should be diagnosed. * operator new/delete should be diagnosed when building a 'new' expression. llvm-svn: 174951
* 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-21/+21
| | | | | | to the declaration in this patch. // rdar://10893232 llvm-svn: 157537
* pinpoint name/location of deprecated/unavailable enumeratorFariborz Jahanian2011-11-281-2/+2
| | | | | | | 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-2/+2
| | | | | | | attributes from the enumeration type. // rdar://10201690 llvm-svn: 140800
* Parse attributes on enumerators and instantiate attributes on enum decls.John McCall2010-10-221-0/+43
| | | | llvm-svn: 117182
* Diagnose deprecated/unavailable functions selected by overload resolution.John McCall2010-05-061-0/+126
| | | | | | Fixes rdar://problem/4232969, or at least the clang parts of it. llvm-svn: 103191
* 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
* CXXMethodDecl::isVirtual needs to check the canonical declaration. Fixes PR4878.Anders Carlsson2009-09-131-0/+10
| | | | llvm-svn: 81715
* Fix PR4878 for real.Anders Carlsson2009-09-111-0/+13
| | | | llvm-svn: 81507
* Don't check use of a member function declaration used if the member function ↵Anders Carlsson2009-09-101-0/+17
| | | | | | is virtual and the member reference expression doesn't explicitly qualify it. Fixes PR4878. llvm-svn: 81460
* getFunctionLevelDeclContext needs to get the previous DeclContext if ↵Anders Carlsson2009-08-081-0/+10
| | | | | | EnterDeclaratorContext has been called. Fixes PR4694. (Doug, please review) llvm-svn: 78480
* Make sure to diagnose use of declarations in the case where we create an ↵Anders Carlsson2009-08-081-0/+16
implicit CXXThisExpr. llvm-svn: 78474
OpenPOWER on IntegriCloud