[arcmt/driver] For the -ccc-arcmt-* flags, claim them when -fno-objc-arc is passed...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Mon, 24 Jun 2013 19:01:18 +0000 (19:01 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Mon, 24 Jun 2013 19:01:18 +0000 (19:01 +0000)
"argument unused during compilation" warning.

rdar://14240566

llvm-svn: 184776

clang/lib/Driver/Tools.cpp
clang/test/ARCMT/driver-migrate.m

index 794d312..8e1d20a 100644 (file)
@@ -2611,6 +2611,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
         break;
       }
     }
+  } else {
+    Args.ClaimAllArgs(options::OPT_ccc_arcmt_check);
+    Args.ClaimAllArgs(options::OPT_ccc_arcmt_modify);
+    Args.ClaimAllArgs(options::OPT_ccc_arcmt_migrate);
   }
 
   if (const Arg *A = Args.getLastArg(options::OPT_ccc_objcmt_migrate)) {
index a912ad9..b1e419a 100644 (file)
@@ -10,3 +10,6 @@
 
 // LINK-NOT: {{ld(.exe)?"}}
 // LINK: {{touch(.exe)?"}}
+
+// RUN: %clang -### -ccc-arcmt-migrate /foo/bar -fsyntax-only -fno-objc-arc %s 2>&1 | FileCheck -check-prefix=CHECK-NOARC %s
+// CHECK-NOARC-NOT: argument unused during compilation