[PATCH] D136977: [clang] Fix handling of unexpanded packs in template argument expressions.

2022-10-28 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. Closes #58679. Signed-off-by: Matheus Izvekov Depends on D136962 Repository: rG

[PATCH] D136564: [clang] Instantiate NTTPs and template default arguments with sugar

2022-10-28 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. @rtrieu @hokein I just proposed a fix for this at https://reviews.llvm.org/D136977 At least for the repro posted above, this was a pre-existing bug with unexpanded packs appearing within sugar, which the present patch potentialized by preserving the type alias when in

[PATCH] D136886: [clang] [ASTImporter] RFC: Correct importer to not duplicate sugared types

2022-10-29 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. It's not clear to me there is anything wrong besides our not importing of `va_list_tag`. The imported TypedefType should have the same underlying type as the original one, and I did not find anything different is happening on that test case. I will post a patch fixing

[PATCH] D136962: [clang] Improve error recovery for pack expansion of expressions

2022-10-29 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 471806. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136962/new/ https://reviews.llvm.org/D136962 Files: clang/docs/ReleaseNotes.rst clang/lib/AST/ComputeDependence.cpp clang/test/CXX/temp/temp.decls/tem

[PATCH] D136977: [clang] Fix handling of unexpanded packs in template argument expressions.

2022-10-29 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 471807. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136977/new/ https://reviews.llvm.org/D136977 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Sema/S

[PATCH] D136886: [clang] ASTImporter: Fix importing of va_list types and declarations

2022-10-29 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov retitled this revision from "[clang] [ASTImporter] RFC: Correct importer to not duplicate sugared types" to "[clang] ASTImporter: Fix importing of va_list types and declarations". mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 471808. Herald added a

[PATCH] D136886: [clang] ASTImporter: Fix importing of va_list types and declarations

2022-10-29 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 471809. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136886/new/ https://reviews.llvm.org/D136886 Files: clang-tools-extra/clang-tidy/altera/StructPackAlignCheck

[PATCH] D136886: [clang] ASTImporter: Fix importing of va_list types and declarations

2022-10-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/test/AST/ast-dump-overloaded-operators.cpp:27 // CHECK-NEXT: | `-ParmVarDecl {{.*}} col:19{{( imported)?}} 'E' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:14:6{{( imported)?}} test 'void ()' +// CHECK-NEXT: -FunctionDecl {{.*}

[PATCH] D136886: [clang] ASTImporter: Fix importing of va_list types and declarations

2022-10-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/Sema.cpp:460-462 +Scope S(TUScope, Scope::DeclScope, getDiagnostics()); +PushDeclContext(&S, DC); +PushOnScopeChains(ND, &S); aaron.ballman wrote: > Is it valid to use a local vari

[PATCH] D136886: [clang] ASTImporter: Fix importing of va_list types and declarations

2022-10-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/test/AST/ast-dump-overloaded-operators.cpp:27 // CHECK-NEXT: | `-ParmVarDecl {{.*}} col:19{{( imported)?}} 'E' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:14:6{{( imported)?}} test 'void ()' +// CHECK-NEXT: -FunctionDecl {{.*}

[PATCH] D136886: [clang] ASTImporter: Fix importing of va_list types and declarations

2022-10-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/test/AST/ast-dump-overloaded-operators.cpp:27 // CHECK-NEXT: | `-ParmVarDecl {{.*}} col:19{{( imported)?}} 'E' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:14:6{{( imported)?}} test 'void ()' +// CHECK-NEXT: -FunctionDecl {{.*}

[PATCH] D136886: [clang] ASTImporter: Fix importing of va_list types and declarations

2022-10-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/Sema.cpp:460-462 +Scope S(TUScope, Scope::DeclScope, getDiagnostics()); +PushDeclContext(&S, DC); +PushOnScopeChains(ND, &S); aaron.ballman wrote: > erichkeane wrote: > > mizvekov

[PATCH] D136886: [clang] ASTImporter: Fix importing of va_list types and declarations

