this PR fixes #126424 for `ArraySubScriptExpr`, `hasBase` Matcher will get right operand when it is not integer type, but is not for sure that left operand is integer type. For the example code below `hasBase` will get `r` for the Subsequent matching and causing false positive. ``` template <typename R> int f(std::map<R*, int>& map, R* r) { return map[r]; } ``` so is needed to see if index is integer type to avoid this situation.
14 KiB
14 KiB