Skip to content

refactor: address PTO IR codecheck findings - #1434

Open
TaoTao-real wants to merge 3 commits into
hw-native-sys:mainfrom
TaoTao-real:codex/fix-codecheck-main-20260831
Open

refactor: address PTO IR codecheck findings#1434
TaoTao-real wants to merge 3 commits into
hw-native-sys:mainfrom
TaoTao-real:codex/fix-codecheck-main-20260831

Conversation

@TaoTao-real

@TaoTao-real TaoTao-real commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Split lib/PTO/IR/PTO.cpp into 14 codecheck-sized include fragments while preserving one translation unit and declaration order.
  • Fix the severity-1 division guards and remove side-effecting assertions reported by the scanner.
  • Keep all includes before namespace aliases/usings.
  • Refactor parsePTOTypeAllowNoBang and TDivSOp::parse into focused helpers to reduce method size and cyclomatic complexity without dropping LLVM 19 pointer address-space syntax.

Baseline

Testing

  • git diff --check — passed
  • LLVM 19.1.7 ninja -C build PTOIR — passed
  • ninja -C build check-pto reaches an unrelated local tool build failure because the stock LLVM 19 checkout does not define Bisheng-specific llvm::CallingConv::SimtEntry; GitHub Actions remains the authoritative full gate.

Scanner status

The attached unresolved export was reviewed. The severity-1 findings are addressed. Structural findings are being removed through method-level helper extraction; an external CleanCode rescan is still required because the scanner is not part of this repository.

Review focus

  • Verify the single-translation-unit fragment order.
  • Verify parser helper extraction preserves accepted syntax and operand order.
  • Verify explicit division guards preserve dynamic/error behavior.

@TaoTao-real
TaoTao-real force-pushed the codex/fix-codecheck-main-20260831 branch from ebd043e to 916c8be Compare September 2, 2026 02:42
@TaoTao-real TaoTao-real changed the title refactor: split PTO IR implementation for codecheck refactor: address PTO IR codecheck findings Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant