[modules] Add missing test from r297030.

llvm-svn: 297037
This commit is contained in:
Vassil Vassilev 2017-03-06 17:47:57 +00:00
parent 1d752974c1
commit cccdd330f2
3 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,5 @@
// Check for GNUMode = 1 by looking for the "linux" define which only exists
// for GNUMode = 1.
#ifdef linux
#error "Submodule has GNUMode=1"
#endif

View File

@ -0,0 +1 @@
module "module.h" { header "module.h"}

View File

@ -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"