[PATCH] D17762: Fix an assertion failure in setPointOfInstantiation.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 23 10:32:15 PDT 2016

rsmith added a comment.

It seems to me that the bug is that we're producing an invalid source location, not how we handle that downstream. Typo correction should be able to preserve the source location of whatever expression it was correcting.

Comment at: lib/Sema/SemaExpr.cpp:14047-14048
@@ -14046,1 +14046,4 @@
+  if (Loc.isInvalid())
+    return true;
General rule: for a function that returns `true` to say "an error occurred", it is not acceptable to return `true` without either (a) producing an error or (b) observing some state that proves someone else emitted an error (such as a decl that has been set as invalid).


More information about the cfe-commits mailing list