summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC/property-9.m
Commit message (Collapse)AuthorAgeFilesLines
* [Objective-C Sema] Use canonical type of properties when comparing Fariborz Jahanian2015-04-081-0/+15
| | | | | | | redeclaration of property in class extension and to avoid bogus error. rdar://20469452 llvm-svn: 234440
* Added a new attribute, objc_root_class, which informs the compiler when a ↵Patrick Beard2012-04-061-1/+1
| | | | | | | | | 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
* Fix parsing of type-specifier-seq's. Types are syntactically allowed to beRichard Smith2012-03-121-2/+1
| | | | | | | | | | | | | | | | | | defined here, but not semantically, so new struct S {}; is always ill-formed, even if there is a struct S in scope. We also had a couple of bugs in ParseOptionalTypeSpecifier caused by it being under-loved (due to it only being used in a few places) so merge it into ParseDeclarationSpecifiers with a new DeclSpecContext. To avoid regressing, this required improving ParseDeclarationSpecifiers' diagnostics in some cases. This also required teaching ParseSpecifierQualifierList about constexpr... which incidentally fixes an issue where we'd allow the constexpr specifier in other bad places. llvm-svn: 152549
* 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
* Use Sema::RequireCompleteType to check for the completeness ofDouglas Gregor2011-11-141-2/+2
| | | | | | | | | | Objective-C classes. This has two purposes: to consistently provide "forward declaration here" notes when we hit an incomplete type, and to give LLDB a chance to complete the type. RequireCompleteType bits from Sean Callanan! llvm-svn: 144573
* Improve diagnostics when property being looked upFariborz Jahanian2010-12-161-0/+11
| | | | | | in a forward @class object. // rdar://8774513 llvm-svn: 121933
* Downgrade the "declaration does not declare anything" error to aDouglas Gregor2010-04-081-2/+2
| | | | | | | warning. It's not harmful to have such pointless declarations, and GCC does not diagnose this issue consistently. llvm-svn: 100814
* Do not diagnose method disguised as property setterFariborz Jahanian2010-01-061-0/+12
| | | | | | for a 'readonly' property. Fixes radar 7427072. llvm-svn: 92808
* 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 tests to use clang -cc1...Fariborz Jahanian2009-12-141-1/+1
| | | | llvm-svn: 91297
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Implement support for anonymous structs and unions in C. Both C andDouglas Gregor2009-01-121-2/+2
| | | | | | | | | | | | | | C++ handle anonymous structs/unions in the same way. Addresses several bugs: <rdar://problem/6259534> <rdar://problem/6481130> <rdar://problem/6483159> The test case in PR clang/1750 now passes with -fsyntax-only, but CodeGen for inline assembler still fails. llvm-svn: 62112
* make the 'to match this' diagnostic a note.Chris Lattner2008-11-231-4/+6
| | | | llvm-svn: 59921
* Fix <rdar://problem/6268365> Parser rejects property (dot notation) access ↵Steve Naroff2008-10-201-0/+20
| | | | | | on id<protocol>. llvm-svn: 57850
* More property attribute recovery improvements. Instead of this:Chris Lattner2008-10-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | crash.m:8:12: error: type name requires a specifier or qualifier @property (readonlyx, getter=isAwesome) int _awesome; ^ crash.m:8:29: error: expected ';' at end of declaration list @property (readonlyx, getter=isAwesome) int _awesome; ^ crash.m:8:39: error: expected identifier or '(' @property (readonlyx, getter=isAwesome) int _awesome; ^ we now get: crash.m:8:12: error: unknown property attribute 'readonlyx' @property (readonlyx, getter=isAwesome) int _awesome; ^ Also, we can eliminate isObjCPropertyAttribute now. llvm-svn: 57811
* add testcase for the recovery improvements in my last patch.Chris Lattner2008-10-201-0/+8
| | | | llvm-svn: 57810
* fix a crash on unnamed properties like:Chris Lattner2008-10-201-0/+12
| | | | | | @property (readonly) int : 4; llvm-svn: 57805
* Fix <rdar://problem/6239726> Parser rejects: type of property 'list' does ↵Steve Naroff2008-10-161-0/+38
not match type of ivar and http://llvm.org/bugs/show_bug.cgi?id=2893 llvm-svn: 57640
OpenPOWER on IntegriCloud