[all-commits] [llvm/llvm-project] e1cb31: Reapply "[clang] Fix name lookup for dependent bas...
Vladislav Belov via All-commits
all-commits at lists.llvm.org
Tue Dec 3 05:46:24 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e1cb316cfd99208363b5eb9bf96430ca28020be0
https://github.com/llvm/llvm-project/commit/e1cb316cfd99208363b5eb9bf96430ca28020be0
Author: Vladislav Belov <vladislav.belov at syntacore.com>
Date: 2024-12-03 (Tue, 03 Dec 2024)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/AST/CXXInheritance.cpp
M clang/lib/AST/DeclCXX.cpp
M clang/test/CXX/drs/cwg5xx.cpp
M clang/www/cxx_dr_status.html
Log Message:
-----------
Reapply "[clang] Fix name lookup for dependent bases" (#118003)
Unlike the previous version
(https://github.com/llvm/llvm-project/pull/114978), this patch also
removes an unnecessary assert that causes Clang to crash when compiling
such tests. (clang/lib/AST/DeclCXX.cpp)
https://lab.llvm.org/buildbot/#/builders/52/builds/4021
```c++
template <class T>
class X {
public:
X() = default;
virtual ~X() = default;
virtual int foo(int x, int y, T &entry) = 0;
void bar() {
struct Y : public X<T> {
Y() : X() {}
int foo(int, int, T &) override {
return 42;
}
};
}
};
```
the assertions:
```c++
llvm-project/clang/lib/AST/DeclCXX.cpp:2508: void clang::CXXMethodDecl::addOverriddenMethod(const CXXMethodDecl *): Assertion `!MD->getParent()->isDependentContext() && "Can't add an overridden method to a class template!"' failed.
```
I believe that this assert is unnecessary and contradicts the logic of
this patch. After its removal, Clang was successfully built using
itself, and all tests passed.
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