Conversation
|
Review updated until commit e53cfe5 Description
|
| Relevant files |
|---|
PR Reviewer Guide
Here are some key observations to aid the review process:
| 🧪 PR contains tests |
| ⚡ Recommended focus areas for review |
API Change Verification
Val::getDataType() now returns DataType directly instead of std::optional<DataType>. While the PR description states it "still throws if dtype_ is Null", ensure that all callers that previously relied on the optional behavior (e.g., checking .has_value() before accessing) are properly handled. The diff shows removal of .value(), valueOrError(), and * dereferences, which appears correct, but a comprehensive test run should verify no runtime issues. |
Greptile SummaryThis PR refactors Changes:
The refactor is consistent and thorough across all call sites. Build verified with Confidence Score: 5/5
Important Files Changed
Last reviewed commit: e53cfe5 |
|
!test |
|
!test |
|
!test |
1 similar comment
|
!test |
- Val::getDataType() now returns DataType; throws if dtype is Null - Remove Statement::getDataType() (was only returning nullopt for Exprs) - Update all call sites: drop .value(), valueOrError(), *, .has_value() - Remove redundant NVF_ERROR in fusion aliasOutputToInput Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
|
!test |
Additional Comments (1)
|
|
!test |
Summary
Val::getDataType()previously returnedstd::optional<DataType>and threw when dtype was Null, so the optional added no value and forced callers to use.value(),valueOrError(), or*.Changes
DataTypedirectly; still throws ifdtype_is Null.std::nulloptfor Exprs;getDataType()is only used on Vals)..value(),valueOrError(),*, and.has_value()where they were unwrappinggetDataType().NVF_ERRORinaliasOutputToInput(check was redundant after the API change).Build verified with
_bn.Made with Cursor