If not possible, use the last line of the declaration, as before.
Details
- Reviewers
dcoughlin NoQ rnkovacs - Commits
- rG33e5a1589645: [analyzer] Associate diagnostics created in checkEndFunction with a return…
rC342768: [analyzer] Associate diagnostics created in checkEndFunction with a return…
rL342768: [analyzer] Associate diagnostics created in checkEndFunction with a return…
Diff Detail
- Repository
- rC Clang
Event Timeline
clang/include/clang/Analysis/ProgramPoint.h | ||
---|---|---|
343–345 ↗ | (On Diff #166370) | I suspect we can always retrieve it as LC->getCFG()->getExit(), no need to store it separately. |
clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp | ||
832–834 ↗ | (On Diff #166370) | This looks correct, but my completely irrational intuition suggests that createBegin() might be more appropriate. I.e., we're not computing something at the ; that follows the return-statement, but instead we are already below the return statement. |
clang/include/clang/Analysis/ProgramPoint.h | ||
---|---|---|
343–345 ↗ | (On Diff #166370) | I think it's better to be consistent with the surrounding code here, |
clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp | ||
832–834 ↗ | (On Diff #166370) | Does it matter though? What is the difference? |
clang/include/clang/Analysis/ProgramPoint.h | ||
---|---|---|
343–345 ↗ | (On Diff #166370) | I don't think it this program point has anything in common with BlockEntrancePoint, apart from the historical misuse of the latter. |
clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp | ||
832–834 ↗ | (On Diff #166370) | It'll affect the column on which the report would be thrown, assuming code is written normally and the return value is short enough (otherwise it may also affect line). |