[clang] [Clang][Sema] fix noexecpt mismatch of friend declaration (PR #102267)

2024-10-04 Thread Younan Zhang via cfe-commits
@@ -4698,7 +4698,22 @@ void Sema::InstantiateExceptionSpec(SourceLocation PointOfInstantiation, // Enter the scope of this instantiation. We don't use // PushDeclContext because we don't have a scope. Sema::ContextRAII savedContext(*this, Decl); + + FunctionDecl *Source

[clang] [Clang][Sema] fix noexecpt mismatch of friend declaration (PR #102267)

2024-10-04 Thread Krystian Stasiowski via cfe-commits
@@ -4698,7 +4698,22 @@ void Sema::InstantiateExceptionSpec(SourceLocation PointOfInstantiation, // Enter the scope of this instantiation. We don't use // PushDeclContext because we don't have a scope. Sema::ContextRAII savedContext(*this, Decl); + + FunctionDecl *Source

[clang] [Clang][Sema] fix noexecpt mismatch of friend declaration (PR #102267)

2024-10-04 Thread Younan Zhang via cfe-commits
@@ -4698,7 +4698,22 @@ void Sema::InstantiateExceptionSpec(SourceLocation PointOfInstantiation, // Enter the scope of this instantiation. We don't use // PushDeclContext because we don't have a scope. Sema::ContextRAII savedContext(*this, Decl); + + FunctionDecl *Source

[clang] [Clang][Sema] fix noexecpt mismatch of friend declaration (PR #102267)

2024-10-04 Thread Younan Zhang via cfe-commits
@@ -4698,7 +4698,22 @@ void Sema::InstantiateExceptionSpec(SourceLocation PointOfInstantiation, // Enter the scope of this instantiation. We don't use // PushDeclContext because we don't have a scope. Sema::ContextRAII savedContext(*this, Decl); + + FunctionDecl *Source

[clang] [Clang][Sema] fix noexecpt mismatch of friend declaration (PR #102267)

2024-10-04 Thread via cfe-commits
@@ -4698,7 +4698,22 @@ void Sema::InstantiateExceptionSpec(SourceLocation PointOfInstantiation, // Enter the scope of this instantiation. We don't use // PushDeclContext because we don't have a scope. Sema::ContextRAII savedContext(*this, Decl); + + FunctionDecl *Source

[clang] [Clang][Sema] fix noexecpt mismatch of friend declaration (PR #102267)

2024-09-17 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @ericniebler Once I merge #106585, I have a follow up patch ready that will fix #101330. https://github.com/llvm/llvm-project/pull/102267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [Clang][Sema] fix noexecpt mismatch of friend declaration (PR #102267)

2024-09-17 Thread Eric Niebler via cfe-commits
ericniebler wrote: nudge. i'd love to see #101330 fixed. https://github.com/llvm/llvm-project/pull/102267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix noexecpt mismatch of friend declaration (PR #102267)

2024-08-14 Thread Qizhi Hu via cfe-commits
jcsxky wrote: @sdkrystian Could you please take another look at this patch? The approach does what you said before. When checking exception specific equivalence of the two functions, we do instantiation and substitute all the template parameters with instantiated ones. But we can't find them

[clang] [Clang][Sema] fix noexecpt mismatch of friend declaration (PR #102267)

2024-08-12 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/102267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix noexecpt mismatch of friend declaration (PR #102267)

2024-08-12 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > substitute so all references to template parameters have the correct depth @sdkrystian Agree! The underlying issue is the incorrect depth makes the comparison of the operands of the `noexcept-specifier` failed. because clang can't find instantiated template parameter declaratio

[clang] [Clang][Sema] fix noexecpt mismatch of friend declaration (PR #102267)

2024-08-12 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: I don't think this is the right approach. What I think we _should_ be doing is to compare the operands of the _noexcept-specifier_ the same way we compare constraints (i.e. substitute so all references to template parameters have the correct depth and _then_ check whether the