[PATCH] D143840: [clang] Add the check of membership for the issue #58674 and improve the lookup process

Liming Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 11 21:25:27 PST 2023


lime created this revision.
lime added reviewers: aaron.ballman, erichkeane, cor3ntin, clang-language-wg.
Herald added a subscriber: yaxunl.
Herald added a project: All.
lime requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This patch includes the commit 01adf96ebc86 <https://reviews.llvm.org/rG01adf96ebc8608bcdda0cacc303035b2e60ccb46> and a fix that makes the commit
crash due to unhandled declaration references.

When looking up base classes, Clang first checks whether a base class is a
template and takes the specialized template base on it. However, the base class
might be instantiated, and the above behavior can lose information.

This patch fixes the problem by first checking whether a base class is a record
declarations, so the instantiated one will be taken.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D143840

Files:
  clang/docs/ReleaseNotes.rst
  clang/include/clang/AST/DeclCXX.h
  clang/lib/AST/CXXInheritance.cpp
  clang/lib/Sema/SemaExpr.cpp
  clang/test/CodeGenCXX/decl-ref-inheritance.cpp
  clang/test/SemaCXX/decltype.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143840.496738.patch
Type: text/x-patch
Size: 8416 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230212/28eaacef/attachment-0001.bin>


More information about the cfe-commits mailing list