[all-commits] [llvm/llvm-project] 5951ff: [clang] CWG 2082 and 2346: loosen the restrictions...

Bruno Ricci via All-commits all-commits at lists.llvm.org
Thu Jun 11 04:45:26 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5951ff4512332fff9d191da8661143a883d3b8aa
      https://github.com/llvm/llvm-project/commit/5951ff4512332fff9d191da8661143a883d3b8aa
  Author: Bruno Ricci <riccibrun at gmail.com>
  Date:   2020-06-11 (Thu, 11 Jun 2020)

  Changed paths:
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p7.cpp
    M clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p8.cpp
    A clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p9.cpp
    M clang/test/CXX/drs/dr20xx.cpp
    M clang/test/CXX/drs/dr23xx.cpp

  Log Message:
  -----------
  [clang] CWG 2082 and 2346: loosen the restrictions on parameters and local variables in default arguments.

This patch implements the resolution of CWG 2082 and CWG 2346.

The resolution of CWG 2082 changed [dcl.fct.default]p7 and p9 to allow
a parameter or local variable to appear in a default argument if not
in a potentially-evaluated expression.

The resolution of CWG 2346 changed [dcl.fct.default]p7 to allow a local
variable to appear in a default argument if not odr-used.

An issue remains after this patch
(see the FIXME in test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p7.cpp).
This is addressed by the next patch.

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

Reviewed By: rsmith, erichkeane




More information about the All-commits mailing list