Commit Graph

2 Commits

Author SHA1 Message Date
Vedant Kumar 83db1d219e [Coverage] Specify the Itanium ABI triple for a C++ test
llvm-svn: 347804
2018-11-28 20:51:09 +00:00
Vedant Kumar 7225a26176 [Coverage] Do not visit artificial stmts in defaulted methods (PR39822)
There is no reason to emit coverage mappings for artificial statements
contained within defaulted methods, as these statements are not visible
to users.

Only emit a mapping for the body of the defaulted method (clang treats
the text of the "default" keyword as the body when reporting locations).
This allows users to see how often the default method is called, but
trims down the coverage mapping by skipping visitation of the children
of the method.

The immediate motivation for this change is that the lexer's
getPreciseTokenLocEnd API cannot return the correct location when given
an artificial statement (with a somewhat made-up location) as an input.

Test by Orivej Desh!

Fixes llvm.org/PR39822.

llvm-svn: 347803
2018-11-28 20:48:07 +00:00