[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 3 10:54:34 PST 2024
================
@@ -66,13 +72,17 @@ bool FormatToken::isSimpleTypeSpecifier() const {
case tok::kw_decltype:
case tok::kw__Atomic:
return true;
+ case tok::identifier:
+ return IsCpp && std::binary_search(CppNonKeywordTypes.begin(),
+ CppNonKeywordTypes.end(), TokenText);
----------------
zygoloid wrote:
Should this really be C++-only? All of the types in your list are standard library header types in C too, except for `byte` (which, as noted above, probably shouldn't be there).
https://github.com/llvm/llvm-project/pull/83709
More information about the cfe-commits
mailing list