aaron.ballman added inline comments.

================
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6763
+///   matches the expression 'new (Storage) MyClass()'.
+AST_MATCHER(CXXNewExpr, isPlacement) { return Node.getNumPlacementArgs() > 0; }
+
----------------
I think a better design would be something like `hasPlacementExpr()` as a 
traversal matcher. Then `isPlacement()` can be trivially done in the project as 
`hasPlacementExpr(anything())` (we could still consider adding it as a 
dedicated matcher, but it doesn't seem critical to me), but this would also 
allow people to check for specific placement new argument expressions.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73562



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

Reply via email to