]> granicus.if.org Git - clang/commit
Improve the error message for attempting to build a for range loop using a
authorRichard Trieu <rtrieu@google.com>
Fri, 11 Oct 2013 22:16:04 +0000 (22:16 +0000)
committerRichard Trieu <rtrieu@google.com>
Fri, 11 Oct 2013 22:16:04 +0000 (22:16 +0000)
commitf18e6e87c2fa41c2a891463483603d770a1e58a7
tree6cf88d1ff088f2b11994e57611249c96d2f5089e
parent627c7f9740dfe9c208543798eccbe5ca23e1ef42
Improve the error message for attempting to build a for range loop using a
function parameter that has array type.  Such a parameter will be treated as
a pointer type instead, resulting in a missing begin function error is a
suggestion to dereference the pointer.  This provides a different,
more informative diagnostic as well as point to the parameter declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192512 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaStmt.cpp
test/SemaCXX/for-range-examples.cpp