salman-javed-nz added a comment.

The problem at the root of all this is that llvm-header-guard isn't written 
flexible enough to support non-LLVM project structures.

See 
https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/clang-tidy/llvm/HeaderGuardCheck.cpp#L44

For a path like `C:\llvm-project\path\to\file`, the `llvm-project` portion is 
replaced with `llvm` to give `C:\llvm\path\to\file`, then a `substr()` call 
strips everything up to and including `lvm`, resulting in `path\to\file`.
The path separators and replaced with underscores, resulting in `PATH_TO_FILE`.

The whole check falls apart if it can't find strings like "llvm-project" in the 
path.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115715/new/

https://reviews.llvm.org/D115715

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to