2022-10-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/test/AST/ast-dump-overloaded-operators.cpp:27 // CHECK-NEXT: | `-ParmVarDecl {{.*}} col:19{{( imported)?}} 'E' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:14:6{{( imported)?}} test 'void ()' +// CHECK-NEXT: -FunctionDecl {{.*}

[PATCH] D136886: [clang] ASTImporter: Fix importing of va_list types and declarations

2022-10-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/test/AST/ast-dump-overloaded-operators.cpp:27 // CHECK-NEXT: | `-ParmVarDecl {{.*}} col:19{{( imported)?}} 'E' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:14:6{{( imported)?}} test 'void ()' +// CHECK-NEXT: -FunctionDecl {{.*}

[PATCH] D136533: [clang] Fix missing diagnostic of declaration use when accessing TypeDecls through typename access

2022-10-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D136533#3896313 , @ldionne wrote: > Looking at that commit, which had nothing to do with fixing availability > markup, I think this Clang patch might still be missing some diagnostics? > Should it diagnose when the typename

[PATCH] D136977: [clang] Fix handling of unexpanded packs in template argument expressions.

2022-10-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 472017. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136977/new/ https://reviews.llvm.org/D136977 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaExprCXX.cpp clang

[PATCH] D136962: [clang] Improve error recovery for pack expansion of expressions

2022-10-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 472016. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136962/new/ https://reviews.llvm.org/D136962 Files: clang/docs/ReleaseNotes.rst clang/lib/AST/ComputeDependence.cpp clang/test/CXX/temp/temp.decls/tem

[PATCH] D136886: [clang] ASTImporter: Fix importing of va_list types and declarations

2022-10-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 472018. mizvekov marked 12 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136886/new/ https://reviews.llvm.org/D136886 Files: clang-tools-extra/clang-tidy/altera/StructPackAlignCheck.c

[PATCH] D136564: [clang] Instantiate NTTPs and template default arguments with sugar

2022-10-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 472020. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136564/new/ https://reviews.llvm.org/D136564 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaTemplate.cpp clang/lib/Sema/SemaTemplateDeducti

[PATCH] D136565: [clang] Instantiate alias templates with sugar

2022-10-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 472021. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136565/new/ https://reviews.llvm.org/D136565 Files: clang-tools-extra/clangd/unittests/HoverTests.cpp clang/lib/Sema/SemaTemplate.cpp clang/test/AST/a

[PATCH] D136962: [clang] Improve error recovery for pack expansion of expressions

