]> granicus.if.org Git - clang/commit
Fix a QoI bug reported by a user.
authorMatt Beaumont-Gay <matthewbg@google.com>
Sat, 21 Apr 2012 01:12:48 +0000 (01:12 +0000)
committerMatt Beaumont-Gay <matthewbg@google.com>
Sat, 21 Apr 2012 01:12:48 +0000 (01:12 +0000)
commit7d90fe5a941efc106237d23badec816ed65e267f
treea3dfc7822b4d8816004fc1f0f4e995543a2af2fd
parent0b1c7156844f1e0e37766a64879b1d1d77fc5385
Fix a QoI bug reported by a user.

Set the source location for the "member reference base type ... is not a
structure or union" diag to point at the operator rather than the member name.
If we're giving this diagnostic because of a typo'd '.' in place of a ';' at
the end of a line, the caret previously pointed at the identifier on the
following line, which isn't as helpful as it could be. Pointing the caret at
the '.' makes it more obvious what the problem is.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155267 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaExprMember.cpp
test/SemaCXX/member-expr.cpp