summaryrefslogtreecommitdiff
path: root/test/FixIt
diff options
context:
space:
mode:
authorKaelyn Uhrain <rikka@google.com>2013-06-24 17:49:03 +0000
committerKaelyn Uhrain <rikka@google.com>2013-06-24 17:49:03 +0000
commit8d90b4ab994c48c4b6d53122282dc93ac722bfc7 (patch)
treee9017c97085bca94d00e59b5bfcb37bc37ce4c68 /test/FixIt
parentdbcc7561f6964404c590f42454a249af5324fa44 (diff)
downloadclang-8d90b4ab994c48c4b6d53122282dc93ac722bfc7.tar.gz
Add the global namespace (the "::" namespace specifier) to the list of
namespaces to try for potential typo corrections. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184762 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FixIt')
-rw-r--r--test/FixIt/typo.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/FixIt/typo.cpp b/test/FixIt/typo.cpp
index b3568a5bbf..ea4a97133c 100644
--- a/test/FixIt/typo.cpp
+++ b/test/FixIt/typo.cpp
@@ -6,7 +6,7 @@
namespace std {
template<typename T> class basic_string { // expected-note 2{{'basic_string' declared here}} \
- // expected-note {{'otherstd::basic_string' declared here}}
+ // expected-note {{'::basic_string' declared here}}
public:
int find(const char *substr); // expected-note{{'find' declared here}}
static const int npos = -1; // expected-note{{'npos' declared here}}
@@ -84,8 +84,12 @@ namespace nonstd {
yarn str4; // expected-error{{unknown type name 'yarn'; did you mean 'nonstd::yarn'?}}
wibble::yarn str5; // expected-error{{no type named 'yarn' in namespace 'otherstd'; did you mean 'nonstd::yarn'?}}
+namespace another {
+ template<typename T> class wide_string {}; // expected-note {{'another::wide_string' declared here}}
+}
int poit() {
- nonstd::basic_string<char> str; // expected-error{{no template named 'basic_string' in namespace 'nonstd'; did you mean 'otherstd::basic_string'?}}
+ nonstd::basic_string<char> str; // expected-error{{no template named 'basic_string' in namespace 'nonstd'; did you mean '::basic_string'?}}
+ nonstd::wide_string<char> str2; // expected-error{{no template named 'wide_string' in namespace 'nonstd'; did you mean 'another::wide_string'?}}
return wibble::narf; // expected-error{{no member named 'narf' in namespace 'otherstd'; did you mean 'nonstd::narf'?}}
}