[clang] [clang][NFC] Factor out VLA checks in type traits (PR #88646)

via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 14 01:39:15 PDT 2024


================
@@ -5012,6 +5012,20 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType,
   return From;
 }
 
+/// Checks that type T is not a VLA.
+///
+/// @returns @c true if @p T is VLA and a diagnostic was emitted,
+/// @c false otherwise.
+static bool DiagnoseVLAInCXXTypeTrait(Sema &S, const TypeSourceInfo *T,
----------------
Sirraide wrote:

Ah, I see; the main reason I commented on this is because I thought it was a bit odd that none of the `EvaluateXYTypeTrait` functions have `CXX` in them, but this is one does (I know we don’t really have fixed ‘rules’ as to when to include `CXX` in the name, but it just wanted to suggest maybe being consistent about it at least). I don’t feel strongly about this either.

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


More information about the cfe-commits mailing list