diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-06-28 16:20:02 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-06-28 16:20:02 +0000 |
commit | c2fa169d6c8f7975ea9e50c2c1e9dfdbcc071216 (patch) | |
tree | 2290758805540d9136ed9d06794152a42e077d8a /clang/test/FixIt/typo.cpp | |
parent | d79f9666c8a01c59579aa334229f129e7c5cac29 (diff) | |
download | bcm5719-llvm-c2fa169d6c8f7975ea9e50c2c1e9dfdbcc071216.tar.gz bcm5719-llvm-c2fa169d6c8f7975ea9e50c2c1e9dfdbcc071216.zip |
Add support for C++ namespace-aware typo correction, e.g., correcting
vector<int>
to
std::vector<int>
Patch by Kaelyn Uhrain, with minor tweaks + PCH support from me. Fixes
PR5776/<rdar://problem/8652971>.
Thanks Kaelyn!
llvm-svn: 134007
Diffstat (limited to 'clang/test/FixIt/typo.cpp')
-rw-r--r-- | clang/test/FixIt/typo.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/FixIt/typo.cpp b/clang/test/FixIt/typo.cpp index f8b5352374f..e35a0f54069 100644 --- a/clang/test/FixIt/typo.cpp +++ b/clang/test/FixIt/typo.cpp @@ -74,3 +74,9 @@ int foo() { unsinged *ptr = 0; // expected-error{{use of undeclared identifier 'unsinged'; did you mean 'unsigned'?}} return *i + *ptr + global_val; // expected-error{{use of undeclared identifier 'global_val'; did you mean 'global_value'?}} } + +namespace nonstd { + typedef std::basic_string<char> yarn; // expected-note{{'nonstd::yarn' declared here}} +} + +yarn str4; // expected-error{{unknown type name 'yarn'; did you mean 'nonstd::yarn'?}} |