forked from OSchip/llvm-project
[Sema] Remove some conditions of a failing assert
We should have been checking that this state is consistent, but its possible for it to be filled later, so it isn't really sound to check it here anyways. Fixes llvm.org/PR39742 llvm-svn: 348325
This commit is contained in:
parent
814a6794ba
commit
4b897a3704
|
@ -329,8 +329,6 @@ void FunctionTemplateDecl::mergePrevDecl(FunctionTemplateDecl *Prev) {
|
|||
|
||||
// Ensure we don't leak any important state.
|
||||
assert(ThisCommon->Specializations.size() == 0 &&
|
||||
!ThisCommon->InstantiatedFromMember.getPointer() &&
|
||||
!ThisCommon->InstantiatedFromMember.getInt() &&
|
||||
"Can't merge incompatible declarations!");
|
||||
|
||||
Base::Common = PrevCommon;
|
||||
|
|
|
@ -18,3 +18,14 @@ void f() {
|
|||
foo(x);
|
||||
bar(x);
|
||||
}
|
||||
|
||||
namespace PR39742 {
|
||||
template<typename>
|
||||
struct wrapper {
|
||||
template<typename>
|
||||
friend void friend_function_template() {}
|
||||
};
|
||||
|
||||
wrapper<bool> x;
|
||||
wrapper<int> y;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue