llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.6k stars 11.82k forks source link

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

Open pointhex opened 5 months ago

pointhex commented 5 months ago

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 commented 5 months ago

@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 commented 3 months ago

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.

EugeneZelenko commented 3 months ago

Could you please try 18 or main branch?

pointhex commented 3 months ago

Same in main for me.