2022-10-31 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2492c52a05bc: [clang] Improve error recovery for pack expansion of expressions (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136962/n

[PATCH] D136977: [clang] Fix handling of unexpanded packs in template argument expressions.

2022-10-31 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGedf1a2e89340: [clang] Fix handling of unexpanded packs in template argument expressions. (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D136886: [clang] ASTImporter: Fix importing of va_list types and declarations

2022-10-31 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5f820c0f55cd: [clang] ASTImporter: Fix importing of va_list types and declarations (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1368

[PATCH] D136564: [clang] Instantiate NTTPs and template default arguments with sugar

2022-10-31 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGab1140874fc6: [clang] Instantiate NTTPs and template default arguments with sugar (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D13656

[PATCH] D136565: [clang] Instantiate alias templates with sugar

2022-10-31 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG279fe6281d2c: [clang] Instantiate alias templates with sugar (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D136886: [clang] ASTImporter: Fix importing of va_list types and declarations

2022-10-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. I'll need to have another look at this, apparently the synthesized `std` namespace breaks some tests on arm platforms. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136886/new/ https://reviews.llvm.org/D136886 _

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

2022-08-11 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 451799. 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-

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

2022-08-11 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D111283#3712348 , @erichkeane wrote: > This is a sizable patch, and it isn't really clear from context what I'm > looking at. Can you please improve the description/commit message to better > clarify what you are trying to

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

2022-08-11 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D111283#3716104 , @davrec wrote: > The first paragraph says X and Y must have the same canonical type, the > second suggests they need not. The first paragraph is talking about canonical equality, or if you take it that typ

[PATCH] D112374: [clang] Implement ElaboratedType sugaring for types written bare

2022-08-11 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked an inline comment as done. mizvekov added a comment. In D112374#3716944 , @alexfh wrote: > One more problem related to this patch: it changes the behavior of > __PRETTY_FUNCTION__: https://gcc.godbolt.org/z/Mvnj9j74E. There may be > depe

[PATCH] D112374: [clang] Implement ElaboratedType sugaring for types written bare

2022-08-12 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D112374#3718417 , @ilya-biryukov wrote: > We don't match GCC in other cases. GCC seems to always print the type name > without qualifiers, clang used to always print with qualifiers, but will now > print what was typed in t

[PATCH] D131351: [C] Default implicit function pointer conversions diagnostic to be an error

2022-08-12 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D131351#3718725 , @aaron.ballman wrote: > However, we don't care about the type mismatch when doing a redeclaration or > when dropping the attribute, as in: > > __attribute__((noreturn)) void my_exit(void); > void (*hand

[PATCH] D131802: WIP: [clang] fix missing initialization of original number of expansions

2022-08-12 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. Herald added projects: clang, All. Herald added a subscriber: cfe-commits. mizvekov requested review of this revision. When expanding undeclared function parameters, we should initialize the original number of expansions, if known, before trying to expand them, othe

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

2022-08-12 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov retitled this revision from "clang: fix checking parameter packs for expansion" to "[clang] Improve diagnostics for expansion length mismatch". mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 452306. Repository: rG LLVM Github Monorepo CHANGES SINC

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

2022-08-12 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D128095#3712343 , @erichkeane wrote: > Can you make a better commit message? I don't have a good idea of the > intent/description of what you're trying to do here. Done. I split this up into two patches: - D131802

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

2022-08-13 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 452459. 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-14 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. Herald added subscribers: steakhal, carlosgalvezp, martong, usaxena95, kadircet, arphaman. Herald added a reviewer: shafik. Herald added a reviewer: NoQ. Herald added a project: All. mizvekov requested review of this revision. Herald added projects: clang, libc++, c

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

2022-08-14 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 452519. 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] D131858: [clang] Track the templated entity in type substitution.

2022-08-14 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 452562. 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] D131858: [clang] Track the templated entity in type substitution.

2022-08-14 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 452574. 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] D131858: [clang] Track the templated entity in type substitution.

2022-08-14 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/include/clang/AST/Type.h:1838 /// metaprogramming we'd prefer to keep it as large as possible. -/// At the moment it has been left as a non-bitfield since this type -/// safely fits in 64 bits as an unsigned, so there

[PATCH] D131866: [clang] fix frontend crash in auto type templates

2022-08-14 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:5735-5736 // Find the insert position again. -AutoTypes.FindNodeOrInsertPos(ID, InsertPos); +if (AutoType *AT = AutoTypes.FindNodeOrInsertPos(ID, InsertPos)) + return QualTy

[PATCH] D131802: [clang] fix missing initialization of original number of expansions

2022-08-15 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb8a1b698afb2: [clang] fix missing initialization of original number of expansions (authored by mizvekov). Changed prior to commit: https://reviews.llvm.org/D131802?vs=452281&id=452688#toc Repository:

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

2022-08-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 452693. 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/S

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

2022-08-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:746 unsigned Depth, Index; -std::tie(Depth, Index) = getDepthAndIndex(Unexpanded[I]); +std::tie(Depth, Index) = getDepthAndIndex(U); if (Depth == Info.getDeduced

[PATCH] D131926: [clang-tidy] Fix for bugprone-sizeof-expression PR57167

2022-08-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov accepted this revision. mizvekov added a comment. This revision is now accepted and ready to land. LGTM once minor nits are fixed. I am not opposed to getting this back to where it was, we can take a more careful look later at what this checker should be doing instead. ==

[PATCH] D131926: [clang-tidy] Fix for bugprone-sizeof-expression PR57167

2022-08-16 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/sizeof-expression.cpp:236-238 - // CHECK-MESSAGES: :[[@LINE-1]]:10: warning: suspicious usage of 'sizeof(A*)'; pointer to aggregate sum += sizeof(PMyStruct); - // CHECK-MESSAGES

[PATCH] D131926: [clang-tidy] Fix for bugprone-sizeof-expression PR57167

2022-08-16 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/sizeof-expression.cpp:236-238 - // CHECK-MESSAGES: :[[@LINE-1]]:10: warning: suspicious usage of 'sizeof(A*)'; pointer to aggregate sum += sizeof(PMyStruct); - // CHECK-MESSAGES

[PATCH] D131926: [clang-tidy] Fix for bugprone-sizeof-expression PR57167

2022-08-17 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/sizeof-expression.cpp:236-238 - // CHECK-MESSAGES: :[[@LINE-1]]:10: warning: suspicious usage of 'sizeof(A*)'; pointer to aggregate sum += sizeof(PMyStruct); - // CHECK-MESSAGES

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

2022-08-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 453757. 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] D111283: [clang] template / auto deduction deduces common sugar

2022-08-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 453779. 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-

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

2022-08-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked 3 inline comments as done. mizvekov added a comment. In D111283#3721905 , @davrec wrote: > But instead of defining it and getting into details it might be clearer, and > certainly would have saved me the most time, for the description to

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

2022-08-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 453824. mizvekov marked an inline comment 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-extra/clangd/unittests/ASTTests.cpp clang-too

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

2022-08-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D111283#3733415 , @v.g.vassilev wrote: > Thanks for working on this! I left some comments. I did not look very deep in > the patch but it seems quite consistent to the rest of the code in Sema. Thanks! > Can you provide so

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

2022-08-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 453829. 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] D128113: Clang: fix AST representation of expanded template arguments.

2022-08-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D128113#3733051 , @joanahalili wrote: > We have a translation unit, on which we see an increase of compilation time > and clang memory allocation from 11GB to 14GB. We are working on an isolated > case. Thanks for looking

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

2022-08-19 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:12767 +Ctx.getQualifiedType(Underlying), +::getCommonDecl(EX->getOwnedTagDecl(), EY->getOwnedTagDecl())); + } davrec wrote: > This last argument should probably be omitted/n

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

