[all-commits] [llvm/llvm-project] c5e1b5: [Clang][Sema] Do not evaluate value-dependent imme...

Evgeny Shulgin via All-commits all-commits at lists.llvm.org
Fri Feb 25 08:23:53 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c5e1b5e6a99f1ab78dafb54262d8f1fff998cb26
      https://github.com/llvm/llvm-project/commit/c5e1b5e6a99f1ab78dafb54262d8f1fff998cb26
  Author: Evgeny Shulgin <izaronplatz at gmail.com>
  Date:   2022-02-25 (Fri, 25 Feb 2022)

  Changed paths:
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/SemaCXX/cxx2a-consteval.cpp

  Log Message:
  -----------
  [Clang][Sema] Do not evaluate value-dependent immediate invocations

Value-dependent ConstantExprs are not meant to be evaluated.
There is an assert in Expr::EvaluateAsConstantExpr that ensures this condition.
But before this patch the method was called without prior check.

Fixes https://github.com/llvm/llvm-project/issues/52768

Reviewed By: erichkeane

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




More information about the All-commits mailing list