summaryrefslogtreecommitdiffstats
path: root/clang/test/FixIt/typo.cpp
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
commit52dd02d8ef35221568f9afd79f4b4f7b7f7bfda5 (patch)
tree115c84c48adfca87603cf447e21959de5f7c8e9b /clang/test/FixIt/typo.cpp
parentb761900a12a3628327f183124fb8ad4d3354530d (diff)
downloadbcm5719-llvm-52dd02d8ef35221568f9afd79f4b4f7b7f7bfda5.tar.gz
bcm5719-llvm-52dd02d8ef35221568f9afd79f4b4f7b7f7bfda5.zip
Add the global namespace (the "::" namespace specifier) to the list of
namespaces to try for potential typo corrections. llvm-svn: 184762
Diffstat (limited to 'clang/test/FixIt/typo.cpp')
-rw-r--r--clang/test/FixIt/typo.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/test/FixIt/typo.cpp b/clang/test/FixIt/typo.cpp
index b3568a5bbf7..ea4a97133c2 100644
--- a/clang/test/FixIt/typo.cpp
+++ b/clang/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'?}}
}
OpenPOWER on IntegriCloud