[all-commits] [llvm/llvm-project] 3ad6dd: [clang] Use decltype((E)) for compound requirement...

Matheus Izvekov via All-commits all-commits at lists.llvm.org
Tue Mar 30 13:00:54 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3ad6dd5d8f0a70756f665e8179ad7c5210022c11
      https://github.com/llvm/llvm-project/commit/3ad6dd5d8f0a70756f665e8179ad7c5210022c11
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2021-03-30 (Tue, 30 Mar 2021)

  Changed paths:
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Sema/SemaConcept.cpp
    M clang/lib/Sema/SemaExprCXX.cpp
    M clang/lib/Sema/SemaType.cpp
    M clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp

  Log Message:
  -----------
  [clang] Use decltype((E)) for compound requirement type constraint

See PR45088.

Compound requirement type constraints were using decltype(E) instead of
decltype((E)), as per `[expr.prim.req]p1.3.3`.

Since neither instantiation nor type dependence should matter for
the constraints, this uses an approach where a `decltype` type is not built,
and just the canonical type of the expression after template instantiation
is used on the requirement.

Signed-off-by: Matheus Izvekov <mizvekov at gmail.com>

Reviewed By: rsmith

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




More information about the All-commits mailing list