This implements the current standard wording for [dcl.fct.default]p9 and [dcl.fct.default]p7. This has been changed by CWG 2082.
Note: I don't have access to the paper therefore I assume it retroactively applies to all C++ standards.
Paths
| Differential D65696
Implements CWG 2082 Referring to parameters in unevaluated operands of default arguments Needs ReviewPublic Authored by Mordante on Aug 3 2019, 3:43 AM.
Details
Summary This implements the current standard wording for [dcl.fct.default]p9 and [dcl.fct.default]p7. This has been changed by CWG 2082. Note: I don't have access to the paper therefore I assume it retroactively applies to all C++ standards.
Diff Detail Event Timeline
Mordante added inline comments.
Comment Actions Updated the unit tests as requested. This required the Sema::ActOnParamDefaultArgument to delay a part of the ODR validation until the default argument has been 'instantiated'.
Revision Contents
Diff 215448 clang/lib/Sema/SemaDeclCXX.cpp
clang/test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.default/p9.cpp
clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p7.cpp
clang/test/CXX/drs/dr20xx.cpp
|
Please add tests for the distinction between "potentially-evaluated" and "odr-used" here, for example: