[all-commits] [llvm/llvm-project] ec6c84: [clang] Check unsupported types in expressions

Andrew Savonichev via All-commits all-commits at lists.llvm.org
Mon Sep 13 05:01:21 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ec6c847179fd019acae4d97a18f9e7d3961a6fdf
      https://github.com/llvm/llvm-project/commit/ec6c847179fd019acae4d97a18f9e7d3961a6fdf
  Author: Andrew Savonichev <andrew.savonichev at gmail.com>
  Date:   2021-09-13 (Mon, 13 Sep 2021)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Sema/Sema.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/CodeGen/ibm128-unsupported.c
    M clang/test/OpenMP/nvptx_unsupported_type_messages.cpp
    M clang/test/SemaSYCL/float128.cpp
    M clang/test/SemaSYCL/int128.cpp

  Log Message:
  -----------
  [clang] Check unsupported types in expressions

The patch adds missing 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.

Differential Revision: https://reviews.llvm.org/D109315




More information about the All-commits mailing list