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

[ClangFormat] Long work on file with a lot of preprocessor directives #91717

Open
pointhex opened this issue May 10, 2024 · 4 comments
Open

[ClangFormat] Long work on file with a lot of preprocessor directives #91717

pointhex opened this issue May 10, 2024 · 4 comments

Comments

@pointhex
Copy link
Contributor

The file is part of the "TinyCC" (git://repo.or.cz/tinycc.git). clang-format-17 tcc.h takes longer than 10 seconds though the file has only 2000 lines and includes almost nothing (a few files from the C standard library).

@llvmbot
Copy link
Collaborator

llvmbot commented May 10, 2024

@llvm/issue-subscribers-clang-format

Author: None (pointhex)

The file is part of the "TinyCC" (git://repo.or.cz/tinycc.git). clang-format-17 tcc.h takes longer than 10 seconds though the file has only 2000 lines and includes almost nothing (a few files from the C standard library).

@pointhex
Copy link
Contributor Author

I found another file with even fewer lines around 1000 where clang-format spends even more time to format it. https://github.com/qt/qtbase/blob/dev/src/corelib/global/qcompilerdetection.h
It contains a lot of #ifdefs and #define's preprocessor directives.

@pointhex pointhex changed the title [ClangFormat] Long work on 2000 lines file [ClangFormat] Long work on file with a lot of preprocessor directives Jun 27, 2024
@EugeneZelenko
Copy link
Contributor

Could you please try 18 or main branch?

@pointhex
Copy link
Contributor Author

Same in main for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants