summaryrefslogtreecommitdiff
path: root/test/Modules/gnumode-non-benign.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Modules/gnumode-non-benign.cpp')
-rw-r--r--test/Modules/gnumode-non-benign.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Modules/gnumode-non-benign.cpp b/test/Modules/gnumode-non-benign.cpp
new file mode 100644
index 0000000000000..9255dfe24b110
--- /dev/null
+++ b/test/Modules/gnumode-non-benign.cpp
@@ -0,0 +1,11 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/gnumode-non-benign -verify %s
+
+// expected-no-diagnostics
+
+// This test ensures that submodules have the same GNUMode language option
+// setting as the main clang invocation.
+// Note that we set GNUMode = 0 with -std=c++11 for this file.
+
+// This module fails to compile with GNUMode = 1.
+#include "module.h"