[PATCH] D109315: [clang] Check unsupported types in expressions

Andrew Savonichev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 6 07:48:05 PDT 2021


asavonic added inline comments.


================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:10687
 def err_device_unsupported_type
-    : Error<"%0 requires %select{|%2 bit size}1 %3 type support, but device "
-            "'%4' does not support it">;
+    : Error<"%select{|%1 bit size}0 %2 type is not supported for target '%3'">;
 def err_omp_lambda_capture_in_declare_target_not_to : Error<
----------------
Fznamznon wrote:
> Maybe it is just me, but the old version was a bit more clear since it pointed to the wrong declaration. Now looking at the tests I see that clang ends up emitting several identical diagnostics at the same line, but they point to the different declarations/expressions used on this line. Should we still mention which concrete declaration/expression the diagnostic is about?
Agree, but I couldn't figure out good wording for the diagnostic that works well for both decl and expr cases.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109315



More information about the cfe-commits mailing list