2022-08-19 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:12767 +Ctx.getQualifiedType(Underlying), +::getCommonDecl(EX->getOwnedTagDecl(), EY->getOwnedTagDecl())); + } davrec wrote: > mizvekov wrote: > > davrec wrote: > > > This la

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

2022-08-20 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 454238. 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] D130308: [clang] extend getCommonSugaredType to merge sugar nodes

2022-08-20 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked 5 inline comments as done. mizvekov added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:12218 +CTN, +NExpX && NExpY ? Optional(std::min(*NExpX, *NExpY)) : None); + } davrec wrote: > I'm not clear on how `NExpX` could n

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

2022-08-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 454303. 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-

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

2022-08-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 454333. Herald added a subscriber: arichardson. 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

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

2022-08-23 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 454872. 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] D128113: Clang: fix AST representation of expanded template arguments.

2022-08-23 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D128113#3742779 , @joanahalili wrote: > This is the reproducer we managed to create for the memory increase. As > mentioned above we notice both a difference in memory and execution time. Thanks. I also added a print of t

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

2022-08-23 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D128113#3743936 , @alexfh wrote: > I wonder what is the practical application of the substitution index in > SubstTemplateTypeParmType? Diagnostics? Matching AST? Something else? What > would be the cost of calculating the i

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

2022-08-23 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D128113#3744290 , @alexfh wrote: > Do you have a practical example that would use the substitution index? I > believe you had something in mind before you implemented this patch? Oh, yes, this is needed for / is going to cul

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

2022-08-23 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D128113#3744315 , @alexfh wrote: > The whole project seems like a great improvement in clang diagnostics, but I > don't yet see how template parameter pack substitution indices fit into the > whole picture. If different type

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

2022-08-24 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D128113#3745888 , @alexfh wrote: > The main questions we need to answer here are: > > 1. is the cost of storing parameter pack substitution indices while building > AST worth the benefits? > 2. is there an alternative solutio

[PATCH] D132550: Changes to code ownership in clang and clang-tidy

