llvm-project/clang/test/CoverageMapping
Igor Kudrin 8545dae226 [Coverage] Prevent creating a redundant counter if a nested body ends with a macro.
If there were several nested statements arranged in a way that all of them
end up with the same macro, then the expansion of this macro was assigned
with all the corresponding counters of these statements.
As a result, the wrong counter value was shown for the macro in llvm-cov.

This patch fixes the issue by preventing adding a counter for an expanded
source range if it already has an assigned counter, which is expected
to come from the most specific statement.

Differential Revision: https://reviews.llvm.org/D23160

llvm-svn: 279962
2016-08-29 11:48:50 +00:00
..
Inputs Reapply [Coverage] Fix an assertion failure if the definition of an unused function spans multiple files. 2016-06-07 10:07:51 +00:00
abspath.cpp [Coverage] Attempt to appease a Windows builder 2016-07-22 00:25:09 +00:00
block-storage-starts-region.m [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
break.c [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
builtinmacro.c [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
casts.c [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
classtemplate.cpp [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
comment-in-macro.c [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
continue.c [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
control-flow-macro.c [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
decl.c [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
header.cpp [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
if.c [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
implicit-def-in-macro.m [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
include-macros.c [Lexer] Don't merge macro args from different macro files 2016-05-19 23:44:02 +00:00
includehell.cpp [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
ir.c Restrengthen tests relaxed in r259955 2016-02-17 00:58:13 +00:00
label.cpp [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
lambda.cpp [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
logical.cpp [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
loopmacro.c [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
loops.cpp [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
macro-expansion.c [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
macro-expressions.cpp [Coverage] Fix crash when handling certain macro expansions 2016-02-08 19:25:45 +00:00
macroception.c [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
macroparams.c [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
macroparams2.c [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
macros.c [Coverage] Prevent creating a redundant counter if a nested body ends with a macro. 2016-08-29 11:48:50 +00:00
macroscopes.cpp [Coverage] Fix an issue where a coverage region might not be created for a macro containing a loop statement. 2016-05-04 15:38:26 +00:00
md.cpp [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
moremacros.c [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
nestedclass.cpp [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
objc.m [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
preprocessor.c [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
return.c [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
switch.c [Coverage] Fix the start/end locations of switch statements 2016-03-04 08:07:15 +00:00
switchmacro.c [Coverage] Fix crash on a switch partially covered by a macro (PR27948) 2016-05-31 18:06:19 +00:00
system_macro.cpp [Coverage] Do not write out coverage mappings with zero entries 2016-07-26 00:24:59 +00:00
templates.cpp [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
test.c [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
trycatch.cpp [Coverage] Push a new region when handling CXXTryStmts 2016-06-22 19:57:58 +00:00
trymacro.cpp [Coverage] Push a new region when handling CXXTryStmts 2016-06-22 19:57:58 +00:00
unreachable-macro.c [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00
unused_function.cpp Reapply [Coverage] Fix an assertion failure if the definition of an unused function spans multiple files. 2016-06-07 10:07:51 +00:00
unused_names.c Restrengthen tests relaxed in r259955 2016-02-17 00:58:13 +00:00
while.c [PGO] cc1 option name change for profile instrumentation 2016-02-04 18:39:09 +00:00