Douglas Gregor | 49009ec | 2011-11-30 04:03:44 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
Douglas Gregor | c13a34b | 2012-01-03 19:32:59 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -x objective-c++ -fmodule-cache-path %t -fmodules -I %S/Inputs/submodules %s -verify |
| 3 | // FIXME: When we have a syntax for modules in C++, use that. |
Douglas Gregor | 49009ec | 2011-11-30 04:03:44 +0000 | [diff] [blame] | 4 | |
Douglas Gregor | c13a34b | 2012-01-03 19:32:59 +0000 | [diff] [blame] | 5 | @import std.vector; |
Douglas Gregor | ecc2c09 | 2011-12-01 22:20:10 +0000 | [diff] [blame] | 6 | |
| 7 | vector<int> vi; |
| 8 | |
| 9 | // Note: remove_reference is not visible yet. |
| 10 | remove_reference<int&>::type *int_ptr = 0; // expected-error{{unknown type name 'remove_reference'}} \ |
| 11 | // expected-error{{expected unqualified-id}} |
| 12 | |
Douglas Gregor | c13a34b | 2012-01-03 19:32:59 +0000 | [diff] [blame] | 13 | @import std.typetraits; // expected-error{{no submodule named 'typetraits' in module 'std'; did you mean 'type_traits'?}} |
Douglas Gregor | ecc2c09 | 2011-12-01 22:20:10 +0000 | [diff] [blame] | 14 | |
| 15 | vector<float> vf; |
| 16 | remove_reference<int&>::type *int_ptr2 = 0; |
| 17 | |
Douglas Gregor | c13a34b | 2012-01-03 19:32:59 +0000 | [diff] [blame] | 18 | @import std.vector.compare; // expected-error{{no submodule named 'compare' in module 'std.vector'}} |
Douglas Gregor | ecc2c09 | 2011-12-01 22:20:10 +0000 | [diff] [blame] | 19 | |
Douglas Gregor | c13a34b | 2012-01-03 19:32:59 +0000 | [diff] [blame] | 20 | @import std; // import everything in 'std' |
Douglas Gregor | ecc2c09 | 2011-12-01 22:20:10 +0000 | [diff] [blame] | 21 | |
| 22 | // hash_map still isn't available. |
| 23 | hash_map<int, float> ints_to_floats; // expected-error{{unknown type name 'hash_map'}} \ |
| 24 | // expected-error{{expected unqualified-id}} |
| 25 | |
Douglas Gregor | c13a34b | 2012-01-03 19:32:59 +0000 | [diff] [blame] | 26 | @import std.hash_map; |
Douglas Gregor | ecc2c09 | 2011-12-01 22:20:10 +0000 | [diff] [blame] | 27 | |
| 28 | hash_map<int, float> ints_to_floats2; |
| 29 | |