summaryrefslogtreecommitdiff
path: root/test/Rewriter
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-03-18 19:41:18 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-03-18 19:41:18 +0000
commit51be73daa9df0b9eab157318a9274ebe3e46c627 (patch)
treeb05a394e9004e94ed4fa8a527f24e2d2a00e9aa1 /test/Rewriter
parentf3260565f46491a0d99e41d47a13767218242ce5 (diff)
Objective-C modern translator. Don't put line info
into the pre-preprocessed file to be passed to modern translator when compiling in no debug mode. // rdar://13138170 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177311 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Rewriter')
-rw-r--r--test/Rewriter/rewrite-line-directive.m18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Rewriter/rewrite-line-directive.m b/test/Rewriter/rewrite-line-directive.m
new file mode 100644
index 0000000000..5c4e9574c1
--- /dev/null
+++ b/test/Rewriter/rewrite-line-directive.m
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -E %s -o %t.mm
+// RUN: %clang -fms-extensions -rewrite-objc %t.mm -o %t-rw.cpp
+// RUN: FileCheck -check-prefix LP --input-file=%t-rw.cpp %s
+// RUN: %clang -g -fms-extensions -rewrite-objc %t.mm -o %t-rw.cpp
+// RUN: FileCheck -check-prefix LPG --input-file=%t-rw.cpp %s
+// rdar://13138170
+
+int z();
+
+int x() {
+ id foo;
+ for (id y in foo) {
+ z();
+ }
+ return 0;
+}
+// CHECK-LP-NOT: #line
+// CHECK-LPG: #line