As noted in https://www.viva64.com/en/b/0629/ (Snippet No. 36) and the scan-build CI reports (https://llvm.org/reports/scan-build/report-SIModeRegister.cpp-Status-1-1.html#EndPath), rL348754 introduced a typo due to ambiguity in the Status constructor due to argument variable names shadowing the member variable names.
Details
Details
- Reviewers
timcorringham arsenm - Commits
- rZORG742d48b4cf4b: [SIMode] Fix typo in Status constructor
rZORGd226daed184a: [SIMode] Fix typo in Status constructor
rG742d48b4cf4b: [SIMode] Fix typo in Status constructor
rGd226daed184a: [SIMode] Fix typo in Status constructor
rGbe9ade93d164: [SIMode] Fix typo in Status constructor
rL360236: [SIMode] Fix typo in Status constructor
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/AMDGPU/SIModeRegister.cpp | ||
---|---|---|
47 ↗ | (On Diff #198267) | Should use something other than a leading underscore to disambiguate |
lib/Target/AMDGPU/SIModeRegister.cpp | ||
---|---|---|
47 ↗ | (On Diff #198267) | No problem, its up to you - an alternative would be to write: this->Mode &= this->Mask. |
lib/Target/AMDGPU/SIModeRegister.cpp | ||
---|---|---|
47 ↗ | (On Diff #198267) | Trailing underscore is also OK, I just don't want to be violating the reserved names rule |
Comment Actions
Sorry not to have noticed this sooner - I was just about to make a fix myself. I chose to change the constructor to
Status(unsigned NewMask, unsigned NewMode) : Mask(NewMask), Mode(NewMode & NewMask) {};
but your change is fine.