[PATCH] D31513: [Sema] Add __is_aggregate type-trait and implement LWG 2015

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 3 17:05:24 PDT 2017


aaron.ballman added inline comments.


================
Comment at: docs/LanguageExtensions.rst:996
 * ``__is_abstract`` (GNU, Microsoft)
+* ``__is_aggregate`` (GNU, Microsoft)
 * ``__is_base_of`` (GNU, Microsoft)
----------------
Has Microsoft already implemented this? If not, do we want to wait for them before claiming they implement it as well?


================
Comment at: lib/Sema/SemaExprCXX.cpp:4234
+    // support aggregate initialization. GCC mirrors this behavior for vectors
+    // but not _Complex.
+    return T->isAggregateType() || T->isVectorType() || T->isExtVectorType() ||
----------------
Is there benefit to diverging from GCC's behavior here for _Complex types?


https://reviews.llvm.org/D31513





More information about the cfe-commits mailing list