]> granicus.if.org Git - clang/commitdiff
PR19692: Add (passing) regression test.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 15 Sep 2014 22:14:48 +0000 (22:14 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 15 Sep 2014 22:14:48 +0000 (22:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217836 91177308-0d34-0410-b5e6-96231b3b80d8

test/Modules/Inputs/pr19692/AIX.h [new file with mode: 0644]
test/Modules/Inputs/pr19692/Blah.h [new file with mode: 0644]
test/Modules/Inputs/pr19692/TBlah.h [new file with mode: 0644]
test/Modules/Inputs/pr19692/TFoo.h [new file with mode: 0644]
test/Modules/Inputs/pr19692/module.map [new file with mode: 0644]
test/Modules/Inputs/pr19692/my.cc [new file with mode: 0644]
test/Modules/Inputs/pr19692/stdint.h [new file with mode: 0644]
test/Modules/pr19692.cpp [new file with mode: 0644]

diff --git a/test/Modules/Inputs/pr19692/AIX.h b/test/Modules/Inputs/pr19692/AIX.h
new file mode 100644 (file)
index 0000000..710871e
--- /dev/null
@@ -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 (file)
index 0000000..bdaa83a
--- /dev/null
@@ -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 (file)
index 0000000..a045a8b
--- /dev/null
@@ -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 (file)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
diff --git a/test/Modules/Inputs/pr19692/module.map b/test/Modules/Inputs/pr19692/module.map
new file mode 100644 (file)
index 0000000..f4120dc
--- /dev/null
@@ -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 (file)
index 0000000..bb0b7c5
--- /dev/null
@@ -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 (file)
index 0000000..7615e83
--- /dev/null
@@ -0,0 +1,2 @@
+  #define INT64_MAX 42
+
diff --git a/test/Modules/pr19692.cpp b/test/Modules/pr19692.cpp
new file mode 100644 (file)
index 0000000..6cc5153
--- /dev/null
@@ -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