aaron.ballman added inline comments.

================
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:7563
+  llvm::SmallVector<DynTypedNode, 8> Stack(Parents.begin(), Parents.end());
+  while (!Stack.empty()) {
+    const auto &CurNode = Stack.back();
----------------
The formatting changes are good, but should be done in a separate NFC commit as 
they're unrelated.


================
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:7583-7585
+/// Matches declaration of the function, method, or block
+/// the statement belongs to. Similar to 'forFunction' but additionally covers
+/// Objective-C methods and blocks.
----------------
It looks like you can re-flow the comments a bit, and add lambdas to the 
description.


================
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:7597
+///   but does not match 'int y = 2'.
+AST_MATCHER_P(Stmt, forCallable, internal::Matcher<Decl>, InnerMatcher) {
+  const auto &Parents = Finder->getASTContext().getParents(Node);
----------------
You should also update Registry.cpp to expose this via the dynamic matchers.


Repository:
  rC Clang

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

https://reviews.llvm.org/D102213

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

Reply via email to