[llvm] [GitHub] Add Copilot review instructions for LLDB (PR #165783)
Kristof Beyls via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 30 16:10:37 PDT 2025
================
@@ -0,0 +1,76 @@
+---
+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.
+
+## 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.
+- Avoid static constructors or global objects with heavy initialization.
+- Use `class` or `struct` consistently; `struct` only for all-public data.
----------------
kbeyls wrote:
I found this sentence a bit too cryptic for me too understand what was meant. Maybe that makes it too cryptic for copilot too?
My attempt to rewrite it to make it less cryptic:
- For classes with only public members, use `struct` instead of `class`.
- When then same class is declared or defined multiple times, make sure it's consistently done using either `class` or `struct`.
https://github.com/llvm/llvm-project/pull/165783
More information about the llvm-commits
mailing list