build(clangd): add config for IDE include resolution#2164
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughA Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.clangd:
- Line 11: Update the .clangd configuration to use MSVC-compatible Clang driver
by replacing the "Compiler: cl" setting with "Compiler: clang-cl"; locate the
"Compiler: cl" entry in the file and change it to "Compiler: clang-cl" so clangd
invokes the clang-cl compatibility mode for MSVC project analysis.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
Actionable Suggestions
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/Feature.h (1)
229-245: Minor: fold duplicatedcallback(feature)branches.Both branches invoke
callback(feature); the GPU zone can be emitted conditionally in its own sub-scope without duplicating the call. Tracy transient zones end at scope exit, so this preserves semantics while reducing duplication.♻️ Suggested refactor
-#ifdef TRACY_ENABLE - { - const auto zoneName = std::format("{}::{}", feature->GetShortName(), methodName); - ZoneTransientN(___tracy_feature_zone, zoneName.c_str(), true); - if (emitGpuZone) { - TracyD3D11ZoneTransientS(s_tracyCtx, ___tracy_d3d11_feature_zone, zoneName.c_str(), 0, s_tracyCtx != nullptr); - callback(feature); - } else { - callback(feature); - } - } +#ifdef TRACY_ENABLE + { + const auto zoneName = std::format("{}::{}", feature->GetShortName(), methodName); + ZoneTransientN(___tracy_feature_zone, zoneName.c_str(), true); + if (emitGpuZone) { + TracyD3D11ZoneTransientS(s_tracyCtx, ___tracy_d3d11_feature_zone, zoneName.c_str(), 0, s_tracyCtx != nullptr); + } + callback(feature); + }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/Feature.h` around lines 229 - 245, The duplicated callback(feature) can be collapsed by creating the Tracy zone scope only when TRACY_ENABLE is defined and conditionally emitting the GPU zone inside that scope; specifically, replace the current dual-branch that calls callback(feature) twice with a single scope created when TRACY_ENABLE is defined (using ZoneTransientN with zoneName from feature->GetShortName() and methodName) and then inside that scope, if emitGpuZone call TracyD3D11ZoneTransientS(s_tracyCtx, ___tracy_d3d11_feature_zone, zoneName.c_str(), 0, s_tracyCtx != nullptr) before invoking callback(feature); when TRACY_ENABLE is not defined simply call callback(feature) once. This preserves semantics of scope-based Tracy zones and removes duplicate callback invocations.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/State.cpp`:
- Around line 693-694: The call to Feature::SetTracyCtx(tracyCtx) must be
compiled only when TRACY_ENABLE is defined because SetTracyCtx is declared
inside that macro; wrap the call (the tracyCtx assignment and the
Feature::SetTracyCtx invocation) in an `#ifdef` TRACY_ENABLE / `#endif` block
(matching the guard used in the destructor) so TracyD3D11Context tracyCtx and
the Feature::SetTracyCtx call are omitted when TRACY_ENABLE is not defined.
---
Nitpick comments:
In `@src/Feature.h`:
- Around line 229-245: The duplicated callback(feature) can be collapsed by
creating the Tracy zone scope only when TRACY_ENABLE is defined and
conditionally emitting the GPU zone inside that scope; specifically, replace the
current dual-branch that calls callback(feature) twice with a single scope
created when TRACY_ENABLE is defined (using ZoneTransientN with zoneName from
feature->GetShortName() and methodName) and then inside that scope, if
emitGpuZone call TracyD3D11ZoneTransientS(s_tracyCtx,
___tracy_d3d11_feature_zone, zoneName.c_str(), 0, s_tracyCtx != nullptr) before
invoking callback(feature); when TRACY_ENABLE is not defined simply call
callback(feature) once. This preserves semantics of scope-based Tracy zones and
removes duplicate callback invocations.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1d54cebc-5791-4efb-93af-89fc70c56704
📒 Files selected for processing (8)
.clangdsrc/Deferred.cppsrc/Feature.hsrc/Features/IBL.cppsrc/Features/ScreenSpaceShadows.cppsrc/Features/Skylighting.cppsrc/Features/TerrainBlending.cppsrc/State.cpp
💤 Files with no reviewable changes (1)
- src/Features/IBL.cpp
✅ Files skipped from review due to trivial changes (3)
- src/Features/ScreenSpaceShadows.cpp
- src/Features/Skylighting.cpp
- src/Features/TerrainBlending.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
- .clangd
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
49eb260 to
f2d2dbe
Compare
Summary
.clangdconfig to the repo root so clangd-based IDEs (VS Code, CLion, etc.) resolve includes without spurious warningsALLpreset build dir (build/ALL/vcpkg_installed/...), which also coversALL-WITH-AUTO-DEPLOYMENTsince it shares the samebinaryDirENABLE_SKYRIM_AE/SE/VR) so edition-gated code is properly analyzedTest plan
#ifdef TRACY_ENABLE) is correctly inactive in default analysis🤖 Generated with Claude Code
Summary by CodeRabbit