From 6da83624e44a4066c31524d60d2226de55c698a0 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 7 Jan 2010 00:17:44 +0000 Subject: 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 --- clang/test/FixIt/typo.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'clang/test/FixIt/typo.cpp') 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 class basic_string { - int find(const char *substr); - static const int npos = -1; + template 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 string; + typedef basic_string 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'?}} -- cgit v1.2.3