[all-commits] [llvm/llvm-project] 3dbcea: Reland [clang] Check unsupported types in expressions

Andrew Savonichev via All-commits all-commits at lists.llvm.org
Fri Oct 15 03:56:08 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3dbcea8b957a5f0094f1d5a73b7a8ebebeedebb6
      https://github.com/llvm/llvm-project/commit/3dbcea8b957a5f0094f1d5a73b7a8ebebeedebb6
  Author: Andrew Savonichev <andrew.savonichev at gmail.com>
  Date:   2021-10-15 (Fri, 15 Oct 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:
  -----------
  Reland [clang] Check unsupported types in expressions

This was committed as ec6c847179fd, but then reverted after a failure
in: https://lab.llvm.org/buildbot/#/builders/84/builds/13983

I was not able to reproduce the problem, but I added an extra check
for a NULL QualType just in case.

Original comit message:

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