summaryrefslogtreecommitdiffstats
path: root/clang/test/FixIt/typo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/FixIt/typo.cpp')
-rw-r--r--clang/test/FixIt/typo.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/FixIt/typo.cpp b/clang/test/FixIt/typo.cpp
index 581cd25f9ab..041b86a7f2c 100644
--- a/clang/test/FixIt/typo.cpp
+++ b/clang/test/FixIt/typo.cpp
@@ -40,4 +40,14 @@ struct Derived : public Base {
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'?}}
+
+ int getMember() const {
+ return ember; // expected-error{{use of undeclared identifier 'ember'; did you mean 'member'?}}
+ }
+
+ int &getMember();
};
+
+int &Derived::getMember() {
+ return ember; // expected-error{{use of undeclared identifier 'ember'; did you mean 'member'?}}
+}
OpenPOWER on IntegriCloud