[all-commits] [llvm/llvm-project] a2739f: [clang] Treat function parameter scope as an immed...

Mariya Podchishchaeva via All-commits all-commits at lists.llvm.org
Tue Mar 7 08:51:13 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a2739f111d9795fe49109c26c2d816436f2143c3
      https://github.com/llvm/llvm-project/commit/a2739f111d9795fe49109c26c2d816436f2143c3
  Author: Mariya Podchishchaeva <mariya.podchishchaeva at intel.com>
  Date:   2023-03-07 (Tue, 07 Mar 2023)

  Changed paths:
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/CXX/expr/expr.const/p6-2a.cpp

  Log Message:
  -----------
  [clang] Treat function parameter scope as an immediate function context

This results in expressions that appear in default function argument not
being checked for being actual constant expressions.
This aligns clang's behavior with the standard and fixes one of the
examples from https://wg21.link/P1073R3.

Reviewed By: shafik, cor3ntin

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




More information about the All-commits mailing list