<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/78751>78751</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
llvm-cov Not recognizing and expanding all macros
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
matthewh628
</td>
</tr>
</table>
<pre>
llvm-cov doesn't expand or count some macros as being run. I'm unsure as to where the issue is coming from.
```C
#include <stdint.h>
#include <stdio.h>
#define my_printf(str, val) printf(str"\n", val);
#define CONFIG_UINT_FULL(foo, initval, desc) uint32_t foo = initval;
#define CONFIG_UINT(foo, initval) CONFIG_UINT_FULL(foo, initval, "")
static CONFIG_UINT(foo, 200);
int main ()
{
my_printf("Value of foo is %d", foo);
return(0);
}
```
This is a representative portion of code for our project. I'd expect both the use of `my_printf` and the use of `CONFIG_UINT()` to be expanded, but only `my_printf` is. Here's the coverage generated.
![Screenshot from 2024-01-19 11-59-35](https://github.com/llvm/llvm-project/assets/141457970/422a2857-cbad-4161-bb72-eb95f295d446)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVEFv6zYM_jXyhXAg05ZtHXJ4TZatwEN32Hu7FrJFxxpsKZDkdN2vH-RkbbLXAR1gSJBJfeRHkZ8KwRwt0ZaJByb2mVri6Px2VjGO9DLW2Gad06_baTrPee_OoB0Fy7CJQH-elNXgPPRusRGCmwlm1XsXQAXoyNgj-MVu4JFhM8Niw-IpmaKDl5E8QRwJTAhLWqF3c7oxeDdvGN8z_uW61vzy7a5nLI3tp0UTsHIXojY2bkZW_vRfZndr_cdH02Aswfz6fPLGxoFhG6JnuIOzmhhKuP-NTOxs2t4cWPnwMeTu16fD48_P3x-fvj0fvn_9yrAdnEsXjTVxvbwDTaFPURZjY4nPEQbngJX7N59PoH8ALD8XfSWCicRNjBBVNP3HAZDzHykbG2FWxgLD9h2refORt8VliL-raSFww8rVBGAo9LWka5hbfOkpLt4ybO8DN_t_NcVtQt9GExKwAk8nT4FsonQmODkfjbMpdu80weA8uMXDybs_qI-XDtWpo6mP0Lk4rq25hDVdVvN3JjWH1PX35vuapYRrnrq8o-uUkE4suyWCs9PrD4gmbOAX8sSwCSt0787k1ZHgSJa8iqTvRwILJh5-6z2RDaOL69AAcqxyXuSFhKLIhcxLwcSeYTvGeAqs_MLwwPBwNHFcuk3vZoaHNNfXLb9Wg-FBhUAxMDwUVVGJRjac4aFCVNiKJu87pfOqqIu86xrMqZNiQCl0VdVvbZDpballKVVG26Lhom6bsq6ycUvY1YLEwMty6Iqubno5aFloaqSUQovMbBMPXhSyaDlW1aalnndSVY0YsFViYBWnWZlpk5LeOH_MVgnZNm0jimxSHU1hlTNESy8XfVkHeJ_5i451yzGwik8mxPCOEk2c6F3onlwET707WvNX0qX06pfHXE_TdNW6bPHT9n9XeM0qVXjN-u8AAAD__0YxqWU">