[PATCH] D105495: [clang] Make negative getLocWithOffset widening-safe.

2023-01-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri resigned from this revision. lebedev.ri added a comment. Herald added subscribers: steakhal, StephenFan. Herald added a reviewer: NoQ. Herald added a project: All. This review seems to be stuck/dead, consider abandoning if no longer relevant. Repository: rG LLVM Github Monorepo CHA

[PATCH] D105495: [clang] Make negative getLocWithOffset widening-safe.

2021-07-27 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added inline comments. Comment at: clang/lib/CodeGen/CoverageMappingGen.cpp:236 if (Loc.isMacroID()) - return Loc.getLocWithOffset(-SM.getFileOffset(Loc)); + return Loc.getLocWithOffset(0, SM.getFileOffset(Loc)); return SM.getLocForStartOfFile(SM.

[PATCH] D105495: [clang] Make negative getLocWithOffset widening-safe.

2021-07-27 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 361957. simon_tatham edited the summary of this revision. simon_tatham added a comment. In D105495#2882628 , @tmatheson wrote: > I also think it's the caller's responsibility to make sure what they pass in > is

[PATCH] D105495: [clang] Make negative getLocWithOffset widening-safe.

2021-07-16 Thread Tomas Matheson via Phabricator via cfe-commits
tmatheson added a comment. I'm not a huge fan of this as an API; it is not obvious what the function and parameters do without reading the comment or implementation (e.g. whether `Offset` is ignored if `NegOffset` is given, and what it means to pass offsets to both). It moves the subtraction lo

[PATCH] D105495: [clang] Make negative getLocWithOffset widening-safe.

2021-07-06 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added reviewers: rsmith, lebedev.ri, akyrtzi. Herald added subscribers: dexonsmith, martong. simon_tatham requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is part of a patch series workin