[PATCH] D102303: [ASTMatchers] Fix formatting around forFunction().

2021-05-13 Thread Artem Dergachev via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGdd98ea528c0c: [ASTMatchers] NFC: Fix formatting around 
forFunction(). (authored by dergachev.a).
Herald added a project: clang.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102303/new/

https://reviews.llvm.org/D102303

Files:
  clang/docs/LibASTMatchersReference.html
  clang/include/clang/ASTMatchers/ASTMatchers.h


Index: clang/include/clang/ASTMatchers/ASTMatchers.h
===
--- clang/include/clang/ASTMatchers/ASTMatchers.h
+++ clang/include/clang/ASTMatchers/ASTMatchers.h
@@ -7543,7 +7543,7 @@
   });
 }
 
-/// Matches declaration of the function the statement belongs to
+/// Matches declaration of the function the statement belongs to.
 ///
 /// Given:
 /// \code
@@ -7560,20 +7560,20 @@
   const auto  = Finder->getASTContext().getParents(Node);
 
   llvm::SmallVector Stack(Parents.begin(), Parents.end());
-  while(!Stack.empty()) {
+  while (!Stack.empty()) {
 const auto  = Stack.back();
 Stack.pop_back();
-if(const auto *FuncDeclNode = CurNode.get()) {
-  if(InnerMatcher.matches(*FuncDeclNode, Finder, Builder)) {
+if (const auto *FuncDeclNode = CurNode.get()) {
+  if (InnerMatcher.matches(*FuncDeclNode, Finder, Builder)) {
 return true;
   }
-} else if(const auto *LambdaExprNode = CurNode.get()) {
-  if(InnerMatcher.matches(*LambdaExprNode->getCallOperator(),
-  Finder, Builder)) {
+} else if (const auto *LambdaExprNode = CurNode.get()) {
+  if (InnerMatcher.matches(*LambdaExprNode->getCallOperator(), Finder,
+   Builder)) {
 return true;
   }
 } else {
-  for(const auto : Finder->getASTContext().getParents(CurNode))
+  for (const auto  : Finder->getASTContext().getParents(CurNode))
 Stack.push_back(Parent);
 }
   }
Index: clang/docs/LibASTMatchersReference.html
===
--- clang/docs/LibASTMatchersReference.html
+++ clang/docs/LibASTMatchersReference.html
@@ -8814,7 +8814,7 @@
 
 
 Matcherhttps://clang.llvm.org/doxygen/classclang_1_1Stmt.html;>StmtforFunctionMatcherhttps://clang.llvm.org/doxygen/classclang_1_1FunctionDecl.html;>FunctionDecl
 InnerMatcher
-Matches declaration of 
the function the statement belongs to
+Matches declaration of 
the function the statement belongs to.
 
 Given:
 F operator=(const F o) {


Index: clang/include/clang/ASTMatchers/ASTMatchers.h
===
--- clang/include/clang/ASTMatchers/ASTMatchers.h
+++ clang/include/clang/ASTMatchers/ASTMatchers.h
@@ -7543,7 +7543,7 @@
   });
 }
 
-/// Matches declaration of the function the statement belongs to
+/// Matches declaration of the function the statement belongs to.
 ///
 /// Given:
 /// \code
@@ -7560,20 +7560,20 @@
   const auto  = Finder->getASTContext().getParents(Node);
 
   llvm::SmallVector Stack(Parents.begin(), Parents.end());
-  while(!Stack.empty()) {
+  while (!Stack.empty()) {
 const auto  = Stack.back();
 Stack.pop_back();
-if(const auto *FuncDeclNode = CurNode.get()) {
-  if(InnerMatcher.matches(*FuncDeclNode, Finder, Builder)) {
+if (const auto *FuncDeclNode = CurNode.get()) {
+  if (InnerMatcher.matches(*FuncDeclNode, Finder, Builder)) {
 return true;
   }
-} else if(const auto *LambdaExprNode = CurNode.get()) {
-  if(InnerMatcher.matches(*LambdaExprNode->getCallOperator(),
-  Finder, Builder)) {
+} else if (const auto *LambdaExprNode = CurNode.get()) {
+  if (InnerMatcher.matches(*LambdaExprNode->getCallOperator(), Finder,
+   Builder)) {
 return true;
   }
 } else {
-  for(const auto : Finder->getASTContext().getParents(CurNode))
+  for (const auto  : Finder->getASTContext().getParents(CurNode))
 Stack.push_back(Parent);
 }
   }
Index: clang/docs/LibASTMatchersReference.html
===
--- clang/docs/LibASTMatchersReference.html
+++ clang/docs/LibASTMatchersReference.html
@@ -8814,7 +8814,7 @@
 
 
 Matcherhttps://clang.llvm.org/doxygen/classclang_1_1Stmt.html;>StmtforFunctionMatcherhttps://clang.llvm.org/doxygen/classclang_1_1FunctionDecl.html;>FunctionDecl InnerMatcher
-Matches declaration of the function the statement belongs to
+Matches declaration of the function the statement belongs to.
 
 Given:
 F operator=(const F o) {
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D102303: [ASTMatchers] Fix formatting around forFunction().

2021-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision.
aaron.ballman added a comment.

LGTM, thanks for the cleanup!


Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102303/new/

https://reviews.llvm.org/D102303

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D102303: [ASTMatchers] Fix formatting around forFunction().

2021-05-12 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko accepted this revision.
vsavchenko added a comment.
This revision is now accepted and ready to land.

It always pleases me when more code becomes compliant to our style guides. 
Thanks!


Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102303/new/

https://reviews.llvm.org/D102303

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D102303: [ASTMatchers] Fix formatting around forFunction().

2021-05-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision.
NoQ added reviewers: alexfh, gribozavr2, aaron.ballman, xazax.hun, vsavchenko.
Herald added subscribers: martong, rnkovacs.
NoQ requested review of this revision.

Isolated from D102213 . No functional change 
intended.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D102303

Files:
  clang/docs/LibASTMatchersReference.html
  clang/include/clang/ASTMatchers/ASTMatchers.h


Index: clang/include/clang/ASTMatchers/ASTMatchers.h
===
--- clang/include/clang/ASTMatchers/ASTMatchers.h
+++ clang/include/clang/ASTMatchers/ASTMatchers.h
@@ -7543,7 +7543,7 @@
   });
 }
 
-/// Matches declaration of the function the statement belongs to
+/// Matches declaration of the function the statement belongs to.
 ///
 /// Given:
 /// \code
@@ -7560,20 +7560,20 @@
   const auto  = Finder->getASTContext().getParents(Node);
 
   llvm::SmallVector Stack(Parents.begin(), Parents.end());
-  while(!Stack.empty()) {
+  while (!Stack.empty()) {
 const auto  = Stack.back();
 Stack.pop_back();
-if(const auto *FuncDeclNode = CurNode.get()) {
-  if(InnerMatcher.matches(*FuncDeclNode, Finder, Builder)) {
+if (const auto *FuncDeclNode = CurNode.get()) {
+  if (InnerMatcher.matches(*FuncDeclNode, Finder, Builder)) {
 return true;
   }
-} else if(const auto *LambdaExprNode = CurNode.get()) {
-  if(InnerMatcher.matches(*LambdaExprNode->getCallOperator(),
-  Finder, Builder)) {
+} else if (const auto *LambdaExprNode = CurNode.get()) {
+  if (InnerMatcher.matches(*LambdaExprNode->getCallOperator(), Finder,
+   Builder)) {
 return true;
   }
 } else {
-  for(const auto : Finder->getASTContext().getParents(CurNode))
+  for (const auto  : Finder->getASTContext().getParents(CurNode))
 Stack.push_back(Parent);
 }
   }
Index: clang/docs/LibASTMatchersReference.html
===
--- clang/docs/LibASTMatchersReference.html
+++ clang/docs/LibASTMatchersReference.html
@@ -8814,7 +8814,7 @@
 
 
 Matcherhttps://clang.llvm.org/doxygen/classclang_1_1Stmt.html;>StmtforFunctionMatcherhttps://clang.llvm.org/doxygen/classclang_1_1FunctionDecl.html;>FunctionDecl
 InnerMatcher
-Matches declaration of 
the function the statement belongs to
+Matches declaration of 
the function the statement belongs to.
 
 Given:
 F operator=(const F o) {


Index: clang/include/clang/ASTMatchers/ASTMatchers.h
===
--- clang/include/clang/ASTMatchers/ASTMatchers.h
+++ clang/include/clang/ASTMatchers/ASTMatchers.h
@@ -7543,7 +7543,7 @@
   });
 }
 
-/// Matches declaration of the function the statement belongs to
+/// Matches declaration of the function the statement belongs to.
 ///
 /// Given:
 /// \code
@@ -7560,20 +7560,20 @@
   const auto  = Finder->getASTContext().getParents(Node);
 
   llvm::SmallVector Stack(Parents.begin(), Parents.end());
-  while(!Stack.empty()) {
+  while (!Stack.empty()) {
 const auto  = Stack.back();
 Stack.pop_back();
-if(const auto *FuncDeclNode = CurNode.get()) {
-  if(InnerMatcher.matches(*FuncDeclNode, Finder, Builder)) {
+if (const auto *FuncDeclNode = CurNode.get()) {
+  if (InnerMatcher.matches(*FuncDeclNode, Finder, Builder)) {
 return true;
   }
-} else if(const auto *LambdaExprNode = CurNode.get()) {
-  if(InnerMatcher.matches(*LambdaExprNode->getCallOperator(),
-  Finder, Builder)) {
+} else if (const auto *LambdaExprNode = CurNode.get()) {
+  if (InnerMatcher.matches(*LambdaExprNode->getCallOperator(), Finder,
+   Builder)) {
 return true;
   }
 } else {
-  for(const auto : Finder->getASTContext().getParents(CurNode))
+  for (const auto  : Finder->getASTContext().getParents(CurNode))
 Stack.push_back(Parent);
 }
   }
Index: clang/docs/LibASTMatchersReference.html
===
--- clang/docs/LibASTMatchersReference.html
+++ clang/docs/LibASTMatchersReference.html
@@ -8814,7 +8814,7 @@
 
 
 Matcherhttps://clang.llvm.org/doxygen/classclang_1_1Stmt.html;>StmtforFunctionMatcherhttps://clang.llvm.org/doxygen/classclang_1_1FunctionDecl.html;>FunctionDecl InnerMatcher
-Matches declaration of the function the statement belongs to
+Matches declaration of the function the statement belongs to.
 
 Given:
 F operator=(const F o) {
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits