Page MenuHomePhabricator

Fix variables used only in asserts.

Authored by saugustine on Jun 9 2020, 5:12 PM.



Fix variables used only in asserts.

For post-commit review.

Diff Detail

Event Timeline

saugustine created this revision.Jun 9 2020, 5:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2020, 5:12 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
saugustine edited the summary of this revision. (Show Details)Jun 9 2020, 5:13 PM
saugustine added a reviewer: baloghadamsoftware.
This revision was not accepted when it landed; it landed in state Needs Review.Jun 9 2020, 5:43 PM
This revision was automatically updated to reflect the committed changes.
dblaikie added a subscriber: dblaikie.EditedJun 15 2020, 10:13 AM

Thanks for the fix! Totally within the realm of post-commit review so far as I can see. The paired assertions could maybe be rewritten as: "assert(MRMgr.getVarRegion(P, SFC) ->getKind()== (SFC->inTopFrame() ? NonParamVarRegionKind : ParamVarRegionKind));" though it's not necessarily better (bit verbose, but avoids the textual duplication of the getVarRegion calls). Oh, and that first assert could potentially be an "assert(llvm::all_of... " to avoid D2 being an unused variable in non-asserts builds).

There's no need to send things for review that don't need pre-commit review. Post-commit review can be done in replies to the commit email on llvm-commits. (sending things like this can muddy the waters about post/pre-commit review - especially around code sent for pre-commit review but is then committed without that review concluding)