If we find an error in the range expression in a range-based for loop, and the
loop variable has a type containing 'auto', set the declaration to be invalid
(because we couldn't deduce its type) to prevent follow-on errors.


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@188853 91177308-0d34-0410-b5e6-96231b3b80d8
Remove more uses of 'index' as namespace scope.

Follow up to r188850.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@188854 91177308-0d34-0410-b5e6-96231b3b80d8