2022-08-25 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/CODE_OWNERS.TXT:80 +D: Attributes, Templates + N: Reid Kleckner N: Matheus Izvekov E: mizve...@gmail.com H: mizvekov D: Templates, Type Deduction, Type System Repository: rG LLVM Github Monorepo CHANGES SIN

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

2022-08-26 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D128113#3747946 , @alexfh wrote: > For now we've added a workaround for the most problematic use case and got us > unblocked. Thus there is no need now in introducing additional flags. > However, I'm rather concerned about t

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

2022-09-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 460587. 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-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 460588. 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/SemaTemplate.cpp

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

2022-09-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 460589. 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-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 460590. 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] D131858: [clang] Track the templated entity in type substitution.

2022-09-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 460591. 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-09-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 460592. 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-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 460593. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133468/new/ https://reviews.llvm.org/D133468 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/JSONNodeDumper.h clang/include/clang/

[PATCH] D133874: [clang] Implement sugar retention for converted template arguments

2022-09-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 460594. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133874/new/ https://reviews.llvm.org/D133874 Files: clang/include/clang/Sema/Sema.h clang/include/clang/Sema/TemplateDeduction.h clang/lib/Sema/SemaLo

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

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

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

2022-09-16 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 rGaff1f6310e5f: [clang] use getCommonSugar in an assortment of place

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

2022-09-16 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 460723. 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] D111509: [clang] use getCommonSugar in an assortment of places

2022-09-16 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 rG67e229831154: [clang] use getCommonSugar in an assortment of place

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

2022-09-16 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 rG00ce271712d4: [clang] extend getCommonSugaredType to merge sugar nodes (authored by mizvekov). Changed prior to commit:

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

2022-09-16 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 rG591452eb235f: NFC: [clang] add template AST test for make_integer_seq and type_pack_element (authored by mizvekov). Repos

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

2022-09-16 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 rGf4ea3bd4b208: [clang] Fixes how we represent / emulate builtin templates (authored by mizvekov). Changed prior to commit:

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

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

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

2022-09-16 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 460908. 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-09-16 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 460909. 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-16 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 460910. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133468/new/ https://reviews.llvm.org/D133468 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/JSONNodeDumper.h clang/include/clang/

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

2022-09-16 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. The reverse indexing worked great for that problem, the patch has no perf impact now on that `reproduction.cpp`. That doesn't mean it doesn't have any impact in general, or that it can't be further improved, but other solutions will take more time to develop and we can

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

2022-09-16 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG52dce8900c46: [clang] Fix AST representation of expanded template arguments. (authored by mizvekov). Changed prior to commit: https://reviews.llvm.org/D128113?vs=460907&id=460941#toc Repository: rG L

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

2022-09-16 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. Oh by the way, it's missing the Release notes, but otherwise LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132990/new/ https://reviews.llvm.org/D132990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

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

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

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

2022-09-17 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 461016. 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

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

2022-09-17 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 461017. 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] D133874: [clang] Implement sugar retention for converted template arguments

2022-09-17 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 461018. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133874/new/ https://reviews.llvm.org/D133874 Files: clang/include/clang/Sema/Sema.h clang/include/clang/Se

[PATCH] D134115: [clang] Store in exprs the deduced arguments for function calls.

2022-09-17 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 reviewer: aaron.ballman. Herald added a reviewer: NoQ. Herald added a project: All. mizvekov requested review of this revision. Herald added a project: clang. Herald added a subscribe

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

2022-09-17 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/docs/ReleaseNotes.rst:149-151 +- Fix C++17 compatibibility warning that checks for use of auto in template + parameters so that it atually has an AutoType before attempting to call + getContainedAutoType(). This Fixes --

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:5455-5456 if (!ClangABICompat15) { - // Consider this a fix for CWG1432. Similar to the fix for CWG1395. auto *TST1 = T1->castAs(); auto *TST2 = T2->castAs(); + const

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:5179-5231 if (!Better1 && !Better2) // Neither is better than the other return JudgeByConstraints(); // C++ [temp.deduct.partial]p11: // ... and if G has a trailing function par

<    2   3   4   5   6   7   8   9   10   >