Files
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

80 lines
3.2 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
applyTo: lldb/**/*
---
When reviewing code, focus on:
## Language, Libraries & Standards
- Target C++17 and avoid vendor-specific extensions.
- For Python scripts, follow PEP 8.
- Prefer standard library or LLVM support libraries instead of reinventing data structures.
## Comments & Documentation
- Each source file should include the standard LLVM file header.
- Header files must have proper header guards.
- Non-trivial classes and public methods should have Doxygen documentation.
- Use `//` or `///` comments normally; avoid block comments unless necessary.
- Non-trivial code should have comments explaining what it does and why. Avoid comments that explain how it does it at a micro level.
## Language & Compiler Issues
- Write portable code; wrap non-portable code in interfaces.
- Do not use RTTI or exceptions.
- Prefer C++-style casts over C-style casts.
- Do not use static constructors.
- Use `class` or `struct` consistently; `struct` only for all-public data.
- When then same class is declared or defined multiple times, make sure it's consistently done using either `class` or `struct`.
## Headers & Library Layering
- Include order: module header → local/private headers → project headers → system headers.
- Headers must compile standalone (include all dependencies).
- Maintain proper library layering; avoid circular dependencies.
- Include minimally; use forward declarations where possible.
- Keep internal headers private to modules.
- Use full namespace qualifiers for out-of-line definitions.
## Control Flow & Structure
- Prefer early exits over deep nesting.
- Do not use `else` after `return`, `continue`, `break`, or `goto`.
- Encapsulate loops that compute predicates into helper functions.
## Naming
- LLDB's code style differs from LLVM's coding style.
- Variables are `snake_case`.
- Functions and methods are `UpperCamelCase`.
- Static, global and member variables have `s_`, `g_` and `m_` prefixes respectively.
## General Guidelines
- Use `assert` liberally; prefer `llvm_unreachable` for unreachable states.
- Do not use `using namespace std;` in headers.
- Provide a virtual method anchor for classes defined in headers.
- Do not use default labels in fully covered switches over enumerations.
- Use range-based for loops wherever possible.
- Capture `end()` outside loops if not using range-based iteration.
- Including `<iostream>` is forbidded. Use LLVM’s `raw_ostream` instead.
- Don’t use `inline` when defining a function in a class definition.
## Microscopic Details
- Preserve existing style in modified code.
- Prefer pre-increment (`++i`) when value is unused.
- Use `private`, `protected`, or `public` keyword as appropriate to restrict class member visibility.
- Omit braces for single-statement `if`, `else`, `while`, `for` unless needed.
## Review Style
- Be specific and actionable in feedback.
- Explain the "why" behind recommendations.
- Link back to the LLVM Coding Standards: https://llvm.org/docs/CodingStandards.html.
- Ask clarifying questions when code intent is unclear.
Ignore formatting and assume that's handled by external tools like `clang-format` and `black`.
Remember that these standards are **guidelines**.
Always prioritize consistency with the style that is already being used by the surrounding code.