]> granicus.if.org Git - clang/commit
If we find an error in the range expression in a range-based for loop, and the
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 21 Aug 2013 01:40:36 +0000 (01:40 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 21 Aug 2013 01:40:36 +0000 (01:40 +0000)
commit37aa0f7ca567128fb00f88ceb4a7c229833f257e
tree17c4d6aad623efe3d7f21e71b10b7b8c92ebdb24
parente8458342d936c55b69806ea58d4a28bcb7c53d1a
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: https://llvm.org/svn/llvm-project/cfe/trunk@188853 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaStmt.cpp
test/SemaCXX/cxx11-crashes.cpp
test/SemaCXX/for-range-examples.cpp