-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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-format - incorrect formating of macros #170
Labels
Comments
This issue seems to describe invalid-code-generation when it comes to macros. This was fixed by ca0d970 as part of clang-format 15 The output with a modern version is the following: #define FUNC_BEGIN(name, ret) \
struct Class_##name \
{ \
static ret run(void* ctx) \
{ \
return ((Class_##name*)ctx)->operator()(); \
} \
inline ret operator()() \
{
#define FUNC_END(name) \
} \
\
Class_##name() \
{} \
} \
; \
Class_##name name; Which doesn't match the expected output, but it at least doesn't break compilation. I don't think clang-format can do much better when it comes to incomplete code fragments, but the invalid-code-generation is fixed |
moodyhunter
pushed a commit
to moodyhunter/llvm-project
that referenced
this issue
Mar 26, 2024
Update to LLVM 18.1.1 (+ additional commits)
mjklemm
pushed a commit
to mjklemm/llvm-project
that referenced
this issue
Sep 30, 2024
* [flang][driver] Increase default -fopenmp-version to 52 - Currently set to 11 * Fix lit tests & update version in Frontend/CompilerInvocation.cpp * Fix one more test flang/test/Driver/flang-openmp-version-macro.f90
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
clang-format version 11.0.0 (https://github.com/llvm/llvm-project.git 7420f96)
test.cpp
test_actual.cpp
test_expected.cpp
The text was updated successfully, but these errors were encountered: