[PATCH] D128113: Clang: fix AST representation of expanded template arguments.

2022-08-27 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D128113#3753565 , @davrec wrote: > 2: After thinking about it further I don't think the pack index provides > sufficiently useful info in any case, since packs will always be expanded in > full, in order: when you find the f

[PATCH] D128113: Clang: fix AST representation of expanded template arguments.

2022-08-27 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D128113#3753624 , @davrec wrote: > Or just `SubstTemplateTypeParmType` could store this number in addition to > its `TemplateTypeParmType`? (E.g. the first Ts in an expansion is 0, the > second Ts in the same expansion is 1

[PATCH] D128113: Clang: fix AST representation of expanded template arguments.

2022-08-27 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D128113#3753656 , @davrec wrote: > If I'm missing something and it is substantially more complex than that, then > you're right that storing the pack index might end up the best solution - we > don't want to e.g. have to do

[PATCH] D128113: Clang: fix AST representation of expanded template arguments.

2022-08-27 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D128113#3753662 , @davrec wrote: > Thanks for your work on this, and for explaining these complexities. TBH I still don't know what to do here from the project perspective. I have a new deadline now that runs until November.

[PATCH] D111283: [clang] template / auto deduction deduces common sugar

2022-08-28 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. llvm-compile-time-tracker stats for this patch: http://llvm-compile-time-tracker.com/compare.php?from=f7a33090a91015836497c75f173775392ab0304d&to=771076b836b331f50f8a852fba1353aa60865e30&stat=instructions For the next one on the stack, which hooks the new mechanism here

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-08-28 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. llvm-compile-time-tracker stats for this patch: http://llvm-compile-time-tracker.com/compare.php?from=de872a323c8eb1c90d740fc739c8781d41743ead&to=c5cdd76e99ced02ba433e899fb6075fe214a84fd&stat=instructions The difference looks like noise. Repository: rG LLVM Github M

[PATCH] D111283: [clang] template / auto deduction deduces common sugar

2022-08-28 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 456196. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111283/new/ https://reviews.llvm.org/D111283 Files: clang-tools-extra/clangd/unittests/ASTTests.cpp clang-tools-extra/clangd/unittests/HoverTests.cpp

[PATCH] D111509: [clang] use getCommonSugar in an assortment of places

2022-08-28 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 456197. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111509/new/ https://reviews.llvm.org/D111509 Files: clang-tools-extra/clangd/unittests/tweaks/ExtractVariableTests.cpp clang-tools-extra/test/clang-tid

[PATCH] D130308: [clang] extend getCommonSugaredType to merge sugar nodes

2022-08-28 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 456198. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130308/new/ https://reviews.llvm.org/D130308 Files: clang/include/clang/AST/ASTContext.h clang/lib/AST/ASTContext.cpp clang/lib/Sema/SemaTemplateDeduc

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-08-28 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 456199. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131858/new/ https://reviews.llvm.org/D131858 Files: clang-tools-extra/clang-tidy/hicpp/ExceptionBaseclassCheck.cpp clang-tools-extra/clang-tidy/performa

[PATCH] D130308: [clang] extend getCommonSugaredType to merge sugar nodes

2022-08-28 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 456201. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130308/new/ https://reviews.llvm.org/D130308 Files: clang/include/clang/AST/ASTContext.h clang/lib/AST/AST

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-08-28 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 456202. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131858/new/ https://reviews.llvm.org/D131858 Files: clang-tools-extra/clang-tidy/hicpp/ExceptionBaseclassCheck.cpp clang-tools-extra/clang-tidy/performa

[PATCH] D128095: [clang] Improve diagnostics for expansion length mismatch

2022-08-28 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128095/new/ https://reviews.llvm.org/D128095 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D126172: [clang] Fix comparison of TemplateArgument when they are of template kind

2022-08-28 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. Hello, @roberteg16, are you still interested in working on this patch? I might need a fix for this myself, and also it happened recently that someone else attempted a fix for the same bug. If you are not abandoning it, please let us know! Repository: rG LLVM Github

[PATCH] D132816: [clang] AST: SubstTemplateTypeParmType support for non-canonical underlying type.

