[clang] [clang-format] Update QtPropertyKeywords to Qt 6.11 documentation (PR #190543)
Eugene Shalygin via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 8 00:49:45 PDT 2026
https://github.com/zeule updated https://github.com/llvm/llvm-project/pull/190543
>From 5a21d49f6c34c5a2e295493f1914d48513a8c613 Mon Sep 17 00:00:00 2001
From: Eugene Shalygin <eugene.shalygin at gmail.com>
Date: Sun, 5 Apr 2026 20:00:31 +0200
Subject: [PATCH] [clang-format] add "VIRTUAL" and "OVERRIDE" to Q_PROPERTY
keywords
In Qt sources "VIRTUAL" and "OVERRIDE" specifiers are allowed in addition to what Qt
documentation for Q_PROPERTY lists.
Fixes: 583256d165cb ("[clang-format] Add AllowBreakBeforeQtProperty option (#159909)")
---
clang/lib/Format/FormatToken.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/clang/lib/Format/FormatToken.cpp b/clang/lib/Format/FormatToken.cpp
index 28fdbcbf0e47f..35f9637fb4de4 100644
--- a/clang/lib/Format/FormatToken.cpp
+++ b/clang/lib/Format/FormatToken.cpp
@@ -33,10 +33,10 @@ const char *getTokenTypeName(TokenType Type) {
return nullptr;
}
-static constexpr std::array<StringRef, 14> QtPropertyKeywords = {
- "BINDABLE", "CONSTANT", "DESIGNABLE", "FINAL", "MEMBER",
- "NOTIFY", "READ", "REQUIRED", "RESET", "REVISION",
- "SCRIPTABLE", "STORED", "USER", "WRITE",
+static constexpr std::array<StringRef, 16> QtPropertyKeywords = {
+ "BINDABLE", "CONSTANT", "DESIGNABLE", "FINAL", "MEMBER", "NOTIFY",
+ "OVERRIDE", "READ", "REQUIRED", "RESET", "REVISION", "SCRIPTABLE",
+ "STORED", "USER", "VIRTUAL", "WRITE",
};
bool FormatToken::isQtProperty() const {
More information about the cfe-commits
mailing list