summaryrefslogtreecommitdiffstats
path: root/clang/test/FixIt/typo.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-01-07 00:17:44 +0000
committerDouglas Gregor <dgregor@apple.com>2010-01-07 00:17:44 +0000
commit6da83624e44a4066c31524d60d2226de55c698a0 (patch)
treeaf398a1c3c421d7db12977da2470c7036f385180 /clang/test/FixIt/typo.cpp
parentb907a467e2acee99ecc11cb91c32cf1a3c0ef68c (diff)
downloadbcm5719-llvm-6da83624e44a4066c31524d60d2226de55c698a0.tar.gz
bcm5719-llvm-6da83624e44a4066c31524d60d2226de55c698a0.zip
Whenever we emit a typo-correction diagnostic, also emit a note
pointing to the declaration that we found that has that name (if it is unique). llvm-svn: 92877
Diffstat (limited to 'clang/test/FixIt/typo.cpp')
-rw-r--r--clang/test/FixIt/typo.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/FixIt/typo.cpp b/clang/test/FixIt/typo.cpp
index 041b86a7f2c..ffeb18dde10 100644
--- a/clang/test/FixIt/typo.cpp
+++ b/clang/test/FixIt/typo.cpp
@@ -1,15 +1,15 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
// RUN: %clang_cc1 -fsyntax-only -fixit -o - %s | %clang_cc1 -fsyntax-only -pedantic -Werror -x c++ -
namespace std {
- template<typename T> class basic_string {
- int find(const char *substr);
- static const int npos = -1;
+ template<typename T> class basic_string { // expected-note 2{{'basic_string' declared here}}
+ int find(const char *substr); // expected-note{{'find' declared here}}
+ static const int npos = -1; // expected-note{{'npos' declared here}}
};
- typedef basic_string<char> string;
+ typedef basic_string<char> string; // expected-note 2{{'string' declared here}}
}
-namespace otherstd {
+namespace otherstd { // expected-note 2{{'otherstd' declared here}}
using namespace std;
}
@@ -36,7 +36,7 @@ bool test_string(std::string s) {
struct Base { };
struct Derived : public Base {
- int member;
+ int member; // expected-note 3{{'member' declared here}}
Derived() : base(), // expected-error{{initializer 'base' does not name a non-static data member or base class; did you mean the base class 'Base'?}}
ember() { } // expected-error{{initializer 'ember' does not name a non-static data member or base class; did you mean the member 'member'?}}
OpenPOWER on IntegriCloud