Eli Friedman
89b1f2c7e1
Handle deprecation diagnostics correctly for C struct fields and Objective-C properties/ivars. <rdar://problem/6642337>.
...
llvm-svn: 161534
2012-08-08 23:04:35 +00:00
Eli Friedman
971bfa11c6
Unify the codepaths for emitting deprecation warnings. The test changes are just to account for us emitting notes more consistently.
...
llvm-svn: 161528
2012-08-08 21:52:41 +00:00
Fariborz Jahanian
f021889036
-Wdeprecated warning to include reference (as a note)
...
to the declaration in this patch. // rdar://10893232
llvm-svn: 157537
2012-05-27 16:59:48 +00:00
Eli Friedman
e321795c60
Remove a non-gcc-compatible extension that would apply attributes on declarations without a declarator to structs. Add a warning for ignored attributes. Patch by Michael Han.
...
llvm-svn: 146796
2011-12-17 00:36:09 +00:00
Fariborz Jahanian
25d09c2209
pinpoint name/location of deprecated/unavailable enumerator
...
whose enum has been made deprecated/unavailable in the warning.
// rdar://10201690
llvm-svn: 145264
2011-11-28 19:45:58 +00:00
Fariborz Jahanian
d71061298c
c - Enumerators may inherit the deprecated/unavailable
...
attributes from the enumeration type.
// rdar://10201690
llvm-svn: 140800
2011-09-29 18:40:01 +00:00
Douglas Gregor
a82064ca27
Check for deprecated/unavailable/etc attributes on fields that are
...
initialized via initializer lists. Fixes <rdar://problem/9694686>.
llvm-svn: 134099
2011-06-29 21:51:31 +00:00
John McCall
f71b45367f
Document Clang's support for attributes on individual enumerators and
...
tweak the documentation for deprecation-with-message. Provide __has_feature
tests for both. rdar://problem/8605692
llvm-svn: 118435
2010-11-08 19:48:17 +00:00
John McCall
811a0f5578
Parse attributes on enumerators and instantiate attributes on enum decls.
...
llvm-svn: 117182
2010-10-22 23:36:17 +00:00
Chandler Carruth
dd1bc0f1b5
Add support for differentiating between attributes ignored when handled and
...
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
2010-07-08 09:42:26 +00:00
Daniel Dunbar
8fbe78f6fc
Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
...
- 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
2009-12-15 20:14:24 +00:00
John McCall
28a6aeab7e
Change our basic strategy for avoiding deprecation warnings when the decl use
...
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
2009-11-04 02:18:39 +00:00
Chris Lattner
b7df3c66c8
Implement rdar://6756623 - use of deprecated type in deprecated typedef should not warn
...
llvm-svn: 85073
2009-10-25 22:31:57 +00:00
Chris Lattner
ecf328e6dd
When parsing a top level struct declaration, make sure to
...
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
2009-10-25 22:21:57 +00:00
Mike Stump
11289f4280
Remove tabs, and whitespace cleanups.
...
llvm-svn: 81346
2009-09-09 15:08:12 +00:00
Daniel Dunbar
a45cf5b6b0
Rename clang to clang-cc.
...
Tests and drivers updated, still need to shuffle dirs.
llvm-svn: 67602
2009-03-24 02:24:46 +00:00
Chris Lattner
a377833888
diagnose uses of deprecated typenames and tags.
...
We now pass all the deprecation tests in the objc.dg suite.
llvm-svn: 64679
2009-02-16 22:07:16 +00:00
Chris Lattner
50afe31b43
add support for deprecated objc ivars.
...
llvm-svn: 64637
2009-02-16 17:19:12 +00:00
Chris Lattner
ee4b5235e3
Add support for deprecated members of RecordDecls (e.g. struct fields).
...
llvm-svn: 64634
2009-02-16 17:07:21 +00:00
Chris Lattner
4c6ea8612a
allow implementations of deprecated functions to use deprecated symbols.
...
llvm-svn: 64572
2009-02-15 01:38:09 +00:00
Chris Lattner
aff301478a
new tests, it would be nice to not warn on the second one.
...
llvm-svn: 64549
2009-02-14 08:27:44 +00:00
Anders Carlsson
6ee8a7dac5
Start warning about unknown attributes.
...
llvm-svn: 64447
2009-02-13 08:22:04 +00:00
Chris Lattner
2239b7d3d2
rename some attr tests for consistency.
...
llvm-svn: 52770
2008-06-26 06:32:02 +00:00