[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Reland: fix getTemplateInstantiationArgs (PR #207825)
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/207825 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Reland: fix getTemplateInstantiationArgs (PR #207825)
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/207825 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Reland: fix getTemplateInstantiationArgs (PR #207825)
zyn0217 wrote: @davidstone the patch touches one of the most painful part of clang, this difficulty is not merely due to a failure to split the work into smaller patches, as there have been similar attempts in the past that were eventually abandoned after multiple reverts. Template in-production uses are almost unpredictable and thus we can't have sufficient test coverage. https://github.com/llvm/llvm-project/pull/207825 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Reland: fix getTemplateInstantiationArgs (PR #207825)
Meinersbur wrote: Buildbot `flang-x86_64-windows` also seems to fail because of this: https://github.com/llvm/llvm-project/pull/203980#issuecomment-4902385316 https://github.com/llvm/llvm-project/pull/207825 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Reland: fix getTemplateInstantiationArgs (PR #207825)
@@ -200,15 +200,10 @@ static bool DiagRecursiveConstraintEval(
// Figure out the to-translation-unit depth for this function declaration for
// the purpose of seeing if they differ by constraints. This isn't the same as
// getTemplateDepth, because it includes already instantiated parents.
-static unsigned
-CalculateTemplateDepthForConstraints(Sema &S, const NamedDecl *ND,
- bool SkipForSpecialization = false) {
- MultiLevelTemplateArgumentList MLTAL = S.getTemplateInstantiationArgs(
- ND, ND->getLexicalDeclContext(), /*Final=*/false,
- /*Innermost=*/std::nullopt,
- /*RelativeToPrimary=*/true,
- /*Pattern=*/nullptr,
- /*ForConstraintInstantiation=*/true, SkipForSpecialization);
+static unsigned CalculateTemplateDepthForConstraints(Sema &S,
+ const NamedDecl *ND) {
+ // FIXME: This is a very expensive way to calculate this.
mizvekov wrote:
Yeah, this was before already, I am just adding the comment as a drive-by.
https://github.com/llvm/llvm-project/pull/207825
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Reland: fix getTemplateInstantiationArgs (PR #207825)
mizvekov wrote: > What is the main difference between this and the previous version you > previously landed? Fixup commit https://github.com/llvm/llvm-project/pull/207825 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Reland: fix getTemplateInstantiationArgs (PR #207825)
https://github.com/shafik commented: What is the main difference between this and the previous version you previously landed? https://github.com/llvm/llvm-project/pull/207825 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Reland: fix getTemplateInstantiationArgs (PR #207825)
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/207825 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Reland: fix getTemplateInstantiationArgs (PR #207825)
@@ -200,15 +200,10 @@ static bool DiagRecursiveConstraintEval(
// Figure out the to-translation-unit depth for this function declaration for
// the purpose of seeing if they differ by constraints. This isn't the same as
// getTemplateDepth, because it includes already instantiated parents.
-static unsigned
-CalculateTemplateDepthForConstraints(Sema &S, const NamedDecl *ND,
- bool SkipForSpecialization = false) {
- MultiLevelTemplateArgumentList MLTAL = S.getTemplateInstantiationArgs(
- ND, ND->getLexicalDeclContext(), /*Final=*/false,
- /*Innermost=*/std::nullopt,
- /*RelativeToPrimary=*/true,
- /*Pattern=*/nullptr,
- /*ForConstraintInstantiation=*/true, SkipForSpecialization);
+static unsigned CalculateTemplateDepthForConstraints(Sema &S,
+ const NamedDecl *ND) {
+ // FIXME: This is a very expensive way to calculate this.
shafik wrote:
Was this expensive before as well or b/c of the arguments that you dropped in
this change?
https://github.com/llvm/llvm-project/pull/207825
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
