aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/TreeTransform.h
diff options
context:
space:
mode:
authorSam Panzer <espanz@gmail.com>2012-08-21 00:52:01 +0000
committerSam Panzer <espanz@gmail.com>2012-08-21 00:52:01 +0000
commite1715b66a878bcab315513351e5df68bfc010d2e (patch)
treebd09db1864a394c68f16dfa348c04f7399d0b562 /lib/Sema/TreeTransform.h
parenta34d4f47321324187ed57948628f5938357ae034 (diff)
Better diagnostics for range-based for loops with bad range types.
The old error message stating that 'begin' was an undeclared identifier is replaced with a new message explaining that the error is in the range expression, along with which of the begin() and end() functions was problematic if relevant. Additionally, if the range was a pointer type or defines operator*, attempt to dereference the range, and offer a FixIt if the modified range works. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162248 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/TreeTransform.h')
-rw-r--r--lib/Sema/TreeTransform.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h
index 05a3c611e9..391c0b3f3b 100644
--- a/lib/Sema/TreeTransform.h
+++ b/lib/Sema/TreeTransform.h
@@ -1338,7 +1338,7 @@ public:
Stmt *LoopVar,
SourceLocation RParenLoc) {
return getSema().BuildCXXForRangeStmt(ForLoc, ColonLoc, Range, BeginEnd,
- Cond, Inc, LoopVar, RParenLoc);
+ Cond, Inc, LoopVar, RParenLoc, false);
}
/// \brief Build a new C++0x range-based for statement.