efriedma added inline comments.
================
Comment at: lib/Sema/SemaLambda.cpp:1447
+ getFrontendFunctionTimeCtx<const FunctionDecl *>()->startFrontendTimer(
+ {LSI.CallOperator, 0.0});
+ }
----------------
This seems sort of late? You're starting the timer after the body has already
been parsed.
================
Comment at: lib/Sema/TreeTransform.h:11011
+ getFrontendFunctionTimeCtx<const FunctionDecl *>()->startFrontendTimer(
+ {NewCallOperator, 0.0});
+ }
----------------
What happens if we never hit ActOnFinishFunctionBody()? TransformLambdaExpr
has an early return if the body doesn't typecheck.
More generally, given that we have early returns all over the place in Sema, I
would be more comfortable using the RAII helper, rather than explicitly calling
start/stop, even if that means you have to insert FrontendTimeRAII variables in
half a dozen different places in the parser. (Note I'm specifically talking
about the parser here; the explicit stopFrontendTimer in ~CodeGenFunction seems
fine.)
https://reviews.llvm.org/D47196
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits