[PATCH] D131872: [Intrinsics] Add initial support for NonNull attribute

2022-08-14 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov created this revision. alexander-shaposhnikov added reviewers: nikic, ChuanqiXu. alexander-shaposhnikov created this object with visibility "All Users". Herald added a subscriber: pengfei. Herald added a project: All. alexander-shaposhnikov requested review of this revision.

[PATCH] D131872: [Intrinsics] Add initial support for NonNull attribute

2022-08-14 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 452590. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131872/new/ https://reviews.llvm.org/D131872 Files: clang/test/CodeGenCXX/threadlocal_address.cpp llvm/include/llvm/IR/Intrinsics.td llv

[PATCH] D131872: [Intrinsics] Add initial support for NonNull attribute

2022-08-15 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 452615. alexander-shaposhnikov added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131872/new/ https://reviews.llvm.org/D131872 Files: clang/test/CodeGenCXX/threadl

[PATCH] D131872: [Intrinsics] Add initial support for NonNull attribute

2022-08-15 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov marked 2 inline comments as done. alexander-shaposhnikov added inline comments. Comment at: clang/test/CodeGenCXX/threadlocal_address.cpp:27 // CHECK-O1-NEXT: entry: -// CHECK-O1-NEXT: %[[I_ADDR:.+]] = {{.*}}call ptr @llvm.threadlocal.address.p0(ptr non

[PATCH] D131872: [Intrinsics] Add initial support for NonNull attribute

