[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 3 11:26:26 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);
----------------
owenca wrote:
There’s no C per se in clang-format. `IsCpp` by clang-format convention means C/C++/Objective-C/
Objective-C++.
https://github.com/llvm/llvm-project/pull/83709
More information about the cfe-commits
mailing list