[clang] [NFC][Clang][AST] Adopt simplified `getTrailingObjects` in AST (PR #144432)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 19 09:15:53 PDT 2025


================
@@ -388,9 +387,7 @@ template <class T> class OMPDirectiveListClause : public OMPClause {
     assert(
         DK.size() == NumKinds &&
         "Number of directive kinds is not the same as the preallocated buffer");
-    std::copy(DK.begin(), DK.end(),
-              static_cast<T *>(this)
-                  ->template getTrailingObjects<OpenMPDirectiveKind>());
+    std::copy(DK.begin(), DK.end(), getDirectiveKinds().begin());
----------------
Sirraide wrote:

I mean, you already did this for some of the other functions but either way is fine.

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


More information about the cfe-commits mailing list