diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-01-01 17:44:25 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-01-01 17:44:25 +0000 |
commit | 4f2486353aa83c1472582fabfd33bf3b3d5a19a7 (patch) | |
tree | cdf4e2053bc34fed5eafe2eceb5634ee5090ccfe /clang/test/FixIt/typo.cpp | |
parent | 3f8f44757fd27e4c0436e55dd3270716377f95ba (diff) | |
download | bcm5719-llvm-4f2486353aa83c1472582fabfd33bf3b3d5a19a7.tar.gz bcm5719-llvm-4f2486353aa83c1472582fabfd33bf3b3d5a19a7.zip |
Make sure that the search for visible declarations looks into the semantic parents of out-of-line function contexts
llvm-svn: 92397
Diffstat (limited to 'clang/test/FixIt/typo.cpp')
-rw-r--r-- | clang/test/FixIt/typo.cpp | 10 |
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'?}} +} |