| Issue |
71732
|
| Summary |
clang-tidy: llvm-header-guard adds absolute path to header guard
|
| Labels |
clang-tidy
|
| Assignees |
|
| Reporter |
vadymchan
|
I encountered an issue with the `llvm-header-guard` check when running Clang-Tidy through the Visual Studio extension - Clang Power Tools. It refactors header guards using absolute paths:
```cpp
#ifndef C:_USERS_VADYM_SOURCE_REPOS_PET_PROJECT_MATH_LIBRARY_SRC_LIB_OPTIONS_OPTIONS_H
#define C:_USERS_VADYM_SOURCE_REPOS_PET_PROJECT_MATH_LIBRARY_SRC_LIB_OPTIONS_OPTIONS_H
```
This behavior isn't ideal. I'm looking for a guard style that reflects the project structure, such as:
```cpp
#ifndef MATH_LIBRARY_OPTIONS_H
#define MATH_LIBRARY_OPTIONS_H
```
, where MATH_LIBRARY_ is project name and OPTIONS_H is file name (it's in ideal case, but at least the header guard should be file name - OPTIONS_H). Is there a way to customize `llvm-header-guard` to generate project-based, rather than absolute path-based, guards?
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs