[PATCH] D135175: [clang] adds `__is_bounded_array` and `__is_unbounded_array` as builtins

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 5 10:08:31 PDT 2022


shafik added a comment.

Looks good but let's have Aaron check it out.



================
Comment at: clang/lib/Sema/SemaExprCXX.cpp:24
 #include "clang/AST/RecursiveASTVisitor.h"
+#include "clang/AST/Type.h"
 #include "clang/AST/TypeLoc.h"
----------------
Why also `Type.h`?


================
Comment at: clang/lib/Sema/SemaType.cpp:2630
     // CUDA device code and some other targets don't support VLAs.
-    targetDiag(Loc, (getLangOpts().CUDA && getLangOpts().CUDAIsDevice)
-                        ? diag::err_cuda_vla
-                        : diag::err_vla_unsupported)
-        << ((getLangOpts().CUDA && getLangOpts().CUDAIsDevice)
-                ? CurrentCUDATarget()
-                : CFT_InvalidTarget);
+    bool IsCUDADevice = (getLangOpts().CUDA && getLangOpts().CUDAIsDevice);
+    targetDiag(Loc,
----------------
This feels like an unrelated change.

Is this diagnostic tested anywhere?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135175



More information about the cfe-commits mailing list