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
Event Timeline
clang/include/clang/Analysis/ProgramPoint.h | ||
---|---|---|
343–345 | 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 | 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 | 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 | 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). |
I suspect we can always retrieve it as LC->getCFG()->getExit(), no need to store it separately.