"This moves built-in Objective-C types up the scope chains to where they can be replaced by versions included from the runtime library's headers."

This makes it ok to use @"foo" without a declaration for NSConstantString.

Patch by David Chisnall!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52593 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/objc-string.m b/test/Sema/objc-string.m
index c739482..d1d7973 100644
--- a/test/Sema/objc-string.m
+++ b/test/Sema/objc-string.m
@@ -1,11 +1,15 @@
 // RUN: clang %s -verify -fsyntax-only
+// RUN: clang %s -verify -fsyntax-only -DDECLAREIT
 
+// a declaration of NSConstantString is not required.
+#ifdef DECLAREIT
 @interface NSConstantString;
 @end
+#endif
 
 
 
-NSConstantString *s = @"123"; // simple
-NSConstantString *t = @"123" @"456"; // concat
-NSConstantString *u = @"123" @ blah; // expected-error: {{unexpected token}}
+id s = @"123"; // simple
+id t = @"123" @"456"; // concat
+id u = @"123" @ blah; // expected-error: {{unexpected token}}