2022-08-28 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. Herald added a subscriber: kristof.beyls. Herald added a project: All. mizvekov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Depends on D130308 Signed-off-by: Matheus Iz

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-08-28 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 456213. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131858/new/ https://reviews.llvm.org/D131858 Files: clang-tools-extra/clang-tidy/hicpp/ExceptionBaseclassCheck.cpp clang-tools-extra/clang-tidy/performa

[PATCH] D132816: [clang] AST: SubstTemplateTypeParmType support for non-canonical underlying type.

2022-08-28 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 456216. Herald added a subscriber: martong. Herald added a reviewer: shafik. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132816/new/ https://reviews.llvm.org/D1328

[PATCH] D132816: [clang] AST: SubstTemplateTypeParmType support for non-canonical underlying type

2022-08-28 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov retitled this revision from "[clang] AST: SubstTemplateTypeParmType support for non-canonical underlying type." to "[clang] AST: SubstTemplateTypeParmType support for non-canonical underlying type". mizvekov updated this revision to Diff 456217. Repository: rG LLVM Github Monorepo CH

[PATCH] D128113: WIP: Clang: fix AST representation of expanded template arguments.

2022-08-28 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov retitled this revision from "Clang: fix AST representation of expanded template arguments." to "WIP: Clang: fix AST representation of expanded template arguments.". mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 456220. mizvekov planned changes to th

[PATCH] D128095: [clang] Improve diagnostics for expansion length mismatch

2022-08-29 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplateVariadic.cpp:103-106 +VisitSubstNonTypeTemplateParmPackExpr(SubstNonTypeTemplateParmPackExpr *E) { + Unexpanded.push_back({E, E->getParameterPackLocation()}); + return true; +} -

[PATCH] D128095: WIP: [clang] Improve diagnostics for expansion length mismatch

2022-08-29 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov retitled this revision from "[clang] Improve diagnostics for expansion length mismatch" to "WIP: [clang] Improve diagnostics for expansion length mismatch". mizvekov updated this revision to Diff 456494. mizvekov planned changes to this revision. Repository: rG LLVM Github Monorepo C

[PATCH] D128095: [clang] Improve diagnostics for expansion length mismatch

2022-08-29 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov retitled this revision from "WIP: [clang] Improve diagnostics for expansion length mismatch" to "[clang] Improve diagnostics for expansion length mismatch". mizvekov updated this revision to Diff 456495. mizvekov marked 5 inline comments as done. mizvekov requested review of this revisio

[PATCH] D128095: [clang] Improve diagnostics for expansion length mismatch

