Commit Graph

18 Commits

Author SHA1 Message Date
Paul Robinson f067435026 Implement the 'optnone' attribute, which suppresses most optimizations
on a function.

llvm-svn: 205255
2014-03-31 22:29:15 +00:00
Fariborz Jahanian 4b7946a28a ObjectiveC. Sema test for property, methods
'section' attribute. // rdar://15450637

llvm-svn: 197704
2013-12-19 17:22:23 +00:00
Fariborz Jahanian 36129a953d ObjectiveC. Remove warning diagnostic which checks
attribute on method declaration and implementation
match. This makes no sense. Most annotations are
meant for declarations only and one is for implementation.
This has been constant source of regresions and hackery to
get around special cases. I am removing this check.
Such checks must be done on a case by case basis and
when it makes sense. For example, it makes sense
for availability/deprecated and I will file a radar
for that. // rdar://15531984

llvm-svn: 195524
2013-11-23 00:14:32 +00:00
Aaron Ballman 2950cbb567 Giving this test a triple since it uses a calling convention attribute.
llvm-svn: 195099
2013-11-19 04:25:20 +00:00
Aaron Ballman b8f67f2de8 Improving calling convention test coverage by adding tests for things not currently handled. Specifically: the diagnostics in SemaDeclAttr.cpp, and ensuring that calling convention attributes are applied to ObjC method declarations. No functional changes.
llvm-svn: 195098
2013-11-19 04:08:34 +00:00
Fariborz Jahanian 1cfbe7a240 objective-C: Do not warn if align attribute on method
declaration is not provided. It is only necessary on
the method implementation. // rdar://11593375

llvm-svn: 162628
2012-08-24 23:50:13 +00:00
Patrick Beard acfbe9e1f2 Added a new attribute, objc_root_class, which informs the compiler when a root class is intentionally declared.
The warning this inhibits, -Wobjc-root-class, is opt-in for now. However, all clang unit tests that would trigger
the warning have been updated to use -Wno-objc-root-class. <rdar://problem/7446698>

llvm-svn: 154187
2012-04-06 18:12:22 +00:00
Ted Kremenek 59b10db2bc After numerous requests, have Objective-C 'method declared here' notes mention the actual method. This looks better within an IDE, where text isn't always regurgitated in the presentation of a warning. Fixes radar 10914035.
llvm-svn: 151579
2012-02-27 22:55:11 +00:00
Fariborz Jahanian 56f326e7f2 objc: put out more coherent warning when method definition
attributes don't match its declaration. // rdar://10529259.

llvm-svn: 145872
2011-12-06 00:02:41 +00:00
Fariborz Jahanian e96f9c816b Fixes a minor hick up to my last patch.
llvm-svn: 142711
2011-10-22 01:56:45 +00:00
Fariborz Jahanian 512a4cc967 objc: private methods can have their attributes, no diagnostic is required.
None private methods if their implementation have attribute, they must exactly 
match those in their declarations. // rdar://10271563

llvm-svn: 142709
2011-10-22 01:21:15 +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
Fariborz Jahanian 0399c1c9c0 Change tests to use clang -cc1...
llvm-svn: 91297
2009-12-14 17:36:25 +00:00
Fariborz Jahanian d9d6e6e039 Changed wording of warning when attribute is on
method definition.

llvm-svn: 71615
2009-05-13 00:47:33 +00:00
Fariborz Jahanian 2bd617c46c Method attributes may only be specified on method
declarations.

llvm-svn: 71597
2009-05-12 21:36:23 +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
Daniel Dunbar 70e3ebafdb Improve attribute parsing & tests.
- Support noreturn on function-typed variables.

 - Extend isFunctionOrMethod to return true for K&R functions and
   provide hasFunctionProto to check if a decl has information about
   its arguments. This code needs some serious cleaning, but works.

 - Add/improve test cases for noreturn and unused.

llvm-svn: 57778
2008-10-19 02:04:16 +00:00
Daniel Dunbar c136e0ca43 Sema support for format and noreturn attributes on Objective-C methods.
llvm-svn: 56640
2008-09-26 04:12:28 +00:00