It meant to fix #60541
LocInfo is 0 based, but column number is 1 based. So in the corner case,
LocInfo.second + 1 == SM.getExpansionColumnNumber(Loc)
Differential D143867
[analyzer] Fix SARIF column location assertion crash Scarlet1ssimo on Feb 12 2023, 3:03 PM. Authored by
Details
Diff Detail
Event TimelineComment Actions I do have prepared a test case like: int testA(void) { return 0/0; } // RUN: %clang_analyze_cc1 -analyzer-checker=core %s -analyzer-output=sarif -o - Notice you must put the buggy code at the very first line to trigger the assertion. Do you think it's necessary to put this test case into the test suite? Comment Actions The test passes on main. Are you sure about the reproducer?
Generally, we only merge changes with tests, but I'm not the one who sets the rules. Comment Actions
This happens on versions from release/10.x to release/15.x. Since 16.x, this file gets refactored and no such problem ever. Comment Actions We don't plan to backport a change like this to previous versions. |