diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-12-31 09:10:24 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-12-31 09:10:24 +0000 |
commit | 15e77a2fd3056ff3e46088dc013b48c78f93efa1 (patch) | |
tree | 3b0b1ec96b6518fdcae307450ebdb962240defd3 /clang/test/FixIt/typo.cpp | |
parent | 4e3a5678afc6d4f9bd8a7f8f7dd00a8e2b27518a (diff) | |
download | bcm5719-llvm-15e77a2fd3056ff3e46088dc013b48c78f93efa1.tar.gz bcm5719-llvm-15e77a2fd3056ff3e46088dc013b48c78f93efa1.zip |
Typo correction for C++ base and member initializers, e.g.,
test/FixIt/typo.cpp:41:15: error: initializer 'base' does not name a non-static
data member or base class; did you mean the base class 'Base'?
Derived() : base(),
^~~~
Base
test/FixIt/typo.cpp:42:15: error: initializer 'ember' does not name a non-static
data member or base class; did you mean the member 'member'?
ember() { }
^~~~~
member
llvm-svn: 92355
Diffstat (limited to 'clang/test/FixIt/typo.cpp')
-rw-r--r-- | clang/test/FixIt/typo.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/FixIt/typo.cpp b/clang/test/FixIt/typo.cpp index f869826dc3b..12bfc712f3e 100644 --- a/clang/test/FixIt/typo.cpp +++ b/clang/test/FixIt/typo.cpp @@ -33,3 +33,11 @@ bool test_string(std::string s) { return s.fnd("hello") // expected-error{{no member named 'fnd' in 'class std::basic_string<char>'; did you mean 'find'?}} == std::string::pos; // expected-error{{no member named 'pos' in 'class std::basic_string<char>'; did you mean 'npos'?}} } + +struct Base { }; +struct Derived : public Base { + int member; + + 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'?}} +}; |