Commit Graph

2619 Commits

Author SHA1 Message Date
Steve Naroff 837dc03222 Make casting 'super' a deprecated warning (instead of a hard error).
This will simplify clang adoption, and is probably better "etiquette" (since gcc has always accepted this idiom without warning). Once we are over the adoption hurdle, we can turn this into an error.

llvm-svn: 68468
2009-04-06 22:07:54 +00:00
Douglas Gregor 7a5bc76b81 Fixed the Fix-It hints for comparison against a string literal. Thanks, Chris!
llvm-svn: 68454
2009-04-06 18:45:53 +00:00
Fariborz Jahanian bc3c77b881 Fixed visibility issues related to objc2's synthesized
ivars.

llvm-svn: 68453
2009-04-06 18:30:00 +00:00
Anders Carlsson 65cb90efc1 Define __OPTIMIZE__ and __OPTIMIZE_SIZE__ if the -O[12] and -Os flags are passed to the compiler.
llvm-svn: 68450
2009-04-06 17:37:10 +00:00
Chris Lattner a8d2dbd181 Daniel convinced me that accepting "const va_list" arguments to va_arg is
a really really bad idea.  Now that we emit an error about the unpromoted
type, users should be able to understand what is going on.

llvm-svn: 68447
2009-04-06 17:07:34 +00:00
Fariborz Jahanian 15e3a5c4b8 writable property in a category of class's superclass
makes the property writable in the current class.
 

llvm-svn: 68446
2009-04-06 16:59:10 +00:00
Chris Lattner dcceee734c Fix a couple of cases where Constant* pointers can dangle in
ObjCNonFragileABITypesHelper by converting them to dynamic
getters.  This fixes a crash on rdar://6757213.  The others
should be converted over as well.

llvm-svn: 68445
2009-04-06 16:53:45 +00:00
Chris Lattner 56382aa890 in va_arg diagnostics, print out the unpromoted type. This makes the
diagnostic use the va_list typedef more often, see the difference in the 
changed testcase.

llvm-svn: 68441
2009-04-05 15:49:53 +00:00
Zhongxing Xu 01a5beb8cd Apply a patch which adds 'OriginalParmVar' to the DeclContextPrinter by Jon
Simons.

llvm-svn: 68436
2009-04-05 02:04:38 +00:00
Chris Lattner 3f5cd77db2 Add a warning for questionable va_args usage.
llvm-svn: 68435
2009-04-05 00:59:53 +00:00
Chris Lattner 9e658eccab GCC compatibility: gcc allows applying va_args to const
va_lists for some reason.  This fixes rdar://6726818

llvm-svn: 68434
2009-04-05 00:52:59 +00:00
Chris Lattner ecdaf40c9e fix rdar://6757323, where an escaped newline in a // comment
was causing the char after the newline to get eaten.

llvm-svn: 68430
2009-04-05 00:26:41 +00:00
Anders Carlsson 468fa6366b Add some basic support for generating C++ member functions.
llvm-svn: 68425
2009-04-04 20:47:02 +00:00
Daniel Dunbar f89733cfb8 Driver: Handle properly calling dsymutil when source input is
preceeded by a linker input flag.
 - <rdar://problem/6757236> clang should make a dSYM when going
   straight from source to binary

 - This still matches gcc, but the right way to solve this would be to
   detect the situation we care about (we are compiling from source
   and linking in one step), instead of looking at the suffix of the
   input file. The Tool doesn't quite have enough information to do
   this yet, however.

 - Also, find the suffix correctly.

llvm-svn: 68417
2009-04-04 00:55:30 +00:00
Anton Korobeynikov 18e831dcc9 Testcase for regparm codegen
llvm-svn: 68415
2009-04-04 00:49:38 +00:00
Fariborz Jahanian 2705859981 Real corener case of a method declared in a protocol
used in a class which declares a property of the same
name. This should not result in an unimplemented
method warning.

llvm-svn: 68409
2009-04-03 21:51:32 +00:00
Chris Lattner 01b8ef2ac4 improve the string literal comparison warning to not call @encode's "string literals".
llvm-svn: 68407
2009-04-03 21:11:28 +00:00
Ted Kremenek 751e7e3833 retain/release checker: don't track NSPanel until we have better reasoning about
the subtle ownership issues of such objects.

llvm-svn: 68397
2009-04-03 19:02:51 +00:00
Chris Lattner 3a4e43107b add fixit advice to an archiac ObjC issue.
llvm-svn: 68395
2009-04-03 18:38:42 +00:00
Anders Carlsson 16b1461c21 Ignore plus operands when looking up the operand number from a named operand. This matches llvm-gcc and fixes PR3908.
llvm-svn: 68371
2009-04-03 05:57:08 +00:00
Fariborz Jahanian befc9dfbff Implement -fvisibility.
llvm-svn: 68369
2009-04-03 03:28:57 +00:00
Steve Naroff 3e90e33356 Tweak test (now that http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090330/015001.html is fixed).
llvm-svn: 68364
2009-04-03 01:25:18 +00:00
Daniel Dunbar fd6cfcffa2 Add target hook for setting symbol prefix and section of unicode
string literals.

