[clang] [clang-format][NFC] Replace Style.isCpp() with IsCpp (PR #83533)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 1 18:14:31 PST 2024


owenca wrote:

> The question is: why? And why handle c++ different than all other languages?

This is the preparation for fixing/extending `FormatToken::isSimpleTypeSpecifier()`, which I'll add a couple of parameters to, e.g. `isSimpleTypeSpecifier(bool IsCpp, const LangOptions &LangOpts)`. Also, this NFC patch would improve performance (even if unnoticeable) because `Style.isCpp()` is called repeatedly at so many places.

https://github.com/llvm/llvm-project/pull/83533


More information about the cfe-commits mailing list