[clang] Add isTrivial() and isTriviallyCopyable() AST matchers (PR #90634)

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 30 09:02:52 PDT 2024


================
@@ -5444,6 +5444,43 @@ AST_MATCHER(FunctionDecl, isDefaulted) {
   return Node.isDefaulted();
 }
 
+/// Matches trivial methods and types.
----------------
ilya-biryukov wrote:

I do not think is actually matches `types`, but rather `classes` or `CXXRecordDecl`.
And the question is: should it?

I believe we could extend this matcher to also work on types and type locs.
Do you see any downsides to that? (same for the other matcher)

https://github.com/llvm/llvm-project/pull/90634


More information about the cfe-commits mailing list