[PATCH] D25539: [Coverage] Support for C++17 switch initializers
Alex Lorenz via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 13 06:49:09 PDT 2016
arphaman added a comment.
> I'm unsure about whether or not the CodeGenPGO change in this patch deserves more testing.
It wouldn't harm to add a test for CodeGenPGO as well. A good test that you can as a starting point for the new one is `test/Profile/cxx-rangefor.cpp`. A single `PGOGEN` check for a PGO counter generated from a subexpression in a switch initializer should be sufficient.
================
Comment at: lib/CodeGen/CoverageMappingGen.cpp:818
+ Visit(S->getInit());
+
Visit(S->getCond());
----------------
I noticed that you added a newline here, wouldn't it be better to have it after `extendRegion(S)` so that the `Visit` calls are grouped together?
https://reviews.llvm.org/D25539
More information about the cfe-commits
mailing list