[all-commits] [llvm/llvm-project] 76f888: Fix handling of destructor names that name typedefs.

Richard Smith via All-commits all-commits at lists.llvm.org
Mon Feb 10 02:21:22 PST 2020


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

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/lib/Sema/SemaExprCXX.cpp
    M clang/lib/Sema/SemaLookup.cpp
    M clang/test/SemaCXX/destructor.cpp

  Log Message:
  -----------
  Fix handling of destructor names that name typedefs.

1) Fix a regression in llvmorg-11-init-2485-g0e3a4877840 that would
reject some cases where a class name is shadowed by a typedef-name
causing a destructor declaration to be rejected. Prefer a tag type over
a typedef in destructor name lookup.

2) Convert the "type in destructor declaration is a typedef" error to an
error-by-default ExtWarn to allow codebases to turn it off. GCC and MSVC
do not enforce this rule.




More information about the All-commits mailing list