[PATCH] D19725: [Coverage] Fix an issue where a coverage region might not be created for a macro containing for or while statements.

Vedant Kumar via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 29 11:18:54 PDT 2016


vsk added a comment.

Thanks, lgtm with a nit.


================
Comment at: lib/CodeGen/CoverageMappingGen.cpp:452
@@ +451,3 @@
+                        [=](const SourceMappingRegion &Region) {
+                          assert(Region.hasStartLoc() && "incomplete region");
+                          assert(Region.hasEndLoc() && "incomplete region");
----------------
These asserts replicate checks inside of get{Start,End}Loc, so I think it's cleaner to drop them.


http://reviews.llvm.org/D19725





More information about the cfe-commits mailing list