Richard Smith | ace21ba | 2013-07-14 02:01:48 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
| 2 | // RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11 |
| 3 | |
| 4 | // expected-no-diagnostics |
| 5 | |
Richard Smith | 868edfa | 2013-08-30 00:23:29 +0000 | [diff] [blame^] | 6 | @import dummy; |
Richard Smith | ace21ba | 2013-07-14 02:01:48 +0000 | [diff] [blame] | 7 | @import cxx_decls.imported; |
| 8 | |
| 9 | void test_delete(int *p) { |
| 10 | // We can call the normal global deallocation function even though it has only |
| 11 | // ever been explicitly declared in an unimported submodule. |
| 12 | delete p; |
| 13 | } |
Richard Smith | 868edfa | 2013-08-30 00:23:29 +0000 | [diff] [blame^] | 14 | |
| 15 | void friend_1(HasFriends s) { |
| 16 | s.private_thing(); |
| 17 | } |
| 18 | void test_friends(HasFriends s) { |
| 19 | friend_1(s); |
| 20 | friend_2(s); |
| 21 | } |