sonar-cxx
sonar-cxx copied to clipboard
Handle unknown MAROs more tolerant
Handle unknown MACOSs more tolerant in case of string concatenation. In case not all headers are available this should be handled without syntax error.
In case below MACRO could be e.g. replaced by blank:
string Getter() const
{
return "aaa" MACRO "bbb";
}
Idea:
"aaa" MACRO "bbb"
is after preprocessing
"aaa" 0 "bbb"
Add a special case for string concatenation?
The string concatenation takes place in the preprocessor. However, not all type information is available here in order to be able to react correctly in the event of an error.
There are also cases like encoding prefixes which has to be taken into account: L"Δx = %" PRId16.
Not solvable in the preprocessor.