Open olvaffe opened 3 years ago
You can fix that with a do { /* ...what was in TRACE_EVENT before... */ } while (false)
statement.
That will fail
{
TRACE_EVENT(...);
function_that_is_slow_and_is_to_be_traced();
}
Oh you are right, there really is no way around it.
It seems
TRACE_EVENT
expands to 3 statements. That might not work withwithout braces.