aboutsummaryrefslogtreecommitdiff
path: root/test/Modules/warn-unused-local-typedef.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Modules/warn-unused-local-typedef.cpp')
-rw-r--r--test/Modules/warn-unused-local-typedef.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Modules/warn-unused-local-typedef.cpp b/test/Modules/warn-unused-local-typedef.cpp
new file mode 100644
index 000000000000..60e0612d6ce7
--- /dev/null
+++ b/test/Modules/warn-unused-local-typedef.cpp
@@ -0,0 +1,9 @@
+// RUN: rm -rf %t
+// RUN: %clang -Wunused-local-typedef -c -x objective-c++ -fcxx-modules -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -o /dev/null 2>&1 | FileCheck %s -check-prefix=CHECK_1
+// RUN: %clang -Wunused-local-typedef -c -x objective-c++ -fcxx-modules -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -o /dev/null 2>&1 | FileCheck %s -check-prefix=CHECK_2 -allow-empty
+
+// For modules, the warning should only fire the first time, when the module is
+// built.
+// CHECK_1: warning: unused typedef
+// CHECK_2-NOT: warning: unused typedef
+@import warn_unused_local_typedef;