From e2c70b3a5aca4fc7b28cf965e792222d60834b6a Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 15 Sep 2014 22:14:48 +0000 Subject: [PATCH] PR19692: Add (passing) regression test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217836 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Modules/Inputs/pr19692/AIX.h | 2 ++ test/Modules/Inputs/pr19692/Blah.h | 2 ++ test/Modules/Inputs/pr19692/TBlah.h | 3 +++ test/Modules/Inputs/pr19692/TFoo.h | 1 + test/Modules/Inputs/pr19692/module.map | 3 +++ test/Modules/Inputs/pr19692/my.cc | 5 +++++ test/Modules/Inputs/pr19692/stdint.h | 2 ++ test/Modules/pr19692.cpp | 7 +++++++ 8 files changed, 25 insertions(+) create mode 100644 test/Modules/Inputs/pr19692/AIX.h create mode 100644 test/Modules/Inputs/pr19692/Blah.h create mode 100644 test/Modules/Inputs/pr19692/TBlah.h create mode 100644 test/Modules/Inputs/pr19692/TFoo.h create mode 100644 test/Modules/Inputs/pr19692/module.map create mode 100644 test/Modules/Inputs/pr19692/my.cc create mode 100644 test/Modules/Inputs/pr19692/stdint.h create mode 100644 test/Modules/pr19692.cpp diff --git a/test/Modules/Inputs/pr19692/AIX.h b/test/Modules/Inputs/pr19692/AIX.h new file mode 100644 index 0000000000..710871e21f --- /dev/null +++ b/test/Modules/Inputs/pr19692/AIX.h @@ -0,0 +1,2 @@ + #undef INT64_MAX + diff --git a/test/Modules/Inputs/pr19692/Blah.h b/test/Modules/Inputs/pr19692/Blah.h new file mode 100644 index 0000000000..bdaa83a5a3 --- /dev/null +++ b/test/Modules/Inputs/pr19692/Blah.h @@ -0,0 +1,2 @@ + #include "stdint.h" + diff --git a/test/Modules/Inputs/pr19692/TBlah.h b/test/Modules/Inputs/pr19692/TBlah.h new file mode 100644 index 0000000000..a045a8bd73 --- /dev/null +++ b/test/Modules/Inputs/pr19692/TBlah.h @@ -0,0 +1,3 @@ +#include "Blah.h" + int use = INT64_MAX; + diff --git a/test/Modules/Inputs/pr19692/TFoo.h b/test/Modules/Inputs/pr19692/TFoo.h new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/test/Modules/Inputs/pr19692/TFoo.h @@ -0,0 +1 @@ + diff --git a/test/Modules/Inputs/pr19692/module.map b/test/Modules/Inputs/pr19692/module.map new file mode 100644 index 0000000000..f4120dce6f --- /dev/null +++ b/test/Modules/Inputs/pr19692/module.map @@ -0,0 +1,3 @@ +module cstd { module stdint { header "stdint.h" } } +module LLVMSupport { module Blah { header "Blah.h" export * } module AIX { header "AIX.h" } } +module LLVMTarget { module Blah { header "TBlah.h" export * } module Foo { header "TFoo.h" } } diff --git a/test/Modules/Inputs/pr19692/my.cc b/test/Modules/Inputs/pr19692/my.cc new file mode 100644 index 0000000000..bb0b7c531f --- /dev/null +++ b/test/Modules/Inputs/pr19692/my.cc @@ -0,0 +1,5 @@ +#include "TFoo.h" +#include "stdint.h" + + int k = INT64_MAX; // error! + diff --git a/test/Modules/Inputs/pr19692/stdint.h b/test/Modules/Inputs/pr19692/stdint.h new file mode 100644 index 0000000000..7615e83249 --- /dev/null +++ b/test/Modules/Inputs/pr19692/stdint.h @@ -0,0 +1,2 @@ + #define INT64_MAX 42 + diff --git a/test/Modules/pr19692.cpp b/test/Modules/pr19692.cpp new file mode 100644 index 0000000000..6cc515312f --- /dev/null +++ b/test/Modules/pr19692.cpp @@ -0,0 +1,7 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -I%S/Inputs/pr19692 -verify %s +// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/pr19692 -verify %s +#include "TFoo.h" +#include "stdint.h" + +int k = INT64_MAX; // expected-no-diagnostics -- 2.50.1