]> granicus.if.org Git - clang/commit
Improve diagnostics for invalid use of non-static members / this:
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 5 Apr 2012 01:13:04 +0000 (01:13 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 5 Apr 2012 01:13:04 +0000 (01:13 +0000)
commita85cf39786fffd6860a940523be01eb02a4935c0
tree49e6b78abb519f6ddf1db6d7a31f3fbd66ea43c7
parent4fd05dc4062580acea72f8b8231fb0ea3ee49032
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
13 files changed:
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaExprMember.cpp
test/CXX/class/class.nest/p1.cpp
test/CXX/expr/expr.prim/expr.prim.general/p12-0x.cpp
test/CXX/expr/expr.prim/expr.prim.general/p4-0x.cpp
test/CXX/expr/expr.prim/expr.prim.lambda/p12.cpp
test/CXX/special/class.free/p1.cpp
test/CXX/special/class.free/p6.cpp
test/Parser/cxx-typeof.cpp
test/SemaCXX/class.cpp
test/SemaCXX/default2.cpp
test/SemaCXX/qual-id-test.cpp
test/SemaCXX/this.cpp