summaryrefslogtreecommitdiff
path: root/test/FixIt
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-02-22 23:17:49 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-02-22 23:17:49 +0000
commit12e3ecec906f65580059a9d8555849a272c2db81 (patch)
tree80ee9cef00c056398294b94fe75fe75bb54d298b /test/FixIt
parent8178df3b39ab923ff5d24538812628abee33df79 (diff)
downloadclang-12e3ecec906f65580059a9d8555849a272c2db81.tar.gz
Provide Fixit warning when 'auto' is intended as storage
specifier in legacy code. Patch is reviewed offline by Doug. // rdar://9036633. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126261 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FixIt')
-rw-r--r--test/FixIt/auto-fixit.m11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/FixIt/auto-fixit.m b/test/FixIt/auto-fixit.m
new file mode 100644
index 0000000000..d09f04c2b7
--- /dev/null
+++ b/test/FixIt/auto-fixit.m
@@ -0,0 +1,11 @@
+/* RUN: cp %s %t
+ RUN: %clang_cc1 -x objective-c -fixit %t
+ RUN: %clang_cc1 -x objective-c -Werror %t
+ */
+
+// rdar://9036633
+
+int main() {
+ auto int i = 0;
+ return i;
+}