summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/submodules.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-08-20 20:35:18 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-08-20 20:35:18 +0000
commite156254d4c366b2e6d2323e92c8df73cd0dd6c90 (patch)
treec03619d9de5d77d5f77bd67cb0f01c5ade1cb763 /clang/test/Modules/submodules.cpp
parentd2cd2a4e1e9daf87a7754dc8f50fec48b3370e6f (diff)
downloadbcm5719-llvm-e156254d4c366b2e6d2323e92c8df73cd0dd6c90.tar.gz
bcm5719-llvm-e156254d4c366b2e6d2323e92c8df73cd0dd6c90.zip
During typo correction, check for an exact match in an unimported module. If we
find one, then report the error as a missing import instead of as a typo. llvm-svn: 188821
Diffstat (limited to 'clang/test/Modules/submodules.cpp')
-rw-r--r--clang/test/Modules/submodules.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/Modules/submodules.cpp b/clang/test/Modules/submodules.cpp
index 1b4f5d886e3..c653dddbbb5 100644
--- a/clang/test/Modules/submodules.cpp
+++ b/clang/test/Modules/submodules.cpp
@@ -7,8 +7,9 @@
vector<int> vi;
// Note: remove_reference is not visible yet.
-remove_reference<int&>::type *int_ptr = 0; // expected-error{{unknown type name 'remove_reference'}} \
-// expected-error{{expected unqualified-id}}
+remove_reference<int&>::type *int_ptr = 0; // expected-error{{declaration of 'remove_reference' must be imported from module 'std.type_traits' before it is required}}
+// expected-note@Inputs/submodules/type_traits.h:2{{previous}}
+// expected-note@Inputs/submodules/hash_map.h:1{{previous}}
@import std.typetraits; // expected-error{{no submodule named 'typetraits' in module 'std'; did you mean 'type_traits'?}}
@@ -20,8 +21,7 @@ remove_reference<int&>::type *int_ptr2 = 0;
@import std; // import everything in 'std'
// hash_map still isn't available.
-hash_map<int, float> ints_to_floats; // expected-error{{unknown type name 'hash_map'}} \
-// expected-error{{expected unqualified-id}}
+hash_map<int, float> ints_to_floats; // expected-error{{declaration of 'hash_map' must be imported from module 'std.hash_map' before it is required}}
@import std.hash_map;
OpenPOWER on IntegriCloud