| Issue |
173530
|
| Summary |
[clang-tidy] incorrect testcases in `macro-to-enum`
|
| Labels |
clang-tidy
|
| Assignees |
|
| Reporter |
zeyi2
|
Related to: https://github.com/llvm/llvm-project/issues/172391 and [#133515](https://github.com/llvm/llvm-project/issues/133515)
When manually running `clang-tidy` over the test file, I found that the header files remain untouched, all of the warnings and changes are located in the .cpp file.
A reproduction script:
```bash
#!/bin/bash
CPP_FILE="clang-tools-extra/test/clang-tidy/checkers/modernize/macro-to-enum.cpp"
HEADER_FILE="clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/macro-to-enum/modernize-macro-to-enum.h"
INCLUDE_DIR="clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/macro-to-enum"
TIDY_BIN="./build/bin/clang-tidy"
git checkout "$CPP_FILE" "$HEADER_FILE"
cp "$HEADER_FILE" "${HEADER_FILE}.bak"
$TIDY_BIN \
"$CPP_FILE" \
-fix --checks='-*,modernize-macro-to-enum' -header-filter='.*' \
-- -I "$INCLUDE_DIR" -std=c++14 -fno-delayed-template-parsing
if diff -u "${HEADER_FILE}.bak" "$HEADER_FILE"; then
echo "no edit"
else
echo "diff"
fi
rm "${HEADER_FILE}.bak"
git checkout "$HEADER_FILE" "$CPP_FILE"
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs