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

Andrew Savonichev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 6 04:17:26 PDT 2021


asavonic created this revision.
asavonic added reviewers: erichkeane, Fznamznon.
asavonic requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: cfe-commits, sstefan1.
Herald added a project: clang.

The patch adds diagnostics for cases like:

  float F3 = ((__float128)F1 * (__float128)F2) / 2.0f;

Sema::checkDeviceDecl (renamed to checkTypeSupport) is changed to work
with a type without the corresponding ValueDecl. It is also refactored
so that host diagnostics for unsupported types can be added here as
well.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D109315

Files:
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/include/clang/Sema/Sema.h
  clang/lib/Sema/Sema.cpp
  clang/lib/Sema/SemaDecl.cpp
  clang/lib/Sema/SemaExpr.cpp
  clang/test/OpenMP/nvptx_unsupported_type_messages.cpp
  clang/test/SemaSYCL/float128.cpp
  clang/test/SemaSYCL/int128.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109315.370890.patch
Type: text/x-patch
Size: 22190 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210906/293d2256/attachment-0001.bin>


More information about the cfe-commits mailing list