[all-commits] [llvm/llvm-project] c21e17: [Concepts] Transform constraints of non-template f...

Saar Raz via All-commits all-commits at lists.llvm.org
Sat Jan 25 13:10:59 PST 2020


  Branch: refs/heads/release/10.x
  Home:   https://github.com/llvm/llvm-project
  Commit: c21e178bf22b6b46f087e6aab02a34d11dd98432
      https://github.com/llvm/llvm-project/commit/c21e178bf22b6b46f087e6aab02a34d11dd98432
  Author: Saar Raz <saar at raz.email>
  Date:   2020-01-25 (Sat, 25 Jan 2020)

  Changed paths:
    M clang/include/clang/AST/ASTConcept.h
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Sema/Sema.h
    M clang/lib/AST/ASTConcept.cpp
    M clang/lib/Sema/SemaConcept.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Sema/SemaExprCXX.cpp
    M clang/lib/Sema/SemaOverload.cpp
    M clang/lib/Sema/SemaTemplateInstantiate.cpp
    M clang/test/SemaTemplate/cxx2a-constraint-exprs.cpp

  Log Message:
  -----------
  [Concepts] Transform constraints of non-template functions to ConstantEvaluated

We would previously try to evaluate atomic constraints of non-template functions as-is,
and since they are now unevaluated at first, this would cause incorrect evaluation (bugs #44657, #44656).

Substitute into atomic constraints of non-template functions as we would atomic constraints
of template functions, in order to rebuild the expressions in a constant-evaluated context.

(cherry picked from commit 713562f54858f10bf8998ee21ff2c7e7bad0d177)




More information about the All-commits mailing list