d.zobnin.bugzilla added inline comments.

================
Comment at: lib/Parse/ParseStmt.cpp:1719-1724
@@ -1718,6 +1718,8 @@
   if (ForRange) {
+    ExprResult CorrectedRange =
+        Actions.CorrectDelayedTyposInExpr(ForRangeInit.RangeExpr.get());
     ForRangeStmt = Actions.ActOnCXXForRangeStmt(
         getCurScope(), ForLoc, CoawaitLoc, FirstPart.get(),
-        ForRangeInit.ColonLoc, ForRangeInit.RangeExpr.get(),
+        ForRangeInit.ColonLoc, CorrectedRange.get(),
         T.getCloseLocation(), Sema::BFRK_Build);
 
----------------
majnemer wrote:
> Does this change effect all of the test cases you've added? If not, I think 
> it would make sense to split this change out.
Yes, this change is needed in all added test cases.
Without this we will have an assertion failure in ~Sema():

```
assert(DelayedTypos.empty() && "Uncorrected typos!");
```


http://reviews.llvm.org/D16630



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to