I'm trying to use clang-tidy on my code base and I'm getting a lot of false positives from the following pattern
int *a;
if(config(some_value))
a = value;
...
if(config(some_value))
*a = other_value; // <-- deference of garbage value
the config function has it's value setup from a file on startup and isn't altered after. So All calls to config(some_value) return the same value.
Is there some way to mark the declaration of config() to clang that this is the case?