[clang] [clang-format] add "OVERRIDE" to Q_PROPERTY keywords (PR #190543)

via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 5 11:05:13 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang-format

Author: Eugene Shalygin (zeule)

<details>
<summary>Changes</summary>

In Qt sources the "OVERRIDE" specifier is allowed in addition to what Qt documentation for Q_PROPERTY says.

Fixes: 583256d165cb ("[clang-format] Add AllowBreakBeforeQtProperty option (#<!-- -->159909)")

---
Full diff: https://github.com/llvm/llvm-project/pull/190543.diff


1 Files Affected:

- (modified) clang/lib/Format/FormatToken.cpp (+4-4) 


``````````diff
diff --git a/clang/lib/Format/FormatToken.cpp b/clang/lib/Format/FormatToken.cpp
index 28fdbcbf0e47f..0ee68c119eceb 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, 15> QtPropertyKeywords = {
+    "BINDABLE", "CONSTANT",   "DESIGNABLE", "FINAL",    "MEMBER",
+    "NOTIFY",   "OVERRIDE",   "READ",       "REQUIRED", "RESET",
+    "REVISION", "SCRIPTABLE", "STORED",     "USER",     "WRITE",
 };
 
 bool FormatToken::isQtProperty() const {

``````````

</details>


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


More information about the cfe-commits mailing list