79823595

Date: 2025-11-18 16:29:41
Score: 1
Natty:
Report link

Clangd treats .cu files as CUDA only, so host‑side C++ features like <format> and <chrono> aren’t recognized by default. The long‑term fix should be to tell clangd to use your GCC toolchain and enable modern C++ explicitly:

If:
  PathMatch: ".*\\.cu"

CompileFlags:
  Add:
    - -std=c++20
    - --gcc-toolchain=/usr

This way clangd parses host code with C++20 and finds the right headers automatically, without any silenced warnings and such. It’s future‑proof since clangd will follow your toolchain instead of hard‑coded paths.

(PS: All comments appreciated, I’m new around here)

Reasons:
  • Blacklisted phrase (1): appreciated
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Chip01