tmroeder added inline comments.

================
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:2366
+/// Matches C11 _Generic expression.
+extern const internal::VariadicDynCastAllOfMatcher<Stmt, GenericSelectionExpr>
+    genericSelectionExpr;
----------------
aaron.ballman wrote:
> Do we have a use case for adding this as an AST matcher? For instance, one of 
> the first things I'd want to do with such a matcher is traverse down to the 
> association list, but I don't think that's possible currently. Should we add 
> all of the AST functionality or just wait until there's a concrete use case 
> and add the AST matchers bits at that point?
I mostly did this because that's what I did in the previous case from Feb 2019: 
reviews.llvm.org/D58292, for ChooseExpr, and I was cribbing off my old code.

However, on further reflection, I remembered that this patch actually removes a 
case that was locally defining this matcher already: see the removed lines in 
clang/lib/Analysis/ExprMutationAnalyzer.cpp in this patch. So, I think that is 
enough of a case for adding this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92600

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

Reply via email to