Commit Graph

12 Commits

Author SHA1 Message Date
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
Richard Trieu 553b2b2e5d Modify how the -verify flag works. Currently, the verification string and
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
2011-12-15 00:38:15 +00:00
Anders Carlsson 3320e1575f Make clang -cc1 disable Objective-C exceptions by default, and add a -fobjc-exceptions flag to turn them on.
Update all tests accordingly.

llvm-svn: 126177
2011-02-22 01:52:06 +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
Chris Lattner c70dd56477 add support for goto checking and @synchronized blocks,
rdar://6810106

llvm-svn: 69667
2009-04-21 06:01:00 +00:00
Chris Lattner c5f4ab6372 test that vlas are checked in an objc method context.
llvm-svn: 69508
2009-04-19 05:20:37 +00:00
Chris Lattner 508253d64b the scope checker does work with objc methods, add testcase.
llvm-svn: 69487
2009-04-18 22:37:38 +00:00
Chris Lattner b6e368235a I didn't understand how @catches were chained. Now that I get it, fix
the scope checker to not think @catches are nested in each other, eliminating
some bogus notes.

llvm-svn: 69486
2009-04-18 22:35:34 +00:00
Chris Lattner 5c926f3660 reject invalid jumps among pieces of @try blocks. This seems to work
reasonably well except for the problem that @catches are nested within
each other in the AST, giving the ugly diagnostics in L8.

llvm-svn: 69477
2009-04-18 21:28:52 +00:00
Chris Lattner 07f62f1881 improve wording of scope violation error messages.
llvm-svn: 69456
2009-04-18 18:42:55 +00:00
Chris Lattner e227091199 rename test
llvm-svn: 69455
2009-04-18 18:41:40 +00:00