[all-commits] [llvm/llvm-project] ce4740: [Clang][Sema] Fix crash when MS dependent base cla...

Krystian Stasiowski via All-commits all-commits at lists.llvm.org
Mon Feb 26 11:01:59 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ce4740d3e31e936aa93c115f63bf223c74c9dc20
      https://github.com/llvm/llvm-project/commit/ce4740d3e31e936aa93c115f63bf223c74c9dc20
  Author: Krystian Stasiowski <sdkrystian at gmail.com>
  Date:   2024-02-26 (Mon, 26 Feb 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/SemaTemplate/ms-lookup-template-base-classes.cpp

  Log Message:
  -----------
  [Clang][Sema] Fix crash when MS dependent base class lookup occurs in an incomplete context (#83024)

When compiling the following with `-fms-compatibility`:
```
template<typename T> struct C;

// Test lookup with incomplete lookup context
template<typename T>
auto C<T>::f() -> decltype(x) { }
```
An assert fails because `CXXRecordDecl::hasAnyDependentBases` is called
on an incomplete class. This patch ensures we don't perform unqualified
lookup into dependent base classes when the lookup context is
incomplete.



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