[all-commits] [llvm/llvm-project] 0e3a48: PR12350: Handle remaining cases permitted by CWG D...

Richard Smith via All-commits all-commits at lists.llvm.org
Fri Feb 7 18:40:53 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0e3a48778408b505946e465abf5c77a2ddd4918c
      https://github.com/llvm/llvm-project/commit/0e3a48778408b505946e465abf5c77a2ddd4918c
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2020-02-07 (Fri, 07 Feb 2020)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticGroups.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/AST/NestedNameSpecifier.cpp
    M clang/lib/Sema/DeclSpec.cpp
    M clang/lib/Sema/SemaExprCXX.cpp
    M clang/test/CXX/class/class.mem/p13.cpp
    M clang/test/CXX/drs/dr2xx.cpp
    M clang/test/CXX/drs/dr3xx.cpp
    M clang/test/FixIt/fixit.cpp
    M clang/test/Parser/cxx-decl.cpp
    M clang/test/SemaCXX/constructor.cpp
    M clang/test/SemaCXX/destructor.cpp
    M clang/test/SemaCXX/pseudo-destructors.cpp

  Log Message:
  -----------
  PR12350: Handle remaining cases permitted by CWG DR 244.

Also add extension warnings for the cases that are disallowed by the
current rules for destructor name lookup, refactor and simplify the
lookup code, and improve the diagnostic quality when lookup fails.

The special case we previously supported for converting
p->N::S<int>::~S() from naming a class template into naming a
specialization thereof is subsumed by a more general rule here (which is
also consistent with Clang's historical behavior and that of other
compilers): if we can't find a suitable S in N, also look in N::S<int>.

The extension warnings are off by default, except for a warning when
lookup for p->N::S::~T() looks for T in scope instead of in N (or N::S).
That seems sufficiently heinous to warn on by default, especially since
we can't support it for a dependent nested-name-specifier.




More information about the All-commits mailing list