llvm-project/clang/test/Driver
Douglas Gregor 33823727c8 Implement Objective-C Related Result Type semantics.
Related result types apply Cocoa conventions to the type of message
sends and property accesses to Objective-C methods that are known to
always return objects whose type is the same as the type of the
receiving class (or a subclass thereof), such as +alloc and
-init. This tightens up static type safety for Objective-C, so that we
now diagnose mistakes like this:

t.m:4:10: warning: incompatible pointer types initializing 'NSSet *'
with an
      expression of type 'NSArray *' [-Wincompatible-pointer-types]
  NSSet *array = [[NSArray alloc] init];
         ^       ~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1:
note: 
      instance method 'init' is assumed to return an instance of its
      receiver
      type ('NSArray *')
- (id)init;
^

It also means that we get decent type inference when writing code in
Objective-C++0x:

  auto array = [[NSMutableArray alloc] initWithObjects:@"one",  @"two",nil];
  //    ^ now infers NSMutableArray* rather than id

llvm-svn: 132868
2011-06-11 01:09:30 +00:00
..
Wp-args.c Driver: Fix PR4062 by dissecting one particular -Wp, form. 2010-06-14 21:37:09 +00:00
Xarch.c Update tests to use %clang instead of 'clang', and forcibly disable use of ' 2009-12-15 22:01:24 +00:00
Xlinker-args.c Fix typo. 2010-06-15 08:21:35 +00:00
analyze.c Use -fno-math-errno by default, and remove the IsMathErrnoDefault 2010-01-08 02:20:44 +00:00
apple-kext-i386.cpp Driver/Darwin: Transparently fallback when compiling i386 -fapple-kext code, we 2011-03-18 20:14:03 +00:00
apple-kext-mkernel.c Frontend: Add a more explicit -backend-option flag for passing backend command 2011-03-22 16:48:17 +00:00
arch.c Set the default arch based on the triple. 2010-06-28 17:18:09 +00:00
arm-darwin-builtin.c Update tests to use %clang instead of 'clang', and forcibly disable use of ' 2009-12-15 22:01:24 +00:00
ast.c fix a bunch of comment typos found by codespell. Patch by 2011-04-15 05:22:18 +00:00
at_file.c Implement support for reading arguments specified in a file with @file. If 2010-07-19 15:20:12 +00:00
at_file.c.args Implement support for reading arguments specified in a file with @file. If 2010-07-19 15:20:12 +00:00
bindings.c Driver: Start ripping out support for -pipe, which is worthless and complicates 2010-08-02 02:38:03 +00:00
cc-log-diagnostics.c Frontend: Fix a crash in CC_LOG_DIAGNOSTICS handling. 2011-05-05 02:12:02 +00:00
cc-print-options.c Add -no-canonical-prefixes to tests which assert on the name of the 2011-04-13 22:28:36 +00:00
ccc-add-args.c Update tests to use %clang instead of 'clang', and forcibly disable use of ' 2009-12-15 22:01:24 +00:00
cfi.c The logic about -static is darwin only. For now assume that all non 2011-05-17 16:26:17 +00:00
clang-c-as-cxx.c PR5803: clang++: Treat untyped 'C' inputs as C++. 2010-02-17 20:32:58 +00:00
clang-exception-flags.cpp Add a test case that would have caught the bug fixed in r126640. 2011-02-28 07:38:09 +00:00
clang-g-opts.c Don't produce debug info when given -g. Fixes PR6529. 2010-03-07 04:46:18 +00:00
clang-translation.c Driver/ARM: Match GCC behavior in that -msoft-float disables NEON, despite this 2011-03-17 00:07:34 +00:00
clang_cpp.c Update tests to use %clang instead of 'clang', and forcibly disable use of ' 2009-12-15 22:01:24 +00:00
clang_f_opts.c Move all of the logic for __DEPRECATED to the driver based on comments 2011-04-23 19:48:40 +00:00
clang_wrapv_opts.c Add my test case for r128353. I think this is the last test case to fail 2011-03-27 21:03:41 +00:00
darwin-as.c Driver/Darwin: Set -force_cpusubtype_ALL only by default on x86. 2010-07-22 01:47:22 +00:00
darwin-cc.c test/Driver/darwin-cc.c: FileCheck-ize and tweak for Mingw MSYS bash. 2011-03-18 03:21:26 +00:00
darwin-debug-flags.c Update metadata id number in string compare check. 2011-05-03 16:19:38 +00:00
darwin-dsymutil.c Driver/Darwin: Dsymutil actions should put the dSYM adjacent to the output file. 2011-03-25 18:16:51 +00:00
darwin-iphone-defaults.m Driver/Darwin: Resolve deployment target defaulting to be more predictable; 2010-07-15 16:18:06 +00:00
darwin-ld.c Fix the Windows buildbots, now that I can actually see what was going wrong with this test. 2011-06-03 00:54:56 +00:00
darwin-objc-defaults.m Driver/Darwin: Fix Objective-C non-fragile ABI and dispatch method defaults, which were wrong in numerous places. 2010-04-24 18:37:41 +00:00
darwin-objc-gc.m Driver: Ignore -fobjc-gc and -fobjc-gc-only for platforms which don't support them. 2010-04-10 16:20:23 +00:00
darwin-objc-options.m Driver: Add support for -fobjc-abi-version=. 2010-04-28 23:25:24 +00:00
darwin-version.c Driver/Darwin: Allow OS X deployment targets like 10.4.11, even though they 2011-04-21 21:27:33 +00:00
darwin-xarch.c TWEAK 2011-04-19 23:34:21 +00:00
default-toolchain.c Update tests to use %clang instead of 'clang', and forcibly disable use of ' 2009-12-15 22:01:24 +00:00
dragonfly.c Update tests to not search of as. 2010-10-29 21:18:11 +00:00
emit-llvm.c Use ld directly on linux. Changes from the previous try: 2010-11-07 20:14:31 +00:00
exceptions.m Driver/Obj-C: Be compatible with GCC behavior in that -fno-exceptions *does not* 2011-03-17 23:28:31 +00:00
flags.c Update tests to use %clang instead of 'clang', and forcibly disable use of ' 2009-12-15 22:01:24 +00:00
freebsd.c Add hardcoded -L/usr/lib after all -L options to the FreeBSD linker 2011-01-30 08:12:24 +00:00
gcc_forward.c Driver/OptParser: Add a NoForward flag to prevent forwarding certain options to 2010-08-13 04:44:20 +00:00
hello.c test/Driver/hello.c: Tweak for cygming. 2011-03-16 13:51:46 +00:00
immediate-options.c Update tests to use %clang instead of 'clang', and forcibly disable use of ' 2009-12-15 22:01:24 +00:00
lto.c Driver: Support invoking Clang on .ll or .bc inputs. 2010-06-07 23:28:45 +00:00
m_and_mm.c Driver: M and MM should be grouped together, <rdar://problem/8744831>. 2010-12-08 21:33:40 +00:00
nostdincxx.cpp XFAIL the -nostdinc++ test on Windows; it doesn't look like we even have the notion of separate C and C++ paths there 2010-03-24 20:45:20 +00:00
nostdlib.c On linux, -nostdlib was causing a --start-group with no --end-group to be passed 2011-06-04 06:27:06 +00:00
openbsd.c Update tests to not search of as. 2010-10-29 21:18:11 +00:00
option-aliases.c Driver: Change Option parsing to always create arguments referring to unaliased 2010-06-09 22:44:34 +00:00
parsing.c Update tests to use %clang instead of 'clang', and forcibly disable use of ' 2009-12-15 22:01:24 +00:00
phases.c Update tests to use %clang instead of 'clang', and forcibly disable use of ' 2009-12-15 22:01:24 +00:00
preprocessor.c Update tests to use %clang instead of 'clang', and forcibly disable use of ' 2009-12-15 22:01:24 +00:00
pth.c Revert r116605, a lot more were committed by mistake. 2010-10-15 18:51:34 +00:00
qa_override.c Update tests to use %clang instead of 'clang', and forcibly disable use of ' 2009-12-15 22:01:24 +00:00
redzone.c Update tests to use %clang instead of 'clang', and forcibly disable use of ' 2009-12-15 22:01:24 +00:00
rewrite-objc.m Implement Objective-C Related Result Type semantics. 2011-06-11 01:09:30 +00:00
std.c Update tests to use %clang instead of 'clang', and forcibly disable use of ' 2009-12-15 22:01:24 +00:00
sysroot-flags.c test/Driver/sysroot-flags.c: Tweak for Mingw MSYS bash. 2011-03-18 03:21:33 +00:00
sysroot.c tests: Tweak test to at least use a standard arch, to ensure we try to invoke 2011-05-04 19:52:08 +00:00
unknown-gcc-arch.c Update tests to use %clang instead of 'clang', and forcibly disable use of ' 2009-12-15 22:01:24 +00:00
x86_features.c Update tests to use %clang instead of 'clang', and forcibly disable use of ' 2009-12-15 22:01:24 +00:00