llvm-svn: 68363
2009-04-03 00:57:44 +00:00
Mike Stump 898840f98c Move the rest of the fixit tests to the FixIt area.
llvm-svn: 68349
2009-04-02 23:44:32 +00:00
Mike Stump 5230b85fc1 Update wording.
llvm-svn: 68347
2009-04-02 23:42:13 +00:00
Douglas Gregor 9c0d38a7a0 Add a new command-line option "-fixit-at=file:line:column" that only
applies fix-its to error messages that occur at that specific location
in the program. 

llvm-svn: 68342
2009-04-02 19:05:20 +00:00
Fariborz Jahanian 38a5c9650e Fix up lookup rules for properties declared in
objc's continuation class.

llvm-svn: 68339
2009-04-02 18:44:20 +00:00
Steve Naroff d5ca2d0165 Fix http://llvm.org/bugs/show_bug.cgi?id=3907.
llvm-svn: 68338
2009-04-02 18:37:59 +00:00
Mike Stump d3e3885f2d Remove -ftrapu.
llvm-svn: 68330
2009-04-02 18:15:54 +00:00
Ted Kremenek 701fc10087 Add a few more analyzer test cases.
llvm-svn: 68326
2009-04-02 17:25:00 +00:00
Douglas Gregor 68bc53967e Move the fix-it tests into their own subdirectory
llvm-svn: 68325
2009-04-02 17:19:13 +00:00
Anders Carlsson 4eca109941 Implement mangling of declarations inside functions.
llvm-svn: 68321
2009-04-02 16:24:45 +00:00
Anders Carlsson f2125a02db Mangle VarDecls correctly.
llvm-svn: 68320
2009-04-02 16:05:20 +00:00
Douglas Gregor d8e97def58 When calling a function without a prototype for which we have a
definition, warn if there are too many/too few function call
arguments.

llvm-svn: 68318
2009-04-02 15:37:10 +00:00
Anders Carlsson cbaeb9e633 Emit code for linkage specifications.
llvm-svn: 68300
2009-04-02 05:55:18 +00:00
Douglas Gregor 3b3e0b3c1e Make darned sure that the -fixit tests are testing what we want them to test
llvm-svn: 68289
2009-04-02 04:59:27 +00:00
Douglas Gregor 7e70204613 Update comments in fixit tests
llvm-svn: 68279
2009-04-02 03:20:30 +00:00
Ted Kremenek 9335fecc2a Update expected warning in test case.
llvm-svn: 68276
2009-04-02 02:52:13 +00:00
Mike Stump 0be8875ea4 A code modification hint for files that don't end in a newline.
Eventually, would be nice to be able to run these modifications even
when we don't want the warning or errors for the actual diagnostic.

llvm-svn: 68272
2009-04-02 02:29:42 +00:00
Mike Stump 36c36ebc8b Oops, almost forgot the testcases.
llvm-svn: 68270
2009-04-02 01:14:26 +00:00
Douglas Gregor 578dae57ca Introduce a "-fixit" mode to clang-cc that applies code-modification hints.
llvm-svn: 68268
2009-04-02 01:08:08 +00:00
Mike Stump 21c81fdce4 We no longer expect an warning as this is now valid.
llvm-svn: 68263
2009-04-02 00:04:12 +00:00
Douglas Gregor 170512fa78 Add some more code modification hints
llvm-svn: 68261
2009-04-01 23:51:29 +00:00
Fariborz Jahanian e4fd640147 Fix a bug in declaration of property in continuation
class which was exposed by implementation of 
objc2's nonfragile abi code gen.

llvm-svn: 68259
2009-04-01 23:23:53 +00:00
Douglas Gregor e3e01a20d0 Add code modification hints to various parsing-related diagnostics.
Plus, reword a extension warnings to avoid talking about "ISO C" when
the extension might also be available in C++ or C++0x. 

llvm-svn: 68257
2009-04-01 22:41:11 +00:00
Douglas Gregor fe3d7d0880 Make parsing a semantic analysis a little more robust following Sema
failures that involve malformed types, e.g., "typename X::foo" where
"foo" isn't a type, or "std::vector<void>" that doens't instantiate
properly.

Similarly, be a bit smarter in our handling of ambiguities that occur
in Sema::getTypeName, to eliminate duplicate error messages about
ambiguous name lookup.

This eliminates two XFAILs in test/SemaCXX, one of which was crying
out to us, trying to tell us that we were producing repeated error
messages.

llvm-svn: 68251
2009-04-01 21:51:26 +00:00
Steve Naroff 0f55fd9f33 Update test case and comment.
llvm-svn: 68247
2009-04-01 21:27:56 +00:00
Steve Naroff 8d816d6cb5 CodeGenModule::GetAddrOfConstantCFString():
- Finish up support for converting UTF8->UTF16 to support ObjC @"string" constants.

Remove warning from CheckObjCString.

As the FIXME in the test case indicates, I still have a bug to work out (apparently with \u handling).

llvm-svn: 68245
2009-04-01 21:16:31 +00:00
Fariborz Jahanian 78be1651e2 Nonfragile ivar synthesis with property is in a continuation
class.

llvm-svn: 68234
2009-04-01 19:37:34 +00:00
Daniel Dunbar 7fdda1d695 Split PTH tests from carbon.c into separate test.
llvm-svn: 68223
2009-04-01 18:25:32 +00:00