================
@@ -636,6 +622,16 @@ class Scope {
/// is an ancestor of the other.
bool Contains(const Scope& rhs) const { return Depth < rhs.Depth; }
+ /// Mark that we're entering the body of a loop (for, while, do).
+ void EnterLoopBody(LabelDecl *PrecedingLabel);
+
+ /// Mark that we're entering the body of a switch statement.
+ void EnterSwitchBody(LabelDecl *PrecedingLabel);
+
+ /// Mark that we're leaving the body of a loop; this is only needed for do
+ /// loops where the condition follows the loop body.
+ void LeaveLoopBody();
----------------
Sirraide wrote:
I mean, it does the opposite of `EnterLoopBody` so I think the name is fine ;Þ
https://github.com/llvm/llvm-project/pull/198436
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits