Objective-C SDK modernization. When modernizing to
use NS_ENUM/NS_OPTIONS macros, add an import of
Foundation.h (or its module) as necessary.
rdar://18498550

llvm-svn: 219225
diff --git a/clang/test/ARCMT/objcmt-undefined-ns-macros.m.result b/clang/test/ARCMT/objcmt-undefined-ns-macros.m.result
new file mode 100644
index 0000000..92cdfe3
--- /dev/null
+++ b/clang/test/ARCMT/objcmt-undefined-ns-macros.m.result
@@ -0,0 +1,24 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules -objcmt-migrate-ns-macros -mt-migrate-directory %t %s -x objective-c -fobjc-runtime-has-weak -fobjc-arc -triple x86_64-apple-darwin11
+// RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %s.result
+
+// rdar://18498550
+
+typedef long NSInteger;
+@import Foundation;
+typedef NS_OPTIONS(NSUInteger, UITableStyle) {
+    UIViewNone         = 0x0,
+    UIViewMargin       = 0x1,
+    UIViewWidth        = 0x2,
+    UIViewRightMargin  = 0x3,
+    UIViewBottomMargin = 0xbadbeef
+};
+
+
+typedef
+  NS_ENUM(NSInteger, NumericEnum2) { two = 1 };
+
+typedef NS_ENUM(NSInteger, NumericEnum3) { three = 1 };
+
+typedef NS_ENUM(NSInteger, NumericEnum4) { four = 1 };
+