Douglas Gregor | 49009ec | 2011-11-30 04:03:44 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
Douglas Gregor | 49009ec | 2011-11-30 04:03:44 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -fmodule-cache-path %t -fauto-module-import -I %S/Inputs/submodules %s -verify |
| 3 | |
| 4 | __import_module__ std.vector; |
Douglas Gregor | ecc2c09 | 2011-12-01 22:20:10 +0000 | [diff] [blame^] | 5 | |
| 6 | vector<int> vi; |
| 7 | |
| 8 | // Note: remove_reference is not visible yet. |
| 9 | remove_reference<int&>::type *int_ptr = 0; // expected-error{{unknown type name 'remove_reference'}} \ |
| 10 | // expected-error{{expected unqualified-id}} |
| 11 | |
Douglas Gregor | 49009ec | 2011-11-30 04:03:44 +0000 | [diff] [blame] | 12 | __import_module__ 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^] | 13 | |
| 14 | vector<float> vf; |
| 15 | remove_reference<int&>::type *int_ptr2 = 0; |
| 16 | |
Douglas Gregor | 49009ec | 2011-11-30 04:03:44 +0000 | [diff] [blame] | 17 | __import_module__ 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^] | 18 | |
| 19 | __import_module__ std; // import everything in 'std' |
| 20 | |
| 21 | // hash_map still isn't available. |
| 22 | hash_map<int, float> ints_to_floats; // expected-error{{unknown type name 'hash_map'}} \ |
| 23 | // expected-error{{expected unqualified-id}} |
| 24 | |
| 25 | __import_module__ std.hash_map; |
| 26 | |
| 27 | hash_map<int, float> ints_to_floats2; |
| 28 | |