DCL53-CPP
: Reports non syntactically ambiguous object declarations
#812
Labels
Difficulty-Medium
A false positive or false negative report which is expected to take 1-5 days effort to address
false positive/false negative
An issue related to observed false positives or false negatives.
Impact-Low
Affected rules
DCL53-CPP
Description
LocalConstructorInitializedObjectHidesIdentifier.ql
currently identifies variable declarations that call a constructor and hide an outer scope variable. However, this does not fully capture the cases covered by this vexing parsing situation, which is looking forS1(g1)
.The following additions to the query could help address this problem:
However this would still flag
S1 g3;
below - as we don't currently have a record of where the brackets were during parsing.Example
This modification of the test case highlights the problems:
The text was updated successfully, but these errors were encountered: