-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[clang-tidy] "unknown pragma ignored" generated on "pragma pack" in c++20 mode #67380
Comments
Can't get this error on CE https://godbolt.org/z/4vPYY6aY4, does it mean that this is not present in trunk? |
Got it with:
or
With trunk version is reproduced only when '--enable-module-headers-parsing' is used. |
Ok, thanks for info, added this to my ExtraArgs:
- -Wno-unknown-pragmas # TODO: remove this after switch to clang-tidy-18 |
Is this the fix? 992fa7b Any chance of a backport into the 17.x release branch? |
More this would be a workaround: b530eee |
This is a bug in LLVM 17 when compiling for C++20. Should be fixed in 18. See llvm/llvm-project#67380.
Source
test.cpp
Compiling with
clang++-17 -Wall -Werror -std=c++20 -o test.o -c test.cpp
works fine, no errors.I created
/tmp/test/compile_commands.json
using-MJ
clang option output:Running
clang-tidy-17 test.cpp
in /tmp/test folder produces following outputError is only produced in
c++20
and newer modes, likec++2b
, but not inc++17
or older.I am using latest 17 build from LLVM apt repo
The text was updated successfully, but these errors were encountered: