149009ec701feb3009450e57e40c656e2ad7c1f41Douglas Gregor// RUN: rm -rf %t
2953a61f26bf79932b9699b09add4c388764de170Douglas Gregor// RUN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -I %S/Inputs/submodules %s -verify
3c13a34b690d2dc2a03c2fea75a0a1438636c19ceDouglas Gregor// FIXME: When we have a syntax for modules in C++, use that.
449009ec701feb3009450e57e40c656e2ad7c1f41Douglas Gregor
51b257afbae854c6817f26b7d61c4fed8ff7aebadDouglas Gregor@import std.vector;
6ecc2c090e7146c029dd9ee9a5a2fd66b275c01c0Douglas Gregor
7ecc2c090e7146c029dd9ee9a5a2fd66b275c01c0Douglas Gregorvector<int> vi;
8ecc2c090e7146c029dd9ee9a5a2fd66b275c01c0Douglas Gregor
9ecc2c090e7146c029dd9ee9a5a2fd66b275c01c0Douglas Gregor// Note: remove_reference is not visible yet.
10ecc2c090e7146c029dd9ee9a5a2fd66b275c01c0Douglas Gregorremove_reference<int&>::type *int_ptr = 0; // expected-error{{unknown type name 'remove_reference'}} \
11ecc2c090e7146c029dd9ee9a5a2fd66b275c01c0Douglas Gregor// expected-error{{expected unqualified-id}}
12ecc2c090e7146c029dd9ee9a5a2fd66b275c01c0Douglas Gregor
131b257afbae854c6817f26b7d61c4fed8ff7aebadDouglas Gregor@import std.typetraits; // expected-error{{no submodule named 'typetraits' in module 'std'; did you mean 'type_traits'?}}
14ecc2c090e7146c029dd9ee9a5a2fd66b275c01c0Douglas Gregor
15ecc2c090e7146c029dd9ee9a5a2fd66b275c01c0Douglas Gregorvector<float> vf;
16ecc2c090e7146c029dd9ee9a5a2fd66b275c01c0Douglas Gregorremove_reference<int&>::type *int_ptr2 = 0;
17ecc2c090e7146c029dd9ee9a5a2fd66b275c01c0Douglas Gregor
181b257afbae854c6817f26b7d61c4fed8ff7aebadDouglas Gregor@import std.vector.compare; // expected-error{{no submodule named 'compare' in module 'std.vector'}}
19ecc2c090e7146c029dd9ee9a5a2fd66b275c01c0Douglas Gregor
201b257afbae854c6817f26b7d61c4fed8ff7aebadDouglas Gregor@import std; // import everything in 'std'
21ecc2c090e7146c029dd9ee9a5a2fd66b275c01c0Douglas Gregor
22ecc2c090e7146c029dd9ee9a5a2fd66b275c01c0Douglas Gregor// hash_map still isn't available.
23ecc2c090e7146c029dd9ee9a5a2fd66b275c01c0Douglas Gregorhash_map<int, float> ints_to_floats; // expected-error{{unknown type name 'hash_map'}} \
24ecc2c090e7146c029dd9ee9a5a2fd66b275c01c0Douglas Gregor// expected-error{{expected unqualified-id}}
25ecc2c090e7146c029dd9ee9a5a2fd66b275c01c0Douglas Gregor
261b257afbae854c6817f26b7d61c4fed8ff7aebadDouglas Gregor@import std.hash_map;
27ecc2c090e7146c029dd9ee9a5a2fd66b275c01c0Douglas Gregor
28ecc2c090e7146c029dd9ee9a5a2fd66b275c01c0Douglas Gregorhash_map<int, float> ints_to_floats2;
29ecc2c090e7146c029dd9ee9a5a2fd66b275c01c0Douglas Gregor
30