Improve error recovery around colon.
authorSerge Pavlov <sepavloff@gmail.com>
Wed, 16 Jul 2014 05:16:52 +0000 (05:16 +0000)
committerSerge Pavlov <sepavloff@gmail.com>
Wed, 16 Jul 2014 05:16:52 +0000 (05:16 +0000)
commit458ea76041ba41d61869543939274ebe296ac85a
tree5b19ed6faa88e6037a159ded2985a608cf3da919
parentc68237bc2c7283f9cc62593b3dd8e30562014400
Improve error recovery around colon.

Recognize additional cases, when '::' is mistyped as ':'.
This is a fix to RP18587 - colons have too much protection in member-declarations
Review is tracked by http://reviews.llvm.org/D3653.

This is an attempt to recommit the fix, initially committed as r212957 but then
reverted in r212965 as it broke self-build. In the updated patch ParseDirectDeclarator
turns on colon protection in for context as well.

llvm-svn: 213120
clang/lib/Parse/ParseDecl.cpp
clang/lib/Parse/ParseDeclCXX.cpp
clang/test/SemaCXX/enum-bitfield.cpp
clang/test/SemaCXX/for-range-examples.cpp
clang/test/SemaCXX/nested-name-spec.cpp