From: Vassil Vassilev Date: Wed, 6 Apr 2016 20:58:12 +0000 (+0000) Subject: [modules] Add forgotten test case to r265597. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fc4e7b9f74f2001626f26ba6b7cc9a5f95cc7d41;p=clang [modules] Add forgotten test case to r265597. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265599 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Modules/Inputs/PR27186/Rtypes.h b/test/Modules/Inputs/PR27186/Rtypes.h new file mode 100644 index 0000000000..ecbe10d34d --- /dev/null +++ b/test/Modules/Inputs/PR27186/Rtypes.h @@ -0,0 +1,2 @@ +#include +typedef struct timespec timespec_t; diff --git a/test/Modules/Inputs/PR27186/module.modulemap b/test/Modules/Inputs/PR27186/module.modulemap new file mode 100644 index 0000000000..58ce19d0d5 --- /dev/null +++ b/test/Modules/Inputs/PR27186/module.modulemap @@ -0,0 +1,5 @@ +module "Rtypes.h" { header "Rtypes.h" } +module a [extern_c] { + header "stddef.h" + header "time.h" +} diff --git a/test/Modules/Inputs/PR27186/stddef.h b/test/Modules/Inputs/PR27186/stddef.h new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/test/Modules/Inputs/PR27186/stddef.h @@ -0,0 +1 @@ + diff --git a/test/Modules/Inputs/PR27186/time.h b/test/Modules/Inputs/PR27186/time.h new file mode 100644 index 0000000000..9ac2ace373 --- /dev/null +++ b/test/Modules/Inputs/PR27186/time.h @@ -0,0 +1 @@ +struct timespec; diff --git a/test/Modules/pr27186.cpp b/test/Modules/pr27186.cpp new file mode 100644 index 0000000000..02a8fe5b00 --- /dev/null +++ b/test/Modules/pr27186.cpp @@ -0,0 +1,7 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -std=c++11 -I%S/Inputs/PR27186 -I%S/Inputs/PR27186/subdir/ -verify %s +// RUN: %clang_cc1 -nostdsysteminc -std=c++11 -fmodules -fmodule-map-file=%S/Inputs/PR27186/module.modulemap -fmodules-cache-path=%t -I%S/Inputs/PR27186/ -verify %s + +#include "Rtypes.h" + +// expected-no-diagnostics