You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to avoid inserting curly braces everywhere, I could instrument like so:
if (C)
STMT;
if (C&& (Marker1(), 1) || (Marker2(), 0) )
STMT();
or
if ( C ? (Marker1(), 1) : (Marker2(), 0))
STMT();
loops can be handled similarly, except for range-based for loops and do while loops which must be instrumented via their bodies. It also doesn't work for if statement with a complex initializer (if (auto* X = expr())), for simple cases it would work: if (auto* X = ptr ? (Marker1(), ptr): (Marker2(), ptr)
.
The downside is that Marker() must be an expression, but I could implement is an always_inline function:
DCEMarkers
to avoid inserting curly braces everywhere, I could instrument like so:
or
loops can be handled similarly, except for range-based for loops and do while loops which must be instrumented via their bodies. It also doesn't work for if statement with a complex initializer (
if (auto* X = expr())
), for simple cases it would work:if (auto* X = ptr ? (Marker1(), ptr): (Marker2(), ptr)
.
The downside is that
Marker()
must be an expression, but I could implement is analways_inline
function:VRMarkers
VRMarkers can be baked into expressions, e.g.:
The text was updated successfully, but these errors were encountered: