Skip to content
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 crashes on macro definitions with keyword class #54348

Closed
owenca opened this issue Mar 12, 2022 · 1 comment
Closed

clang-format crashes on macro definitions with keyword class #54348

owenca opened this issue Mar 12, 2022 · 1 comment
Assignees
Labels
clang-format crash Prefer [crash-on-valid] or [crash-on-invalid]

Comments

@owenca
Copy link
Contributor

owenca commented Mar 12, 2022

clang-format crashes when formatting clang/test/CodeGenCXX/dllimport.cpp, which can be reduced to a single line:

~$ ls .clang-format
ls: .clang-format: No such file or directory
~$ ./clang-format -version
clang-format version 15.0.0 (https://github.com/llvm/llvm-project 9f616a467fc710f084b7e57812a2ed64c214c2c6)
~$ ./clang-format
#define A class& {}
Assertion failed: (!TheLine->First->isOneOf(tok::kw_class, tok::kw_enum, tok::kw_struct)), function tryFitMultipleLinesInOne, file UnwrappedLineFormatter.cpp, line 488.
...
@owenca owenca added clang-format crash Prefer [crash-on-valid] or [crash-on-invalid] labels Mar 12, 2022
@llvmbot
Copy link
Collaborator

llvmbot commented Mar 12, 2022

@llvm/issue-subscribers-clang-format

@mkurdej mkurdej self-assigned this Mar 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang-format crash Prefer [crash-on-valid] or [crash-on-invalid]
Projects
None yet
Development

No branches or pull requests

3 participants