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 6 void use_implicit_new() { operator new[](3); } 7 8 @import dummy; 9 @import cxx_decls.imported; 10 11 void test_delete(int *p) { 12 // We can call the normal global deallocation function even though it has only 13 // ever been explicitly declared in an unimported submodule. 14 delete p; 15 } 16 17 void friend_1(HasFriends s) { 18 s.private_thing(); 19 } 20 void test_friends(HasFriends s) { 21 friend_1(s); 22 friend_2(s); 23 } 24 25 static_assert(!__is_trivial(HasNontrivialDefaultConstructor), ""); 26 static_assert(!__has_trivial_constructor(HasNontrivialDefaultConstructor), ""); 27 28 void use_implicit_new_again() { operator new[](3); } 29