2022-08-29 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplateVariadic.cpp:860 +} else if (const auto *ND = Unexpanded[I].first.get(); + isa(ND)) { + // Function parameter pack or init-capture pack. erichkeane wrote: > This pattern

[PATCH] D128095: [clang] Improve diagnostics for expansion length mismatch

2022-08-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 456682. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128095/new/ https://reviews.llvm.org/D128095 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Sema/Sema.h clang/include/clang/Sema/SemaInternal.

[PATCH] D128095: [clang] Improve diagnostics for expansion length mismatch

2022-08-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplateVariadic.cpp:860 +} else if (const auto *ND = Unexpanded[I].first.get(); + isa(ND)) { + // Function parameter pack or init-capture pack. mizvekov wrote: > erichkeane wro

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-08-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. Just a first glance at the patch, will try to do a more comprehensive review later. Comment at: clang/lib/Sema/SemaConcept.cpp:823 + // + // Using the pattern is suffice because the partial ordering rules guarantee + // the template paramaters are

[PATCH] D128095: [clang] Improve diagnostics for expansion length mismatch

2022-08-30 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3a0309c53674: [clang] Improve diagnostics for expansion length mismatch (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128095/new/ ht

[PATCH] D128095: [clang] Improve diagnostics for expansion length mismatch

2022-08-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked 2 inline comments as done. mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplateVariadic.cpp:860 +} else if (const auto *ND = Unexpanded[I].first.get(); + isa(ND)) { + // Function parameter pack or init-capture pack. --

[PATCH] D127695: WIP: clang: Implement Template Specialization Resugaring

2022-08-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: libcxx/utils/ci/buildkite-pipeline.yml:377 +CFLAGS: "-fcrash-diagnostics-dir=crash_diagnostics_dir" +CXXFLAGS: "-fcrash-diagnostics-dir=crash_diagnostics_dir" LLVM_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer-${LL

[PATCH] D132952: [Sema] disable -Wvla for function array parameters

2022-08-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D132952#3759731 , @efriedma wrote: > As a practical matter, there isn't any reason to force variably modified > parameters to make a function variably modified. The types of parameters > aren't visible in the caller of a fu

[PATCH] D132990: [Clang] Fix compat diagnostic to detect a nontype template parameter has a placeholder type using getContainedAutoType()

2022-08-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a reviewer: mizvekov. mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplate.cpp:1534-1538 + if (TInfo->getType()->getContainedAutoType()) { Diag(D.getIdentifierLoc(), diag::warn_cxx14_compat_template_nontype_parm_auto_type)

[PATCH] D132990: [Clang] Fix compat diagnostic to detect a nontype template parameter has a placeholder type using getContainedAutoType()

2022-08-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/test/SemaTemplate/temp_arg_nontype_diagnostic_cxx1z.cpp:1 +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 -Wpre-c++17-compat %s + One thing we could do is to run this test also in std=c++17 mode, with a diff

[PATCH] D133072: WIP: [clang] fix profiling of template arguments of template and declaration kind

2022-08-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. Herald added projects: clang, libc++, All. Herald added subscribers: libcxx-commits, cfe-commits. Herald added a reviewer: libc++. mizvekov requested review of this revision. Template arguments of template and declaration kind were being profiled only by their canon

[PATCH] D133082: WIP: [clang] Implement setting crash_diagnostics_dir through env variable

2022-08-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. Herald added subscribers: libcxx-commits, cfe-commits, arichardson. Herald added projects: clang, libc++, All. Herald added a reviewer: libc++. mizvekov requested review of this revision. Herald added a subscriber: MaskRay. This implements setting the equivalent of

[PATCH] D133082: WIP: [clang] Implement setting crash_diagnostics_dir through env variable

2022-08-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 457159. mizvekov planned changes to this revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133082/new/ https://reviews.llvm.org/D133082 Files: clang/docs/ReleaseNotes.rst clang/lib/Driver/Driver.cpp

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-09-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:3748-3751 + // If it is a template, import all related things. + if (Error Err = ImportTemplateInformation(D, ToFunction)) +return std::move(Err); + martong wrote: > What's the reason

[PATCH] D133072: [clang] fix profiling of template arguments of template and declaration kind

2022-09-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:5119 // Find the insert position again. -DependentTemplateSpecializationTypes.FindNodeOrInsertPos(ID, InsertPos); +[[maybe_unused]] auto *Nothing = +DependentTemplateSpecializationTypes.

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-09-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D131858#3763851 , @erichkeane wrote: > Just did a quick scroll through this (as it is quite large!), but the general > idea seems like a fine one to me. I AM concerned about how it interacts with > the deferred concepts in

[PATCH] D133072: [clang] fix profiling of template arguments of template and declaration kind

2022-09-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplate.cpp:5817 // fall back to just producing individual arguments. - Converted.insert(Converted.end(), - ArgumentPack.begin(), ArgumentPack.end()); + for (con

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-09-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D131858#3763892 , @erichkeane wrote: > In D131858#3763878 , @mizvekov > wrote: > >> In D131858#3763851 , @erichkeane >> wrote: >> >>> Just

[PATCH] D133082: [clang] Implement setting crash_diagnostics_dir through env variable

2022-09-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Driver/Driver.cpp:5425 Arg *A = C.getArgs().getLastArg(options::OPT_fcrash_diagnostics_dir); - if (CCGenDiagnostics && A) { -SmallString<128> CrashDirectory(A->getValue()); + const char *CrashDirectory = CCGenDiagnost

[PATCH] D133082: [clang] Implement setting crash_diagnostics_dir through env variable

2022-09-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Driver/Driver.cpp:5425 Arg *A = C.getArgs().getLastArg(options::OPT_fcrash_diagnostics_dir); - if (CCGenDiagnostics && A) { -SmallString<128> CrashDirectory(A->getValue()); + const char *CrashDirectory = CCGenDiagnost

[PATCH] D133082: [clang] Implement setting crash_diagnostics_dir through env variable

2022-09-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Driver/Driver.cpp:5425 Arg *A = C.getArgs().getLastArg(options::OPT_fcrash_diagnostics_dir); - if (CCGenDiagnostics && A) { -SmallString<128> CrashDirectory(A->getValue()); + const char *CrashDirectory = CCGenDiagnost

[PATCH] D133082: [clang] Implement setting crash_diagnostics_dir through env variable

2022-09-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Driver/Driver.cpp:5425 Arg *A = C.getArgs().getLastArg(options::OPT_fcrash_diagnostics_dir); - if (CCGenDiagnostics && A) { -SmallString<128> CrashDirectory(A->getValue()); + const char *CrashDirectory = CCGenDiagnost

[PATCH] D133082: [clang] Implement setting crash_diagnostics_dir through env variable

2022-09-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Driver/Driver.cpp:5425 Arg *A = C.getArgs().getLastArg(options::OPT_fcrash_diagnostics_dir); - if (CCGenDiagnostics && A) { -SmallString<128> CrashDirectory(A->getValue()); + const char *CrashDirectory = CCGenDiagnost

[PATCH] D133082: [clang] Implement setting crash_diagnostics_dir through env variable

2022-09-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D133082#3764256 , @aaron.ballman wrote: > We use environment variables in several other places within the driver, but I > am a bit skittish about adding new ones to correspond to feature flags as > that seems to be somewhat

[PATCH] D133082: [clang] Implement setting crash_diagnostics_dir through env variable

2022-09-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: libcxx/test/libcxx/crash.sh.cpp:15 + +#pragma clang __debug parser_crash Mordante wrote: > The libc++ build seems to be green. I assume it was intended to be red so we > can validate the artifact is available in the CI

[PATCH] D133082: [clang] Implement setting crash_diagnostics_dir through env variable

2022-09-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 457327. mizvekov marked 10 inline comments as done. mizvekov requested review of this revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133082/new/ https://reviews.llvm.org/D133082 Files: clang/docs/Rel

[PATCH] D133082: [clang] Implement setting crash_diagnostics_dir through env variable

2022-09-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 457462. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133082/new/ https://reviews.llvm.org/D133082 Files: clang/docs/ClangCommandLineReference.rst clang/docs/ReleaseNotes.rst clang/docs/UsersManual.rst

[PATCH] D133082: [clang] Implement setting crash_diagnostics_dir through env variable

2022-09-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D133082#3764256 , @aaron.ballman wrote: > If we go this route, we definitely need user-facing documentation that > explains what's going on. I don't think we have anything corresponding to > https://gcc.gnu.org/onlinedocs/g

[PATCH] D133082: [clang] Implement setting crash_diagnostics_dir through env variable

2022-09-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 457468. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133082/new/ https://reviews.llvm.org/D133082 Files: clang/docs/ClangCommandLineReference.rst clang/docs/ReleaseNotes.rst clang/docs/UsersManual.rst

[PATCH] D132990: [Clang] Fix compat diagnostic to detect a nontype template parameter has a placeholder type using getContainedAutoType()

2022-09-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplate.cpp:1534-1538 + if (TInfo->getType()->getContainedAutoType()) { Diag(D.getIdentifierLoc(), diag::warn_cxx14_compat_template_nontype_parm_auto_type) << QualType(TInfo->getType()->getCont

[PATCH] D111283: [clang] template / auto deduction deduces common sugar

2022-09-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/include/clang/AST/ASTContext.h:2819-2823 + // For two canonically equal types, return a type which has + // the common sugar between them. If Unqualified is true, + // both types need only be the same unqualified type. + // Th

[PATCH] D130308: [clang] extend getCommonSugaredType to merge sugar nodes

2022-09-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/include/clang/AST/ASTContext.h:1369 } + QualType getDecayedType(QualType T, QualType Decayed) const; ChuanqiXu wrote: > Maybe we need a comment for this. The signature looks not straight forward > and I can

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-09-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Serialization/ASTWriterDecl.cpp:623-626 + VisitDeclaratorDecl(D); + Record.AddDeclarationNameLoc(D->DNLoc, D->getDeclName()); + Record.push_back(D->getIdentifierNamespace()); + ChuanqiXu wrote: > I still do

[PATCH] D130308: [clang] extend getCommonSugaredType to merge sugar nodes

2022-09-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/include/clang/AST/ASTContext.h:1369 } + QualType getDecayedType(QualType T, QualType Decayed) const; ChuanqiXu wrote: > mizvekov wrote: > > ChuanqiXu wrote: > > > Maybe we need a comment for this. The signat

[PATCH] D133209: [clang] Document environment variables used by the driver

2022-09-02 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. Herald added a project: All. mizvekov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We also mention limitations with regards to character encoding support. Signed-off-by: Matheus Izvekov Repository: r

[PATCH] D133209: [clang] Document environment variables used by the driver

2022-09-02 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/docs/ClangCommandLineReference.rst:2-5 --- NOTE: This file is automatically generated by running clang-tblgen -gen-opt-docs. Do not edit this file by hand!!

[PATCH] D126172: [clang] Fix comparison of TemplateArgument when they are of template kind

2022-09-02 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D126172#3767188 , @roberteg16 wrote: > Hey @mizvekov! Sorry for the late response. > > Yes, I am still interested and I am working on this. I'll let you know ASAP > if I find something that resembles a valid fix. > > I would

[PATCH] D133082: [clang] Implement setting crash_diagnostics_dir through env variable

2022-09-02 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 457685. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133082/new/ https://reviews.llvm.org/D133082 Files: clang/docs/ReleaseNotes.rst clang/docs/UsersManual.rst clang/lib/Driver/Driver.cpp clang/test/Dr

[PATCH] D132990: [Clang] Fix compat diagnostic to detect a nontype template parameter has a placeholder type using getContainedAutoType()

2022-09-02 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplate.cpp:1534-1538 + if (const auto *T = TInfo->getType()->getContainedDeducedType()) +if (isa(T)) + Diag(D.getIdentifierLoc(), + diag::warn_cxx14_compat_template_nontype_parm_auto_type) +

[PATCH] D132990: [Clang] Fix compat diagnostic to detect a nontype template parameter has a placeholder type using getContainedAutoType()

2022-09-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp:310-316 +namespace GH57362 { +template +class TemplateClass {}; + +template // ok, no diagnostic expected +void func() {} +} I think the issue might not be tested in

[PATCH] D133261: NFC: [clang] add template substitution AST test for make_integer_seq

2022-09-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. Herald added a project: All. mizvekov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Depends on D133072 Signed-off-by: Matheus Izvekov Repository: rG LLVM Github Mono

[PATCH] D133262: [clang] Represent __make_integer_seq as alias template in the AST

2022-09-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. Herald added a subscriber: jeroen.dobbelaere. Herald added a project: All. mizvekov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We change the template specialization of __make_integer_seq to be an alias t

[PATCH] D133262: [clang] Represent __make_integer_seq as alias template in the AST

2022-09-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 457816. Herald added a project: libc++. Herald added a subscriber: libcxx-commits. Herald added a reviewer: libc++. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133262/new/ https://reviews.llvm.org/D133262 Fil

[PATCH] D133262: [clang] Represent __make_integer_seq as alias template in the AST

2022-09-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 457817. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133262/new/ https://reviews.llvm.org/D133262 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/DeclTemplate.h clang/lib/AST/ASTConte

[PATCH] D133082: [clang] Implement setting crash_diagnostics_dir through env variable

2022-09-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 457818. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133082/new/ https://reviews.llvm.org/D133082 Files: clang/docs/ReleaseNotes.rst clang/docs/UsersManual.rst clang/lib/Driver/Driver.cpp clang/test/Dr

[PATCH] D133072: [clang] fix profiling of template arguments of template and declaration kind

2022-09-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 457819. mizvekov marked 2 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133072/new/ https://reviews.llvm.org/D133072 Files: clang/lib/AST

[PATCH] D133262: [clang] Represent __make_integer_seq as alias template in the AST

2022-09-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D133262#3768883 , @royjacobson wrote: > There are some known bugs about how we handle this built-in in the AST- > #42102, #51928, #54993. Is it possible that your patch solves them? It would > be great if it does, I hit one

[PATCH] D133249: [libc++] Documents details of the pre-commit CI.

2022-09-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: libcxx/docs/Contributing.rst:164-165 + + When this buld fails with an LLVM assertion, the crash diagnostics are + available as an artifact. + Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-09-04 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/include/clang/Sema/SemaConcept.h:48-52 + if (ArgA.getKind() == TemplateArgument::Expression && + ArgB.getKind() == TemplateArgument::Expression && + ArgA.getAsExpr()->getType()->isUndeducedAutoType() && +

[PATCH] D133072: [clang] fix profiling of template arguments of template and declaration kind

2022-09-06 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplate.cpp:5817 // fall back to just producing individual arguments. - Converted.insert(Converted.end(), - ArgumentPack.begin(), ArgumentPack.end()); + for (con

[PATCH] D133072: [clang] fix profiling of template arguments of template and declaration kind

2022-09-06 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rGacb767f5cda5: [clang] fix profiling of template arguments of template and declaration kind (authored by mizvekov). Change

[PATCH] D133082: [clang] Implement setting crash_diagnostics_dir through env variable

2022-09-06 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. @aaron.ballman I think all of your concerns are addressed now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133082/new/ https://reviews.llvm.org/D133082 ___ cfe-commits mailing

[PATCH] D133082: [clang] Implement setting crash_diagnostics_dir through env variable

2022-09-06 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG94c6dfbaebbd: [clang] Implement setting crash_diagnostics_dir through env variable (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1330

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-09-06 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. Hello, thanks, I appreciate that you found it helpful! It's pretty late for me now, I will give this another look tomorrow. Comment at: clang/include/clang/Sema/SemaConcept.h:48-52 + if (ArgA.getKind() == TemplateArgument::Expression && +

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-09-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Serialization/ASTWriterDecl.cpp:623-626 + VisitDeclaratorDecl(D); + Record.AddDeclarationNameLoc(D->DNLoc, D->getDeclName()); + Record.push_back(D->getIdentifierNamespace()); + ChuanqiXu wrote: > ChuanqiXu

[PATCH] D133261: NFC: [clang] add template AST test for make_integer_seq and type_pack_element

2022-09-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov retitled this revision from "NFC: [clang] add template substitution AST test for make_integer_seq" to "NFC: [clang] add template AST test for make_integer_seq and type_pack_element". mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 458540. Repository:

[PATCH] D133262: [clang] Fixes how we represent / emulate builtin templates

2022-09-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov retitled this revision from "[clang] Represent __make_integer_seq as alias template in the AST" to "[clang] Fixes how we represent / emulate builtin templates". mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 458541. mizvekov marked 3 inline comments

[PATCH] D133262: [clang] Fixes how we represent / emulate builtin templates

2022-09-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/AST/DeclTemplate.cpp:262 + } + default:; + }; erichkeane wrote: > The semicolon after default is bizarre/unnecessary. That said, I'd suggest > just making the 'default' case be 'return false'. This is jus

[PATCH] D133262: [clang] Fixes how we represent / emulate builtin templates

2022-09-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D133262#3768883 , @royjacobson wrote: > There are some known bugs about how we handle this built-in in the AST- > #42102, #51928, #54993. Is it possible that your patch solves them? It would > be great if it does, I hit one

[PATCH] D133261: NFC: [clang] add template AST test for make_integer_seq and type_pack_element

2022-09-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 458552. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133261/new/ https://reviews.llvm.org/D133261 Files: clang/test/SemaTemplate/make_integer_seq.cpp clang/test/SemaTemplate/type_pack_element.cpp Index: c

[PATCH] D133262: [clang] Fixes how we represent / emulate builtin templates

2022-09-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 458553. Herald added subscribers: mstorsjo, arichardson. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133262/new/ https://reviews.llvm.org/D133262 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST

[PATCH] D133262: [clang] Fixes how we represent / emulate builtin templates

2022-09-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 458559. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133262/new/ https://reviews.llvm.org/D133262 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/AS

[PATCH] D133262: [clang] Fixes how we represent / emulate builtin templates

2022-09-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 458586. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133262/new/ https://reviews.llvm.org/D133262 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/ASTContext.h clang/include/clang/AST/DeclTempl

[PATCH] D111283: [clang] template / auto deduction deduces common sugar

2022-09-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 458587. mizvekov marked 5 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111283/new/ https://reviews.llvm.org/D111283 Files: clang-tools-e

[PATCH] D133262: [clang] Fixes how we represent / emulate builtin templates

2022-09-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked an inline comment as done. mizvekov added inline comments. Comment at: clang/lib/AST/DeclTemplate.cpp:262 + } + default:; + }; mizvekov wrote: > erichkeane wrote: > > The semicolon after default is bizarre/unnecessary. That said, I'd suggest

[PATCH] D111283: [clang] template / auto deduction deduces common sugar

2022-09-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked an inline comment as done. mizvekov added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:12139 +return X; + assert(declaresSameEntity(X, Y)); + for (const Decl *DX : X->redecls()) { erichkeane wrote: > As a nit, I'd prefer this as

[PATCH] D111283: [clang] template / auto deduction deduces common sugar

2022-09-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D111283#3771900 , @erichkeane wrote: > Thanks for your patience, this was a sizable review that it took a while to > be able to make time for. A handful of non-functional reviews, but the > functionality looks fine. Thank

[PATCH] D111509: [clang] use getCommonSugar in an assortment of places

2022-09-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 458608. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111509/new/ https://reviews.llvm.org/D111509 Files: clang-tools-extra/clangd/unittests/tweaks/ExtractVariableTests.cpp clang-tools-extra/test/clang-tid

[PATCH] D130308: [clang] extend getCommonSugaredType to merge sugar nodes

2022-09-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked 4 inline comments as done. mizvekov added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:12141 static Decl *getCommonDecl(Decl *X, Decl *Y) { - if (X == Y) -return X; - assert(declaresSameEntity(X, Y)); + if (!declaresSameEntity(X, Y)) +retu

[PATCH] D130308: [clang] extend getCommonSugaredType to merge sugar nodes

2022-09-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 458613. mizvekov marked an inline comment as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130308/new/ https://reviews.llvm.org/D130308 Files: clang/include/clang/AST/ASTContext.h clang/lib/AST/ASTCon

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-09-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 458621. mizvekov marked 6 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131858/new/ https://reviews.llvm.org/D131858 Files: clang-tools-extra/clang-tidy/hicpp/ExceptionBaseclassCheck.

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-09-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/include/clang/AST/ASTContext.h:1618 + QualType getSubstTemplateTypeParmType(QualType Replacement, +Decl *ReplacedDecl, +unsigned Index) const; --

[PATCH] D132816: [clang] AST: SubstTemplateTypeParmType support for non-canonical underlying type

2022-09-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 458623. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132816/new/ https://reviews.llvm.org/D132816 Files: clang/include/clang/AST/Type.h clang/include/clang/AST/TypeProperties.td clang/lib/AST/ASTContext.

[PATCH] D133468: [clang] Implement divergence for TypedefType and UsingType

2022-09-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. Herald added a subscriber: martong. Herald added a reviewer: shafik. Herald added a project: All. mizvekov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. With this patch, TypedefTypes and UsingTypes can have

[PATCH] D127695: WIP: clang: Implement Template Specialization Resugaring

2022-09-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked 2 inline comments as done. mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplate.cpp:534-540 + QualType TransformSubstTemplateTypeParmType(TypeLocBuilder &TLB, + SubstTemplateTypeParmTypeLoc TL) { +

[PATCH] D128113: WIP: Clang: fix AST representation of expanded template arguments.

2022-09-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. @davrec @alexfh I finally managed to have a talk to @rsmith about this. He thinks that, even if we can't come up with a better solution in time, the benefits of this patch justify the costs observed, as those substitution nodes are pretty useless without a way to ind

[PATCH] D111283: [clang] template / auto deduction deduces common sugar

2022-09-08 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rGd200db386378: [clang] template / auto deduction deduces common sugar (authored by mizvekov). Changed prior to commit: h

[PATCH] D111509: [clang] use getCommonSugar in an assortment of places

2022-09-08 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd42122cd5db0: [clang] use getCommonSugar in an assortment of place

  1   2   3   4   5   6   7   8   9   10   >