From 42713d763f052def9d0b525da9530ac97333752c Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Sun, 14 Jul 2013 02:01:48 +0000 Subject: If an unimported submodule of an imported module contains a declaration of a global allocation or deallocation function, that should not cause that global allocation or deallocation function to become unavailable. llvm-svn: 186270 --- clang/test/Modules/cxx-decls.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 clang/test/Modules/cxx-decls.cpp (limited to 'clang/test/Modules/cxx-decls.cpp') diff --git a/clang/test/Modules/cxx-decls.cpp b/clang/test/Modules/cxx-decls.cpp new file mode 100644 index 00000000000..733e3f90bc7 --- /dev/null +++ b/clang/test/Modules/cxx-decls.cpp @@ -0,0 +1,12 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11 + +// expected-no-diagnostics + +@import cxx_decls.imported; + +void test_delete(int *p) { + // We can call the normal global deallocation function even though it has only + // ever been explicitly declared in an unimported submodule. + delete p; +} -- cgit v1.2.3