[all-commits] [llvm/llvm-project] 0b021c: [clang] Claim conformance for CWG466 (#87748)
Vlad Serebrennikov via All-commits
all-commits at lists.llvm.org
Fri Apr 5 21:12:21 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0b021c4b603b4e076f9e54572a4eef3e43ab57c0
https://github.com/llvm/llvm-project/commit/0b021c4b603b4e076f9e54572a4eef3e43ab57c0
Author: Vlad Serebrennikov <serebrennikov.vladislav at gmail.com>
Date: 2024-04-06 (Sat, 06 Apr 2024)
Changed paths:
M clang/test/CXX/drs/dr4xx.cpp
M clang/www/cxx_dr_status.html
Log Message:
-----------
[clang] Claim conformance for CWG466 (#87748)
[CWG466](https://cplusplus.github.io/CWG/issues/466.html) "cv-qualifiers
on pseudo-destructor type".
Richard claimed that we don't implement this DR because of one
ill-formed example being accepted: `a->CI::~VI();`. This example is
testing the behavior of calling a pseudo-destructor via a qualified
name, where components of qualified name denote the same `int` type, but
with different cv-qualifications.
Initially, the following wording from [expr.pseudo] quoted in CWG466 was
left intact:
> Furthermore, the two type-names in a pseudo-destructor-name of the
form
>
> `:: (opt) nested-name-specifier (opt) type-name ::~ type-name`
>
>shall designate the same scalar type.
According to this wording, the example is indeed ill-formed.
[P1131R2](https://wg21.link/p1131r2) merged wording for
pseudo-destructors into regular destructor wording. Among other things,
[expr.pseudo] was removed, and [expr.prim.id.qual]/2 was changed to
read:
> Where `type-name ::~ type-name` is used, the two type-names shall
refer to the same type (ignoring cv-qualifications);
I believe P1131R2 made the example well-formed.
However, this wording didn't survive
[P1787R6](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1787r6.html)
"Declarations and where to find them". In that paper I don't see the
intent to make the example ill-formed again, so I assume it confirmed
status-quo via other wording. My _guess_ the new wording is
http://eel.is/c++draft/basic.lookup#qual.general-4.6:
> If a qualified name Q follows a ~:
> - <...>
> - The [type-name](http://eel.is/c++draft/dcl.type.simple#nt:type-name)
that is or contains Q shall refer to its (original) lookup context
(ignoring cv-qualification) under the interpretation established by at
least one (successful) lookup
performed[.](http://eel.is/c++draft/basic.lookup#qual.general-4.6.sentence-1)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list