https://github.com/vbvictor created 
https://github.com/llvm/llvm-project/pull/203780

None

>From 5af43bf8a5b28db6dbe5e9dd087635faa9b50028 Mon Sep 17 00:00:00 2001
From: Victor Baranov <[email protected]>
Date: Sun, 14 Jun 2026 21:40:19 +0300
Subject: [PATCH] [clang][ASTMatchers] format ASTMatchers dynamic

---
 .../clang/ASTMatchers/Dynamic/Diagnostics.h      | 16 ++++++++--------
 clang/include/clang/ASTMatchers/Dynamic/Parser.h |  3 +--
 .../clang/ASTMatchers/Dynamic/VariantValue.h     | 11 +++++------
 3 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/clang/include/clang/ASTMatchers/Dynamic/Diagnostics.h 
b/clang/include/clang/ASTMatchers/Dynamic/Diagnostics.h
index 960d59a747fc4..5bbb23afe0765 100644
--- a/clang/include/clang/ASTMatchers/Dynamic/Diagnostics.h
+++ b/clang/include/clang/ASTMatchers/Dynamic/Diagnostics.h
@@ -52,7 +52,7 @@ class Diagnostics {
   /// Parser context types.
   enum ContextType {
     CT_MatcherArg = 0,
-    CT_MatcherConstruct = 1
+    CT_MatcherConstruct = 1,
   };
 
   /// All errors from the system.
@@ -125,11 +125,11 @@ class Diagnostics {
   /// as "candidate" overloads for the same matcher.
   struct OverloadContext {
   public:
-   OverloadContext(Diagnostics* Error);
-   ~OverloadContext();
+    OverloadContext(Diagnostics *Error);
+    ~OverloadContext();
 
-   /// Revert all errors that happened within this context.
-   void revertErrors();
+    /// Revert all errors that happened within this context.
+    void revertErrors();
 
   private:
     Diagnostics *const Error;
@@ -182,8 +182,8 @@ class Diagnostics {
   std::vector<ErrorContent> Errors;
 };
 
-}  // namespace dynamic
-}  // namespace ast_matchers
-}  // namespace clang
+} // namespace dynamic
+} // namespace ast_matchers
+} // namespace clang
 
 #endif // LLVM_CLANG_ASTMATCHERS_DYNAMIC_DIAGNOSTICS_H
diff --git a/clang/include/clang/ASTMatchers/Dynamic/Parser.h 
b/clang/include/clang/ASTMatchers/Dynamic/Parser.h
index 7adaef5054b5d..244f4b42ade37 100644
--- a/clang/include/clang/ASTMatchers/Dynamic/Parser.h
+++ b/clang/include/clang/ASTMatchers/Dynamic/Parser.h
@@ -244,8 +244,7 @@ class Parser {
   struct ScopedContextEntry;
   struct TokenInfo;
 
-  Parser(CodeTokenizer *Tokenizer, Sema *S,
-         const NamedValueMap *NamedValues,
+  Parser(CodeTokenizer *Tokenizer, Sema *S, const NamedValueMap *NamedValues,
          Diagnostics *Error);
 
   bool parseBindID(std::string &BindID);
diff --git a/clang/include/clang/ASTMatchers/Dynamic/VariantValue.h 
b/clang/include/clang/ASTMatchers/Dynamic/VariantValue.h
index c99d32f5f784a..aed1af3d88015 100644
--- a/clang/include/clang/ASTMatchers/Dynamic/VariantValue.h
+++ b/clang/include/clang/ASTMatchers/Dynamic/VariantValue.h
@@ -32,7 +32,7 @@ namespace dynamic {
 ///
 /// It supports all types that VariantValue can contain.
 class ArgKind {
- public:
+public:
   enum Kind {
     AK_Matcher,
     AK_Node,
@@ -181,13 +181,13 @@ class VariantMatcher {
   /// For the Polymorphic case, it returns true if one, and only one, of the
   /// overloads can be converted to \c Matcher<T>. If there are more than one
   /// that can, the result would be ambiguous and false is returned.
-  template <class T>
-  bool hasTypedMatcher() const {
+  template <class T> bool hasTypedMatcher() const {
     return hasTypedMatcher(ASTNodeKind::getFromNodeKind<T>());
   }
 
   bool hasTypedMatcher(ASTNodeKind NK) const {
-    if (!Value) return false;
+    if (!Value)
+      return false;
     return Value->getTypedMatcher(MatcherOps(NK)).has_value();
   }
 
@@ -229,7 +229,6 @@ class VariantMatcher {
   explicit VariantMatcher(std::shared_ptr<Payload> Value)
       : Value(std::move(Value)) {}
 
-
   class SinglePayload;
   class PolymorphicPayload;
   class VariadicOpPayload;
@@ -309,7 +308,7 @@ class VariantValue {
   ///
   /// \param Specificity value corresponding to the "specificity" of the
   ///   conversion.
-  bool isConvertibleTo(ArgKind Kind, unsigned* Specificity) const;
+  bool isConvertibleTo(ArgKind Kind, unsigned *Specificity) const;
 
   /// Determines if the contained value can be converted to any kind
   /// in \p Kinds.

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to