]> granicus.if.org Git - clang/commit
Try to correct a mistyped "-" or ">" to "->" for some C++ cases.
authorKaelyn Uhrain <rikka@google.com>
Mon, 4 Nov 2013 18:59:34 +0000 (18:59 +0000)
committerKaelyn Uhrain <rikka@google.com>
Mon, 4 Nov 2013 18:59:34 +0000 (18:59 +0000)
commitb3e277222ac7e2148fc8ce2d5cf596231e1ee926
tree8dac6a9eb2a9dfd9f99d24a3bf24803ddca1d27c
parent71fdc127d21bb138b4bbc2b2ce1db460715271f1
Try to correct a mistyped "-" or ">" to "->" for some C++ cases.

Similar C code isn't caught as it seems to hit a different code path.
Also, as the check is only done for record pointers, cases involving
an overloaded operator-> are not handled either. Note that the reason
this check is done in the parser instead of Sema is not related to
having enough knowledge about the current state as it is about being
able to fix up the parser's state to be able to recover and traverse the
correct code paths.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194002 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticParseKinds.td
lib/Parse/ParseExpr.cpp
test/SemaCXX/member-expr.cpp