Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clang C++20 Feature: Declarations and where to find them (P1787) #54150

Open
cor3ntin opened this issue Mar 2, 2022 · 7 comments
Open

Clang C++20 Feature: Declarations and where to find them (P1787) #54150

cor3ntin opened this issue Mar 2, 2022 · 7 comments
Labels
c++20 clang:frontend Language frontend issues, e.g. anything involving "Sema"
Milestone

Comments

@cor3ntin
Copy link
Contributor

cor3ntin commented Mar 2, 2022

Paper link: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1787r6.html

This fixes a number of DRs, I think a first order of business would be to understand what changes are actually needed in clang

@cor3ntin cor3ntin added the c++20 label Mar 2, 2022
@cor3ntin cor3ntin added this to the Clang C++20 milestone Mar 2, 2022
@llvmbot
Copy link
Collaborator

llvmbot commented Mar 2, 2022

@llvm/issue-subscribers-c-20

@frederick-vs-ja
Copy link
Contributor

I'm adding DR status in Clang's implementation staus page (#68846). Do you think we should specially list P1787R6 (which is effectively a DR) in that page or track resolved issues in the page for CWG issues?

@AaronBallman
Copy link
Collaborator

CC @Endilll who has also been working on conformance tests in this area.

Personally, I think it's more helpful to track the individual resolved issues than it is to track status of the omnibus paper fixing them; I expect the paper's status will be Partial for approximately... ever.

@Endilll
Copy link
Contributor

Endilll commented Oct 12, 2023

Here is status for tests (checkbox) and availability (in parentheses) in the order P1787R6 describes them. N/A are marked as having tests, since no work is due for them. I'm also listing only defect reports, omitting unresolved Core issues.

Definitions

  • (N/A) CWG554 Definition of “declarative region” and “scope”
  • (N/A) CWG2165 Namespaces, declarative regions, and translation units
  • (Yes) CWG405 Unqualified function name lookup
  • (Yes) CWG36 using-declarations in multiple-declaration contexts
  • (No) CWG418 Imperfect wording on error on multiple default arguments on a called function
  • (No) CWG1960 Visibility of entity named in class-scope using-declaration
  • (N/A) CWG1291 Looking up a conversion-type-id
  • (No) CWG2396 Lookup of names in complex _conversion-type-id_s
  • (Yes) CWG600 Does access control apply to members or to names?
  • (Yes) CWG360 Using-declaration that reduces access
  • (Yes) CWG952 Insufficient description of “naming class”

Lookup completeness

  • (Yes) CWG191 Name lookup does not handle complex nesting
  • (N/A) CWG1200 Lookup rules for template parameters
  • (N/A) CWG536 Problems in the description of id-expressions
  • (Clang 11) CWG399 Destructor lookup redux
  • (N/A) CWG562 qualified-ids in non-expression contexts
  • (No) CWG2370 friend declarations of namespace-scope functions
  • (Yes) CWG1822 Lookup of parameter names in lambda-expressions
  • (Clang 3.8) CWG1894 _typedef-name_s and _using-declaration_s
  • (Clang 3.8) CWG2199 Typedefs and tags
  • (Yes) CWG607 Lookup of _mem-initializer-id_s
  • (Clang 3.3) CWG1837 Use of this in friend and local class declarations
  • (Clang 3.4) CWG2007 Argument-dependent lookup for operator=
  • (Yes) CWG255 Placement deallocation functions and lookup ambiguity

Complete-class context

  • (N/A) CWG2331 Redundancy in description of class scope
  • (N/A) CWG2009 Unclear specification of class scope

Declaration matching

  • (Yes) CWG1821 Qualified redeclarations in a class member-specification
  • CWG1820 Qualified typedef names
  • (No) CWG386 Friend declaration of name brought in by using-declaration
  • CWG1839 Lookup of block-scope extern declarations
  • (Clang 3.4) CWG1818 Visibility and inherited language linkage
  • CWG2058 More errors from internal-linkage namespaces
  • (Clang 2.7) CWG1900 Do friend declarations count as “previous declarations”?
  • (Clang 2.7) CWG1477 Definition of a friend outside its namespace
  • (Partial) CWG138 Friend declaration name lookup
  • (Clang 3.3) CWG563 Linkage specification for objects
  • (Clang 2.8) CWG110 Can template functions and classes be declared in the same scope?
  • CWG1898 Use of “equivalent” in overload resolution
  • CWG1884 Unclear requirements for same-named external-linkage entities
  • CWG279 Correspondence of "names for linkage purposes"
  • CWG338 Enumerator name with linkage used as class name in other translation unit
  • CWG1252 Overloading member function templates based on dependent return type
  • CWG2062 Class template redeclaration requirements
  • CWG1896 Repeated alias templates
  • CWG1729 Matching declarations and definitions of variable templates

Modules

No defect reports in this section.

Parsing

  • CWG1828 nested-name-specifier ambiguity
  • CWG1771 Restricted lookup in nested-name-specifier
  • CWG1835 Dependent member lookup before <
  • CWG1908 Dual destructor lookup and _template-id_s
  • CWG1841 < following template injected-class-name
  • CWG1616 Disambiguation parsing and template parameters

Templates

  • CWG1936 Dependent _qualified-id_s
  • CWG1500 Name lookup of dependent conversion function
  • CWG2413 typename in _conversion-function-id_s
  • CWG1028 Dependent names in non-defining declarations
  • CWG1907 _using-declaration_s and default arguments
  • CWG2065 Current instantiation of a partial specialization
  • CWG1829 Dependent unnamed types
  • CWG1478 template keyword for dependent template template arguments
  • CWG2070 using-declaration with dependent nested-name-specifier
  • CWG852 using-declarations and dependent base classes
  • (Yes) CWG2213 Forward declaration of partial specializations
  • CWG271 Explicit instantiation and template argument deduction

@Endilll
Copy link
Contributor

Endilll commented Oct 12, 2023

While there are some more currently under review, I put this paper on hold, until I have more time and a wording expert willing to spend their time to dive into this. As if definitions and lookup completeness sections weren't complicated enough, it gets even worse in subsequent sections.

@Endilll Endilll changed the title Clang C++20 Feature: Declarations and where to find them Clang C++20 Feature: Declarations and where to find them (P1787) Jan 10, 2024
@Endilll Endilll added the clang:frontend Language frontend issues, e.g. anything involving "Sema" label Jul 28, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Jul 28, 2024

@llvm/issue-subscribers-clang-frontend

Author: cor3ntin (cor3ntin)

Paper link: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1787r6.html

This fixes a number of DRs, I think a first order of business would be to understand what changes are actually needed in clang

@Endilll
Copy link
Contributor

Endilll commented Sep 4, 2024

I got back to this recently with #106117 and #107019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++20 clang:frontend Language frontend issues, e.g. anything involving "Sema"
Projects
Status: No status
Development

No branches or pull requests

5 participants