aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/cxx-typeof.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-04-05 01:13:04 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-04-05 01:13:04 +0000
commita85cf39786fffd6860a940523be01eb02a4935c0 (patch)
tree49e6b78abb519f6ddf1db6d7a31f3fbd66ea43c7 /test/Parser/cxx-typeof.cpp
parent4fd05dc4062580acea72f8b8231fb0ea3ee49032 (diff)
Improve diagnostics for invalid use of non-static members / this:
* s/nonstatic/non-static/ in the diagnostics, since the latter form outvoted the former by 28-2 in our diagnostics. * Fix the "use of member in static member function" diagnostic to correctly detect this situation inside a block or lambda. * Produce a more specific "invalid use of non-static member" diagnostic for the case where a nested class member refers to a member of a lexically-surrounding class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/cxx-typeof.cpp')
-rw-r--r--test/Parser/cxx-typeof.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/Parser/cxx-typeof.cpp b/test/Parser/cxx-typeof.cpp
index 4c598e9517..1ec6e29b13 100644
--- a/test/Parser/cxx-typeof.cpp
+++ b/test/Parser/cxx-typeof.cpp
@@ -9,5 +9,5 @@ static void test() {
// Part of rdar://problem/8347416; from the gcc test suite.
struct S {
int i;
- __typeof(S::i) foo(); // expected-error {{invalid use of nonstatic data member 'i'}}
+ __typeof(S::i) foo(); // expected-error {{invalid use of non-static data member 'i'}}
};