2022-08-16 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. alexander-shaposhnikov marked an inline comment as done. Closed by commit rGd68ba43ad247: [Intrinsics] Add initial support for NonNull attribute (authored by alexander-

[PATCH] D132290: [clang-tidy] Skip unions in use-equals-default

2022-08-20 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov created this revision. alexander-shaposhnikov added reviewers: aaron.ballman, asoffer. alexander-shaposhnikov created this object with visibility "All Users". Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. alexander-shaposhnikov requested rev

[PATCH] D132290: [clang-tidy] Skip unions in use-equals-default

2022-08-22 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 454470. alexander-shaposhnikov added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132290/new/ https://reviews.llvm.org/D132290 Files: clang-tools-extra/clang-tidy/

[PATCH] D132290: [clang-tidy] Skip unions in use-equals-default

2022-08-23 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG083e3a173d9e: [clang-tidy] Skip unions in use-equals-default (authored by alexander-shaposhnikov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132290/new/

[PATCH] D132713: [clang-tidy] Skip union-like classes in use-equals-default

2022-08-25 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov created this revision. alexander-shaposhnikov added reviewers: gribozavr2, njames93. alexander-shaposhnikov created this object with visibility "All Users". Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. alexander-shaposhnikov requested revie

[PATCH] D134929: [clang-tidy] Skip variadic ctors in use-equals-default

2022-09-29 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov created this revision. alexander-shaposhnikov added reviewers: gribozavr2, njames93, alexfh. alexander-shaposhnikov created this object with visibility "All Users". Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. alexander-shaposhnikov request

[PATCH] D134929: [clang-tidy] Skip variadic ctors in use-equals-default

2022-09-30 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd4e81097ea3d: [clang-tidy] Skip variadic ctors in modernize-use-equals-default (authored by alexander-shaposhnikov). Changed prior to commit: https://reviews.llvm.org/D134929?vs=464115&id=464417#toc Re

[PATCH] D137768: [opt][clang] Enable using -module-summary with -S / -emit-llvm

2022-11-11 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 474921. alexander-shaposhnikov retitled this revision from "[opt] Enable using -module-summary with -S" to "[opt][clang] Enable using -module-summary with -S / -emit-llvm". Herald added a project: clang. Herald added a subscriber: cfe-commits.

[PATCH] D137768: [opt][clang] Enable using -module-summary with -S / -emit-llvm

2022-11-11 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 474922. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137768/new/ https://reviews.llvm.org/D137768 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/CodeGen/split-lto-unit.c llvm/include/l

[PATCH] D137768: [opt][clang] Enable using -module-summary with -S / -emit-llvm

2022-11-14 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 475082. alexander-shaposhnikov added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137768/new/ https://reviews.llvm.org/D137768 Files: clang/lib/CodeGen/BackendUtil

[PATCH] D137768: [opt][clang] Enable using -module-summary /-flto=thin with -S / -emit-llvm

2022-11-14 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:988 if (CodeGenOpts.PrepareForThinLTO && !CodeGenOpts.DisableLLVMPasses) { if (!CodeGenOpts.ThinLinkBitcodeFile.empty()) { ThinLinkOS = openOutputFile(CodeGenOpts.Thin

[PATCH] D137768: [opt][clang] Enable using -module-summary /-flto=thin with -S / -emit-llvm

2022-11-14 Thread Alexander Shaposhnikov 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 rGef9e624694c0: [opt][clang] Enable using -module-summary/-flto=thin with -S/-emit-llvm (authored by alexander-shaposhnikov). Changed prior to commit

[PATCH] D138081: [IR] Split out IR printing passes into IRPrinter

2022-11-15 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov created this revision. alexander-shaposhnikov added reviewers: nikic, aeubanks, tejohnson. alexander-shaposhnikov created this object with visibility "All Users". Herald added subscribers: Moerafaat, zero9178, bzcheeseman, sdasgup3, wenzhicui, wrengr, ormris, cota, teijeong,

[PATCH] D138081: [IR] Split out IR printing passes into IRPrinter

2022-11-16 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. @tejohnson - the legacy pass manager depends on the interface defined in IRPrintingPasses.h (https://github.com/llvm/llvm-project/blob/main/llvm/lib/IR/LegacyPassManager.cpp#L266) so without splitting this would face the same issue - circular dependency b

[PATCH] D138081: [IR] Split out IR printing passes into IRPrinter

2022-11-17 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 476208. alexander-shaposhnikov edited the summary of this revision. alexander-shaposhnikov added a comment. Update comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138081/new/ https://revie

[PATCH] D137768: [opt][clang] Enable using -module-summary /-flto=thin with -S / -emit-llvm

2022-11-17 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 476209. alexander-shaposhnikov added a comment. Rebase on top of https://reviews.llvm.org/D138081 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137768/new/ https://reviews.llvm.org/D137768 Files

[PATCH] D137768: [opt][clang] Enable using -module-summary /-flto=thin with -S / -emit-llvm

2022-11-17 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 476210. alexander-shaposhnikov added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137768/new/ https://reviews.llvm.org/D137768 Files: clang/lib/CodeGen/BackendUtil

[PATCH] D138081: [IR] Split out IR printing passes into IRPrinter

2022-11-17 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added inline comments. Comment at: llvm/lib/IR/IRPrintingPasses.cpp:9 // // PrintModulePass and PrintFunctionPass implementations. // tejohnson wrote: > tejohnson wrote: > > Update comment > Please update this comment before committing,

[PATCH] D138081: [IR] Split out IR printing passes into IRPrinter

2022-11-17 Thread Alexander Shaposhnikov 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 rG7059a6c32cfa: [IR] Split out IR printing passes into IRPrinter (authored by alexander-shaposhnikov). Changed prior to commit: https://reviews.llvm

[PATCH] D137768: [opt][clang] Enable using -module-summary /-flto=thin with -S / -emit-llvm

2022-11-18 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. Recommitted this diff in https://github.com/llvm/llvm-project/commit/f102fe73044062542f022182381c17172a999db2. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137768/new/ https://reviews.llvm.org/D137768 ___

[PATCH] D142430: [Clang] Treat `std::forward_like` as builtin

2023-01-27 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. gentle ping ) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142430/new/ https://reviews.llvm.org/D142430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D142430: [Clang] Treat `std::forward_like` as builtin

2023-01-28 Thread Alexander Shaposhnikov 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 rG0fd9c37d8cf2: [Clang] Treat `std::forward_like` as builtin (authored by alexander-shaposhnikov). Changed prior to commit: https://reviews.llvm.org

[PATCH] D141744: [Clang] Add lifetimebound attribute to std::move/std::forward

2023-01-13 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov created this revision. alexander-shaposhnikov added reviewers: rsmith, aaron.ballman, dblaikie. alexander-shaposhnikov created this object with visibility "All Users". Herald added a project: All. alexander-shaposhnikov requested review of this revision. Herald added a projec

[PATCH] D141744: [Clang] Add lifetimebound attribute to std::move/std::forward

2023-01-14 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 489322. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141744/new/ https://reviews.llvm.org/D141744 Files: clang/lib/Sema/SemaDecl.cpp clang/test/SemaCXX/attr-lifetimebound.cpp clang/test/Sem

[PATCH] D141744: [Clang] Add lifetimebound attribute to std::move/std::forward

2023-01-18 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 490313. alexander-shaposhnikov added a comment. @aaron.ballman - thanks for the review, I've updated the release notes. Regarding LanguageExtensions.rst - somehow I don't see any appropriate sections in LanguageExtensions.rst (either about o

[PATCH] D141744: [Clang] Add lifetimebound attribute to std::move/std::forward

2023-01-19 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 490637. alexander-shaposhnikov added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141744/new/ https://reviews.llvm.org/D141744 Files: clang/docs/LanguageExtension

[PATCH] D141744: [Clang] Add lifetimebound attribute to std::move/std::forward

2023-01-19 Thread Alexander Shaposhnikov 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 rG31b0be4eba9e: [Clang] Add lifetimebound attribute to std::move/std::forward (authored by alexander-shaposhnikov). Repository: rG LLVM Github Monor

[PATCH] D142430: [Clang] Treat `std::forward_like` as builtin

2023-01-23 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov created this revision. alexander-shaposhnikov added reviewers: rsmith, aaron.ballman. alexander-shaposhnikov created this object with visibility "All Users". Herald added a reviewer: NoQ. Herald added a project: All. alexander-shaposhnikov requested review of this revision. H

[PATCH] D138081: [IR] Split out IR printing passes into IRPrinter

2022-11-18 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added inline comments. Comment at: utils/bazel/llvm-project-overlay/llvm/BUILD.bazel:918 ":Core", +":IRPrinter", ":IRReader", tejohnson wrote: > Per the follow on fix to D137768, I guess this one was unnecessary. C

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-10-30 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. Herald added subscribers: szepet, xazax.hun. This diff extends StackAddrEscapeChecker to catch stack addr leaks via block captures if the block is executed asynchronously. Test plan: make check-all Repository: rL LLVM https://reviews.llvm.org/D39438 Files:

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-10-30 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 120908. alexshap added a comment. Add positive tests Repository: rL LLVM https://reviews.llvm.org/D39438 Files: lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp test/Analysis/stack-async-leak.m Index: test/Analysis/stack-async-leak.m

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-10-31 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp:144 +return; + if (dyn_cast_or_null(Region->getMemorySpace())) { +ExplodedNode *N = C.generateErrorNode(); NoQ wrote: > `getMemorySpace()` is n

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-10-31 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 121055. alexshap added a comment. Address the comments, add more tests https://reviews.llvm.org/D39438 Files: lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp test/Analysis/stack-async-leak.m Index: test/Analysis/stack-async-leak.m =

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-10-31 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: test/Analysis/stack-async-leak.m:60 + void (^b)(void) = ^void(void) { +*p = 1; + }; NoQ wrote: > You may enjoy adding an extra note piece (as in D24278) to the offending > statement within the block. It might be

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-10-31 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 121099. alexshap added a comment. more tests Repository: rL LLVM https://reviews.llvm.org/D39438 Files: lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp test/Analysis/stack-async-leak.m Index: test/Analysis/stack-async-leak.m

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-10-31 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 121100. alexshap added a comment. cleanup Repository: rL LLVM https://reviews.llvm.org/D39438 Files: lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp test/Analysis/stack-async-leak.m Index: test/Analysis/stack-async-leak.m ===

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-11-01 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 121229. alexshap added a comment. Refactor the checker, add more tests. Repository: rL LLVM https://reviews.llvm.org/D39438 Files: lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp test/Analysis/stack-capture-leak-arc.mm test/Analysis/stack-c

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-11-01 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: test/Analysis/stack-async-leak.m:1 +// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 -analyzer-checker=core -fblocks -fobjc-arc -verify %s + dcoughlin wrote: > Can you add an additional run line testing the exp

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-11-01 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 121230. alexshap added a comment. Add more tests for blocks being passed around Repository: rL LLVM https://reviews.llvm.org/D39438 Files: lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp test/Analysis/stack-capture-leak-arc.mm test/Analysis

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-11-01 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: test/Analysis/stack-capture-leak-arc.mm:68 + int x = 123; + int &r = x; + void (^b)(void) = ^void(void) { c++ reference Repository: rL LLVM https://reviews.llvm.org/D39438

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-11-02 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 121431. alexshap added a comment. 1. Add no-warning comments 2. Switch to using a cached IdentifierInfo (similar to how it's done in CheckObjCDealloc.cpp) 3. Rerun the all the tests - they are fine. @dcoughlin - many thanks for the code review, yeah, i will

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-11-06 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. ping @NoQ Repository: rL LLVM https://reviews.llvm.org/D39438 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-11-08 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 122194. alexshap added a comment. Fix Repository: rL LLVM https://reviews.llvm.org/D39438 Files: lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp test/Analysis/stack-capture-leak-arc.mm test/Analysis/stack-capture-leak-no-arc.mm Index: test

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-11-10 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 122507. alexshap added a comment. Address the comments Repository: rL LLVM https://reviews.llvm.org/D39438 Files: lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp test/Analysis/stack-capture-leak-arc.mm test/Analysis/stack-capture-leak-no-ar

[PATCH] D40024: Fix skipping of flags in getClangStripDependencyFileAdjuster

2017-11-15 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. probably a test would be useful https://reviews.llvm.org/D40024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-11-16 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. ping Repository: rL LLVM https://reviews.llvm.org/D39438 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-11-17 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp:192 + this, "Address of stack-allocated memory is captured"); +SmallString<512> Buf; +llvm::raw_svector_ostream Out(Buf); xazax.hun wrote: > How lo

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-11-17 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 123392. alexshap added a comment. Herald added a subscriber: a.sidorin. adjust the messages, more uses of auto Repository: rL LLVM https://reviews.llvm.org/D39438 Files: lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp test/Analysis/stack-capt

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-11-20 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318705: [analyzer] Diagnose stack leaks via block captures (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D39438?vs=123392&id=123664#toc Repository: rL LLVM https://review

[PATCH] D145859: [Clang][CodeGen] Fix linkage and visibility of template parameter objects

2023-03-14 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 505175. alexander-shaposhnikov retitled this revision from "[Clang][CodeGen] Fix linkage of template parameter objects" to "[Clang][CodeGen] Fix linkage and visibility of template parameter objects". alexander-shaposhnikov edited the summary of

[PATCH] D145859: [Clang][CodeGen] Fix linkage and visibility of template parameter objects

2023-03-14 Thread Alexander Shaposhnikov 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 rG8403ccdcd28c: [Clang][CodeGen] Fix linkage and visibility of template parameter objects (authored by alexander-shaposhnikov). Repository: rG LLVM

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-03-15 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov created this revision. alexander-shaposhnikov added reviewers: erichkeane, rsmith, aaron.ballman. alexander-shaposhnikov created this object with visibility "All Users". Herald added a project: All. alexander-shaposhnikov requested review of this revision. Herald added a proj

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-03-16 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. @erichkeane , ok, let me think a bit a more about it / investigate further. It's unclear why we use AdjustConstraintDepth here in the first place, i.e. why the depth is incorrect in the first place. Regarding Diff/Value - TemplateDepth (despite its name)

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-03-16 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:779 +// The depths calculated for the declarations can be equal but they still +// may differ from the depths of types inside OldConstr and NewConstr. +OldConstr = ---

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-03-16 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. @erichkeane - ok, thanks a lot for the comments / help, I need a bit of time to play with the code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146178/new/ https://reviews.llvm.org/D146178 ___

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-03-16 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. @shafik - it's a bit early to review this patch, this was the first attempt to fix the issue related to the current behavior of clang::Sema::TemplateParameterListsAreEqual that causes Clang to mishandle out-of-line definitions involving constraints (and

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-03-22 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. @erichkeane - yes, I'm working on it, I hope to have a new version ~soon (within a few days). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146178/new/ https://reviews.llvm.org/D146178 _

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-03-22 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 507432. alexander-shaposhnikov edited the summary of this revision. alexander-shaposhnikov added a comment. New approach to constraints' comparison Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D14

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-03-22 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. @erichkeane - thanks for the comments, the changes in SemaTemplateInstantiateDecl.cpp are necessary, in particular, they enable us to handle the case template concept Constraint = true; template struct Iterator { template friend clas

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-03-22 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:1676 +Inst->setLexicalDeclContext(Owner); +RecordInst->setLexicalDeclContext(Owner); + this bit is important Repository: rG LLVM Github Monorepo

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-03-22 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov planned changes to this revision. alexander-shaposhnikov added a comment. will add more tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146178/new/ https://reviews.llvm.org/D146178 ___

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-03-22 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 507560. alexander-shaposhnikov added a comment. Add more tests. P.S. we already have tests with self-friends (in concepts.cpp), the test from Richard's comment is also included (struct S12) (in a slightly simplified form) Repository: rG LLV

[PATCH] D146882: [clang-tidy] Correct union & macros handling in modernize-use-equals-default

2023-03-25 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov accepted this revision. alexander-shaposhnikov added a comment. This revision is now accepted and ready to land. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146882/new/ https://reviews.llvm.org/D146882 _

[PATCH] D145034: [Clang][Sema] Preparations to fix handling of out-of-line definitions of constrained templates

2023-02-28 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov created this revision. alexander-shaposhnikov added reviewers: rsmith, aaron.ballman. alexander-shaposhnikov created this object with visibility "All Users". Herald added a project: All. alexander-shaposhnikov requested review of this revision. Herald added a project: clang.

[PATCH] D145034: [Clang][Sema] Preparations to fix handling of out-of-line definitions of constrained templates

2023-03-03 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 502067. alexander-shaposhnikov added a comment. 1/ Add support for out-of-line definitions of member enums + add tests 2/ Updated comments DeclSpec.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D145034: [Clang][Sema] Preparations to fix handling of out-of-line definitions of constrained templates

2023-03-03 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added inline comments. Comment at: clang/lib/Parse/ParseDeclCXX.cpp:1677-1678 CXXScopeSpec Spec; +if (TemplateInfo.TemplateParams) + Spec.setTemplateParamLists(*TemplateInfo.TemplateParams); + rsmith wrote: > I think we'll nee

[PATCH] D145034: [Clang][Sema] Preparations to fix handling of out-of-line definitions of constrained templates

2023-03-09 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 503750. alexander-shaposhnikov added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145034/new/ https://reviews.llvm.org/D145034 Files: clang/include/clang/Parse/Par

[PATCH] D145034: [Clang][Sema] Start fixing handling of out-of-line definitions of constrained templates

2023-03-09 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added inline comments. Comment at: clang/lib/Sema/SemaCXXScopeSpec.cpp:141 + ClassTemplate->getInjectedClassNameSpecialization(); + if (Context.hasSameType(Injected, ContextType)) +return ClassTemplate->getTemplatedDecl();

[PATCH] D145034: [Clang][Sema] Start fixing handling of out-of-line definitions of constrained templates

2023-03-09 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added inline comments. Comment at: clang/lib/Sema/SemaCXXScopeSpec.cpp:141 + ClassTemplate->getInjectedClassNameSpecialization(); + if (Context.hasSameType(Injected, ContextType)) +return ClassTemplate->getTemplatedDecl();

[PATCH] D145034: [Clang][Sema] Start fixing handling of out-of-line definitions of constrained templates

2023-03-09 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 504025. alexander-shaposhnikov added a comment. Release notes. P.S. To the best of my knowledge the current status is the following: with this patch the examples reported in the comments on https://github.com/llvm/llvm-project/issues/49620 st

[PATCH] D145034: [Clang][Sema] Start fixing handling of out-of-line definitions of constrained templates

2023-03-10 Thread Alexander Shaposhnikov 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 rG421c098b32bd: [Clang][Sema] Start fixing handling of out-of-line definitions of constrained… (authored by alexander-shaposhnikov). Repository: rG

[PATCH] D145859: [Clang][CodeGen] Fix linkage of template parameter objects

2023-03-11 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov created this revision. alexander-shaposhnikov added reviewers: rsmith, aaron.ballman. alexander-shaposhnikov created this object with visibility "All Users". Herald added a project: All. alexander-shaposhnikov requested review of this revision. Herald added a project: clang.

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-03-29 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 509546. alexander-shaposhnikov added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146178/new/ https://reviews.llvm.org/D146178 Files: clang/lib/Sema/SemaConcept.cp

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-03-30 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 509910. alexander-shaposhnikov added a comment. Rebased + rerun all the tests + internal testing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146178/new/ https://reviews.llvm.org/D146178 Files

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-03-31 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. @rsmith - thanks a lot for the review, is there anything you'd like me to do on this diff or we are good to go ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146178/new/ https://reviews.llvm.org/D146178 __

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-04-03 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 510634. alexander-shaposhnikov added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146178/new/ https://reviews.llvm.org/D146178 Files: clang/lib/Sema/SemaConcept.cp

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-04-03 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 510637. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146178/new/ https://reviews.llvm.org/D146178 Files: clang/lib/Sema/SemaConcept.cpp clang/lib/Sema/SemaOverload.cpp clang/lib/Sema/SemaTe

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-04-03 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 510662. alexander-shaposhnikov added a comment. Add test & minor optimization CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146178/new/ https://reviews.llvm.org/D146178 Files: clang/lib/Sema/SemaConcept.cpp clang/lib/Sema/SemaOve

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-04-03 Thread Alexander Shaposhnikov 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 rG60bee9ff5445: [Clang][Sema] Fix comparison of constraint expressions (authored by alexander-shaposhnikov). Repository: rG LLVM Github Monorepo CH

[PATCH] D147722: [Concepts] Fix Function Template Concepts comparisons

2023-04-06 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:291 /// encountering a lambda generic call operator, and continue looking for /// arguments on an enclosing class template. /* not directly related to this pa

[PATCH] D147744: [clang][Sema] Add MultiLevelTemplateArgumentList::dump()

2023-04-06 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov created this revision. alexander-shaposhnikov added reviewers: erichkeane, rsmith. alexander-shaposhnikov created this object with visibility "All Users". Herald added a project: All. alexander-shaposhnikov requested review of this revision. Herald added a project: clang. Her

[PATCH] D147744: [clang][Sema] Add MultiLevelTemplateArgumentList::dump()

2023-04-06 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 511551. alexander-shaposhnikov added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147744/new/ https://reviews.llvm.org/D147744 Files: clang/include/clang/Sema/Temp

[PATCH] D147744: [clang][Sema] Add MultiLevelTemplateArgumentList::dump()

2023-04-06 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. for template struct X { template struct Y { int f() requires(I2 == 1) { return 1; } int f() requires(I2 == 2) { return 1; } }; }; this would print the following: Num

[PATCH] D147722: [Concepts] Fix Function Template Concepts comparisons

2023-04-06 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a subscriber: ilya-biryukov. alexander-shaposhnikov added a comment. fwiw - I can revert https://reviews.llvm.org/D146178 for now till we fix the newly discovered cases (at the moment I'm aware of GH61959 and the one reported by @ilya-biryukov. Basically let me know

[PATCH] D147744: [clang][Sema] Add MultiLevelTemplateArgumentList::dump()

2023-04-07 Thread Alexander Shaposhnikov 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 rGf799901c06c0: [Clang][Sema] Add MultiLevelTemplateArgumentList::dump (authored by alexander-shaposhnikov). Changed prior to commit: https://review

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-04-07 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. I've debugged a bit what's going on in https://godbolt.org/z/7h3sPe85h we pass ForConstaintInstantiation=true and this causes us for the in-class FunctionTemplateDecl pick up the outer layer of template args (i.e. MLTAL will contain NumRetainedOuterLevels:

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-04-07 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 511854. alexander-shaposhnikov added a comment. This version is partially based on https://reviews.llvm.org/D147722. The case with self-friendship is problematic (had to add a workaround, any suggestions would be greatly appreciated). Added mor

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-04-10 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:263 + if (SubstitutedAtomicExpr.get()->isValueDependent()) +return SubstitutedAtomicExpr; erichkeane wrote: > So this bit is concerning to me... we have been catching

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-04-10 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:773 + // ConstrExpr for the inner template will properly adjust the depths. + if (isa(ND) && isa(OtherND)) +ForConstraintInstantiation = true; erichkeane wrote: > Hmm..

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-04-10 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:773 + // ConstrExpr for the inner template will properly adjust the depths. + if (isa(ND) && isa(OtherND)) +ForConstraintInstantiation = true; erichkeane wrote: > alexa

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-04-10 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:263 + if (SubstitutedAtomicExpr.get()->isValueDependent()) +return SubstitutedAtomicExpr; erichkeane wrote: > alexander-shaposhnikov wrote: > > erichkeane wrote: > > >

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-04-12 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. https://github.com/llvm/llvm-project/issues/62110 (in addition to the self-friendship case) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146178/new/ https://reviews.llvm.org/D146178 ___

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-04-13 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:773 + // ConstrExpr for the inner template will properly adjust the depths. + if (isa(ND) && isa(OtherND)) +ForConstraintInstantiation = true; erichkeane wrote: > alexa

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-04-13 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov planned changes to this revision. alexander-shaposhnikov added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:773 + // ConstrExpr for the inner template will properly adjust the depths. + if (isa(ND) && isa(OtherND)) +ForConstraintInstant

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-04-16 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 514095. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146178/new/ https://reviews.llvm.org/D146178 Files: clang/include/clang/Sema/Template.h clang/lib/Sema/SemaConcept.cpp clang/lib/Sema/Se

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-04-16 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. https://github.com/llvm/llvm-project/issues/62110 is still a blocker for this diff though (haven't investigated it yet) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146178/new/ https://reviews.llvm.org/D146

<    1   2   3   4   >