HomePhabricator

[C++20] Add consteval-specific semantic for functions

Authored by Tyker on Feb 4 2020, 10:23 AM.

Description

[C++20] Add consteval-specific semantic for functions

Summary:
Changes:

  • Calls to consteval function are now evaluated in constant context but IR is still generated for them.
  • Add diagnostic for taking address of a consteval function in non-constexpr context.
  • Add diagnostic for address of consteval function accessible at runtime.
  • Add tests

Reviewers: rsmith, aaron.ballman

Reviewed By: rsmith

Subscribers: mgrang, riccibruno, cfe-commits

Tags: #clang

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

Details

Committed
TykerFeb 4 2020, 11:38 AM
Reviewer
rsmith
Differential Revision
D63960: [C++20] Add consteval-specific semantic for functions
Parents
rG64a8e1b83e14: libclc/asin: Switch to amd builtins version of asin
Branches
Unknown
Tags
Unknown