From 98a9a6c6674f0a2aded55a89f6b6d0ef52ab145d Mon Sep 17 00:00:00 2001 From: Manuel Klimek Date: Wed, 19 Mar 2014 10:22:36 +0000 Subject: Use the expansion location of the file name when finding the module. The spelling location of stringified strings is not a file location. Optimally, we'll want to solve the problem (as the FIXME states) by handing in the right FileEntry of the #include location. llvm-svn: 204220 --- clang/test/Modules/declare-use3.cpp | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 clang/test/Modules/declare-use3.cpp (limited to 'clang/test/Modules/declare-use3.cpp') diff --git a/clang/test/Modules/declare-use3.cpp b/clang/test/Modules/declare-use3.cpp new file mode 100644 index 00000000000..8b0bbfa756c --- /dev/null +++ b/clang/test/Modules/declare-use3.cpp @@ -0,0 +1,4 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -include "g.h" -include "e.h" -include "f.h" -include "i.h" -fmodule-maps -fmodules-cache-path=%t -fmodules-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify +// expected-error {{module XG does not depend on a module exporting 'f.h'}} +const int g2 = g1 + e + f + aux_i; -- cgit v1.2.3