Page MenuHomePhabricator

vsapsai (Volodymyr Sapsai)
User

Projects

User does not belong to any projects.

User Details

User Since
May 27 2014, 6:39 AM (423 w, 23 h)

Recent Activity

Mon, Jul 4

vsapsai added a comment to D126266: Mark the file entry invalid, until reread. Invalidate SLocEntry cache, readd it on reread. Do not use translateFile, because it pulls in parts of the pch..

Hmm, I'm concerned with the pieces added purely for testing. Specifically, FileEntriesToReread and TestHelper friend functions. Need to think how else we can test it.

Mon, Jul 4, 9:03 PM · Restricted Project, Restricted Project, Restricted Project
vsapsai added a comment to D129068: [AST] Profiling on constraint expression instead of arguments for TypeConstraint in ASTContext::isSameTemplateParameter.

I don't know enough to say if it is a good approach or not, I'll need to check what we can achieve by modifying Profile in ArgLoc.getArgument().Profile. Specifically, I'm interested to see if we can use the same ASTContext for profile. Also I have a few stylistic comments but I want to figure out high-level stuff first.

Mon, Jul 4, 8:48 PM · Restricted Project, Restricted Project, Restricted Project

Thu, Jun 30

vsapsai committed rG2ceb9c347f14: [ODRHash diagnostics] Move common code for calculating diag locations in… (authored by vsapsai).
[ODRHash diagnostics] Move common code for calculating diag locations in…
Thu, Jun 30, 7:40 PM · Restricted Project, Restricted Project
vsapsai closed D128489: [ODRHash diagnostics] Move common code for calculating diag locations in `DiagnoseODRMismatch` into a lambda. NFC..
Thu, Jun 30, 7:39 PM · Restricted Project, Restricted Project
vsapsai committed rG15cb180dcbf8: [ODRHash diagnostics] Split `err_module_odr_violation_mismatch_decl_diff` into… (authored by vsapsai).
[ODRHash diagnostics] Split `err_module_odr_violation_mismatch_decl_diff` into…
Thu, Jun 30, 6:41 PM · Restricted Project, Restricted Project
vsapsai closed D128488: [ODRHash diagnostics] Split `err_module_odr_violation_mismatch_decl_diff` into per-entity diagnostics. NFC..
Thu, Jun 30, 6:41 PM · Restricted Project, Restricted Project
vsapsai added a comment to D128488: [ODRHash diagnostics] Split `err_module_odr_violation_mismatch_decl_diff` into per-entity diagnostics. NFC..

Thanks for the review, Chuanqi!

Thu, Jun 30, 6:02 PM · Restricted Project, Restricted Project
vsapsai added a comment to D128489: [ODRHash diagnostics] Move common code for calculating diag locations in `DiagnoseODRMismatch` into a lambda. NFC..

Thanks for the review!

Thu, Jun 30, 3:40 PM · Restricted Project, Restricted Project

Wed, Jun 29

vsapsai added reviewers for D128488: [ODRHash diagnostics] Split `err_module_odr_violation_mismatch_decl_diff` into per-entity diagnostics. NFC.: Bigcheese, jansvoboda11, ChuanqiXu.
Wed, Jun 29, 3:45 PM · Restricted Project, Restricted Project
vsapsai added reviewers for D128489: [ODRHash diagnostics] Move common code for calculating diag locations in `DiagnoseODRMismatch` into a lambda. NFC.: Bigcheese, jansvoboda11, ChuanqiXu.
Wed, Jun 29, 3:44 PM · Restricted Project, Restricted Project
vsapsai updated the diff for D128488: [ODRHash diagnostics] Split `err_module_odr_violation_mismatch_decl_diff` into per-entity diagnostics. NFC..

Rebase after blocking change has landed.

Wed, Jun 29, 3:02 PM · Restricted Project, Restricted Project
vsapsai committed rG3514131219ff: [ODRHash diagnostics] Fix typos. NFC. (authored by vsapsai).
[ODRHash diagnostics] Fix typos. NFC.
Wed, Jun 29, 3:00 PM · Restricted Project, Restricted Project
vsapsai added a comment to D128487: [ODRHash diagnostics] Move repetetive code at lambda calls into lambdas themselves. NFC..

No immediate or concert ideas here.. It is hard to do refactoring. I sent https://reviews.llvm.org/D118437 before to do some simplification for the dispatch of default template argument. But I don't find a general method/idea to solve it in batch...

Wed, Jun 29, 1:35 PM · Restricted Project, Restricted Project
vsapsai committed rG017c068f7899: [ODRHash diagnostics] Move repetetive code at lambda calls into lambdas… (authored by vsapsai).
[ODRHash diagnostics] Move repetetive code at lambda calls into lambdas…
Wed, Jun 29, 1:25 PM · Restricted Project, Restricted Project
vsapsai closed D128487: [ODRHash diagnostics] Move repetetive code at lambda calls into lambdas themselves. NFC..
Wed, Jun 29, 1:25 PM · Restricted Project, Restricted Project

Tue, Jun 28

vsapsai added a comment to D128487: [ODRHash diagnostics] Move repetetive code at lambda calls into lambdas themselves. NFC..

Thanks for the review!

Tue, Jun 28, 6:51 PM · Restricted Project, Restricted Project

Mon, Jun 27

vsapsai added reviewers for D128487: [ODRHash diagnostics] Move repetetive code at lambda calls into lambdas themselves. NFC.: Bigcheese, jansvoboda11, ChuanqiXu.
Mon, Jun 27, 8:10 PM · Restricted Project, Restricted Project
vsapsai requested review of D128695: [ODRHash diagnostics] Move `ODRDiagsEmitter` to libAST in separate files. NFC..
Mon, Jun 27, 8:08 PM · Restricted Project, Restricted Project
vsapsai updated the diff for D128490: [ODRHash diagnostics] Transform method `ASTReader::diagnoseOdrViolations` into a class `ODRDiagsEmitter`. NFC..

Last rebase on top of prep change.

Mon, Jun 27, 6:52 PM · Restricted Project, Restricted Project
vsapsai updated the diff for D128690: [ODRHash diagnostics] Preparation to minimize subsequent diffs. NFC..

More preparations to minimize subsequent diff.

Mon, Jun 27, 6:22 PM · Restricted Project, Restricted Project
vsapsai updated the diff for D128490: [ODRHash diagnostics] Transform method `ASTReader::diagnoseOdrViolations` into a class `ODRDiagsEmitter`. NFC..

Rebase more.

Mon, Jun 27, 5:44 PM · Restricted Project, Restricted Project
vsapsai updated the diff for D128490: [ODRHash diagnostics] Transform method `ASTReader::diagnoseOdrViolations` into a class `ODRDiagsEmitter`. NFC..

Rebase on a parent change.

Mon, Jun 27, 5:05 PM · Restricted Project, Restricted Project
vsapsai requested review of D128690: [ODRHash diagnostics] Preparation to minimize subsequent diffs. NFC..
Mon, Jun 27, 4:54 PM · Restricted Project, Restricted Project

Fri, Jun 24

vsapsai added a comment to D128328: [C++20][Modules] Improve handing of Private Module Fragment diagnostics..

Sorry for changing my mind. I've thought about the errors more and especially about the case mentioned by Chuanqi

export module A;
[export] inline void func();
Fri, Jun 24, 8:38 PM · Restricted Project, Restricted Project

Thu, Jun 23

vsapsai requested review of D128490: [ODRHash diagnostics] Transform method `ASTReader::diagnoseOdrViolations` into a class `ODRDiagsEmitter`. NFC..
Thu, Jun 23, 7:47 PM · Restricted Project, Restricted Project
vsapsai requested review of D128489: [ODRHash diagnostics] Move common code for calculating diag locations in `DiagnoseODRMismatch` into a lambda. NFC..
Thu, Jun 23, 7:45 PM · Restricted Project, Restricted Project
vsapsai requested review of D128488: [ODRHash diagnostics] Split `err_module_odr_violation_mismatch_decl_diff` into per-entity diagnostics. NFC..
Thu, Jun 23, 7:44 PM · Restricted Project, Restricted Project
vsapsai requested review of D128487: [ODRHash diagnostics] Move repetetive code at lambda calls into lambdas themselves. NFC..
Thu, Jun 23, 7:41 PM · Restricted Project, Restricted Project

Wed, Jun 22

vsapsai added a comment to D128328: [C++20][Modules] Improve handing of Private Module Fragment diagnostics..

From the perspective of handling err_export_inline_not_defined error as a developer what about the following option?

export inline void fn_e(); // note: function 'fn_e' exported as 'inline' here
Wed, Jun 22, 8:14 PM · Restricted Project, Restricted Project

May 30 2022

vsapsai added a comment to D126566: [ODRHash][NFC] Add missing 'select' case for `ODRMismatchDecl`..

Thanks for the review!

May 30 2022, 11:12 AM · Restricted Project, Restricted Project
vsapsai committed rGf3defc23488e: [ODRHash][NFC] Add missing 'select' case for `ODRMismatchDecl`. (authored by vsapsai).
[ODRHash][NFC] Add missing 'select' case for `ODRMismatchDecl`.
May 30 2022, 10:07 AM · Restricted Project, Restricted Project
vsapsai closed D126566: [ODRHash][NFC] Add missing 'select' case for `ODRMismatchDecl`..
May 30 2022, 10:07 AM · Restricted Project, Restricted Project

May 27 2022

vsapsai added a comment to D126566: [ODRHash][NFC] Add missing 'select' case for `ODRMismatchDecl`..

For the record, FunctionTemplate case was added in https://reviews.llvm.org/rG9359e8f22a5403ad9524a92c4ccab4db46c9c100

May 27 2022, 6:01 PM · Restricted Project, Restricted Project
vsapsai added a comment to D126566: [ODRHash][NFC] Add missing 'select' case for `ODRMismatchDecl`..

To trigger "function template|different function template" diagnostic we need the entire "case FunctionTemplate" in "switch (FirstDiffType)" not to detect any mismatches. And I don't know any such cases.

May 27 2022, 4:47 PM · Restricted Project, Restricted Project
vsapsai added a comment to D126566: [ODRHash][NFC] Add missing 'select' case for `ODRMismatchDecl`..

We emit err_module_odr_violation_mismatch_decl_unknown at
https://github.com/llvm/llvm-project/blob/0fbe3f3f486e01448121f7931a4ca29fac1504ab/clang/lib/Serialization/ASTReader.cpp#L11143-L11150

May 27 2022, 2:15 PM · Restricted Project, Restricted Project
vsapsai requested review of D126566: [ODRHash][NFC] Add missing 'select' case for `ODRMismatchDecl`..
May 27 2022, 2:13 PM · Restricted Project, Restricted Project

May 6 2022

vsapsai planned changes to D124287: [modules][ODRHash] Compare ODR hashes to detect mismatches in duplicate ObjCInterfaceDecl..
May 6 2022, 7:27 PM · Restricted Project, Restricted Project

May 5 2022

vsapsai committed rG3b762b3ab8d2: [clang][NFC] In parts of Objective-C Sema use Obj-C-specific types instead of… (authored by vsapsai).
[clang][NFC] In parts of Objective-C Sema use Obj-C-specific types instead of…
May 5 2022, 7:20 PM · Restricted Project, Restricted Project
vsapsai closed D124285: [clang][NFC] In parts of Objective-C Sema use Obj-C-specific types instead of `Decl`..
May 5 2022, 7:20 PM · Restricted Project, Restricted Project

Apr 28 2022

vsapsai added a comment to D124287: [modules][ODRHash] Compare ODR hashes to detect mismatches in duplicate ObjCInterfaceDecl..

Recollected that ASTStructuralEquivalence by default tends to be order-dependent while ODR hash order-independent. Different approaches can be achieved with different mechanisms but some behavior is easier to achieve.

Apr 28 2022, 1:53 PM · Restricted Project, Restricted Project
vsapsai updated the diff for D124285: [clang][NFC] In parts of Objective-C Sema use Obj-C-specific types instead of `Decl`..

Simplify pointer comparison.

Apr 28 2022, 1:10 PM · Restricted Project, Restricted Project
vsapsai added inline comments to D124285: [clang][NFC] In parts of Objective-C Sema use Obj-C-specific types instead of `Decl`..
Apr 28 2022, 1:10 PM · Restricted Project, Restricted Project

Apr 27 2022

vsapsai committed rGd32c685e1012: [modules] Merge equivalent extensions and diagnose ivar redeclarations for… (authored by vsapsai).
[modules] Merge equivalent extensions and diagnose ivar redeclarations for…
Apr 27 2022, 3:53 PM · Restricted Project, Restricted Project
vsapsai closed D121177: [modules] Merge equivalent extensions and diagnose ivar redeclarations for extensions loaded from different modules..
Apr 27 2022, 3:53 PM · Restricted Project, Restricted Project

Apr 26 2022

vsapsai added a comment to D124287: [modules][ODRHash] Compare ODR hashes to detect mismatches in duplicate ObjCInterfaceDecl..

This sounds reasonable to me. What use-cases does ASTStructuralEquivalence fit better than ODR hashes?

Apr 26 2022, 5:47 PM · Restricted Project, Restricted Project
vsapsai updated the diff for D124285: [clang][NFC] In parts of Objective-C Sema use Obj-C-specific types instead of `Decl`..

Drop unnecessary cast<>.

Apr 26 2022, 4:24 PM · Restricted Project, Restricted Project
vsapsai added inline comments to D124285: [clang][NFC] In parts of Objective-C Sema use Obj-C-specific types instead of `Decl`..
Apr 26 2022, 4:24 PM · Restricted Project, Restricted Project
vsapsai updated the diff for D121177: [modules] Merge equivalent extensions and diagnose ivar redeclarations for extensions loaded from different modules..

Handle in VisitObjCIvarDecl only redeclarations in extensions.

Apr 26 2022, 2:22 PM · Restricted Project, Restricted Project

Apr 25 2022

vsapsai added inline comments to D121177: [modules] Merge equivalent extensions and diagnose ivar redeclarations for extensions loaded from different modules..
Apr 25 2022, 9:34 PM · Restricted Project, Restricted Project
vsapsai updated the diff for D121177: [modules] Merge equivalent extensions and diagnose ivar redeclarations for extensions loaded from different modules..

Rebase and update test to use ptr instead of i64*. Also now the added test is failing for implementationIvar, investigating that.

Apr 25 2022, 6:32 PM · Restricted Project, Restricted Project

Apr 22 2022

vsapsai committed rGa7f9f2fea506: [fixup] Handle enum constant `Lang_OBJC` introduced in 4604db94. (authored by vsapsai).
[fixup] Handle enum constant `Lang_OBJC` introduced in 4604db94.
Apr 22 2022, 6:00 PM · Restricted Project, Restricted Project
vsapsai committed rG4604db9493ff: [ASTStructuralEquivalence] Add support for comparing ObjCCategoryDecl. (authored by vsapsai).
[ASTStructuralEquivalence] Add support for comparing ObjCCategoryDecl.
Apr 22 2022, 4:52 PM · Restricted Project, Restricted Project
vsapsai closed D121176: [ASTStructuralEquivalence] Add support for comparing ObjCCategoryDecl..
Apr 22 2022, 4:51 PM · Restricted Project, Restricted Project
vsapsai updated the diff for D121176: [ASTStructuralEquivalence] Add support for comparing ObjCCategoryDecl..

Rebase and trigger pre-commit tests.

Apr 22 2022, 12:04 PM · Restricted Project, Restricted Project
vsapsai added a comment to D124286: [modules] Allow parsing a duplicate Obj-C interface if a previous one comes from a hidden [sub]module..

I also have a very similar change with ActOnDuplicateDefinition for ObjCProtocolDecl. If anybody is interested in how it compares with ObjCInterfaceDecl, I can publish that but it's not finished yet.

Apr 22 2022, 11:53 AM · Restricted Project, Restricted Project
vsapsai added a comment to D124287: [modules][ODRHash] Compare ODR hashes to detect mismatches in duplicate ObjCInterfaceDecl..

As a proof of concept how ODR hash comparison can be used during deserialization, please see D124289. My point is to highlight the amount of reuse we gain from using ODR hash (I particularly enjoy the test case reuse). I agree the error messages aren't particularly useful yet and it will take some work to make code in ASTReader::diagnoseOdrViolations usable from parser. But I believe that should be doable.

Apr 22 2022, 11:48 AM · Restricted Project, Restricted Project
vsapsai requested review of D124289: [modules] Proof of concept in using ODR hash to detect mismatching duplicate ObjCInterfaceDecl during deserialization..
Apr 22 2022, 11:41 AM · Restricted Project, Restricted Project
vsapsai updated subscribers of D124287: [modules][ODRHash] Compare ODR hashes to detect mismatches in duplicate ObjCInterfaceDecl..
Apr 22 2022, 11:41 AM · Restricted Project, Restricted Project
vsapsai requested review of D124287: [modules][ODRHash] Compare ODR hashes to detect mismatches in duplicate ObjCInterfaceDecl..
Apr 22 2022, 11:39 AM · Restricted Project, Restricted Project
vsapsai updated subscribers of D124286: [modules] Allow parsing a duplicate Obj-C interface if a previous one comes from a hidden [sub]module..
Apr 22 2022, 11:36 AM · Restricted Project, Restricted Project
vsapsai requested review of D124286: [modules] Allow parsing a duplicate Obj-C interface if a previous one comes from a hidden [sub]module..
Apr 22 2022, 11:35 AM · Restricted Project, Restricted Project
vsapsai requested review of D124285: [clang][NFC] In parts of Objective-C Sema use Obj-C-specific types instead of `Decl`..
Apr 22 2022, 11:29 AM · Restricted Project, Restricted Project

Apr 21 2022

vsapsai added a comment to D121176: [ASTStructuralEquivalence] Add support for comparing ObjCCategoryDecl..

Thanks for the review, Gabor! Now I'll work on rebasing the patch and testing one final time.

Apr 21 2022, 8:15 PM · Restricted Project, Restricted Project

Apr 14 2022

vsapsai added a comment to D121176: [ASTStructuralEquivalence] Add support for comparing ObjCCategoryDecl..

Ping.

Apr 14 2022, 2:06 PM · Restricted Project, Restricted Project

Apr 7 2022

vsapsai added a comment to D121176: [ASTStructuralEquivalence] Add support for comparing ObjCCategoryDecl..

Ping.

Apr 7 2022, 12:04 PM · Restricted Project, Restricted Project

Apr 4 2022

vsapsai committed rG29444f0444c6: [modules] Merge ObjC interface ivars with anonymous types. (authored by vsapsai).
[modules] Merge ObjC interface ivars with anonymous types.
Apr 4 2022, 6:49 PM · Restricted Project, Restricted Project
vsapsai closed D118525: [modules] Merge ObjC interface ivars with anonymous types..
Apr 4 2022, 6:49 PM · Restricted Project, Restricted Project, Restricted Project
vsapsai added a comment to D118525: [modules] Merge ObjC interface ivars with anonymous types..

Thanks everyone for the feedback! Especially valuable is opinion on making ObjCContainerDecl a lexical decl context. As discussed earlier, not many people can provide feedback on Objective-C-related code and I'm still responsible for any problems caused by this change. So I'll commit the change and please let me know if it breaks anything, I'll be glad to address it.

Apr 4 2022, 5:43 PM · Restricted Project, Restricted Project, Restricted Project

Mar 31 2022

vsapsai added a comment to D121176: [ASTStructuralEquivalence] Add support for comparing ObjCCategoryDecl..

Ping.

Mar 31 2022, 1:02 PM · Restricted Project, Restricted Project

Mar 28 2022

vsapsai added a reviewer for D118525: [modules] Merge ObjC interface ivars with anonymous types.: benlangmuir.

I've run clang with this change on a bunch of code (especially Objective-C code) and there were no regressions.

Mar 28 2022, 4:53 PM · Restricted Project, Restricted Project, Restricted Project
vsapsai updated the summary of D118525: [modules] Merge ObjC interface ivars with anonymous types..
Mar 28 2022, 4:47 PM · Restricted Project, Restricted Project, Restricted Project
vsapsai abandoned D122508: [clang][NFC] Remove unused parameter in `Sema::ActOnDuplicateDefinition`..
Mar 28 2022, 12:59 PM · Restricted Project, Restricted Project
vsapsai committed rGa621b0af9cd0: [clang][NFC] Remove unused parameter in `Sema::ActOnDuplicateDefinition`. (authored by vsapsai).
[clang][NFC] Remove unused parameter in `Sema::ActOnDuplicateDefinition`.
Mar 28 2022, 12:08 PM · Restricted Project, Restricted Project

Mar 25 2022

vsapsai requested review of D122508: [clang][NFC] Remove unused parameter in `Sema::ActOnDuplicateDefinition`..
Mar 25 2022, 3:10 PM · Restricted Project, Restricted Project

Mar 24 2022

vsapsai added a comment to D120874: [C++20] [Modules] Use '-' as the separator of partitions when searching in filesystems.

By the way, tried a module name with a colon and ModuleMapParser doesn't accept it

include/module.modulemap:1:12: error: skipping stray token
module Test:Colon {
           ^
include/module.modulemap:1:13: error: expected '{' to start module 'Test'
module Test:Colon {
            ^
include/module.modulemap:1:13: error: expected module declaration
include/module.modulemap:1:19: error: expected module declaration
module Test:Colon {
                  ^
include/module.modulemap:2:1: error: expected module declaration
}
^
Mar 24 2022, 6:28 PM · Restricted Project, Restricted Project
vsapsai added a comment to D120874: [C++20] [Modules] Use '-' as the separator of partitions when searching in filesystems.

@vsapsai @dblaikie I want to make sure if this one would affect clang modules. Or simply, would the name of clang modules contain :? (: is the separator of C++20 modules partitions.)

Mar 24 2022, 6:26 PM · Restricted Project, Restricted Project

Mar 22 2022

vsapsai added a comment to D121176: [ASTStructuralEquivalence] Add support for comparing ObjCCategoryDecl..

@shafik, can you please check the patch? Or maybe recommend somebody who worked both on ASTStructuralEquivalence and Objective-C part of clang?

Mar 22 2022, 7:16 PM · Restricted Project, Restricted Project
vsapsai updated the diff for D118525: [modules] Merge ObjC interface ivars with anonymous types..

Fix bug with anonymous enum constant lookup in C++.

Mar 22 2022, 7:13 PM · Restricted Project, Restricted Project, Restricted Project

Mar 17 2022

vsapsai added a comment to D121497: Lex: add support for `{,u}i128` Microsoft extension.

I don't know how "intsafe.h" looks like and how it is involved with the modules (it's not in winsdk.modulemap as far as I can tell). My immediate guess would be that "intsafe.h" doesn't include all the headers that are supposed to provide necessary macros. And if "intsafe.h" is in a separate module, for the code

#define SOME_MACRO 1
#include "intsafe.h"

"intsafe.h" won't see SOME_MACRO. That's how it can end up with different macro expansions. But that is just a guess (that can be waay wrong) and you could have checked this scenario already.

Mar 17 2022, 7:13 PM · Restricted Project, Restricted Project
vsapsai accepted D121588: [C++20][Modules][Driver][HU 1/N] Initial handling for -xc++-{system,user}-header..

Thanks for your patience and for all the explanations, I have no other comments.

Mar 17 2022, 6:47 PM · Restricted Project, Restricted Project
vsapsai added a comment to D121588: [C++20][Modules][Driver][HU 1/N] Initial handling for -xc++-{system,user}-header..

Thanks for explaining the desired interplay between PCH and PCM. The problem I'm seeing is that it can be hard to find correct compiler flags to achieve the desired result (what is enabled and what is disabled). But that is out of scope for this change.

Mar 17 2022, 4:44 PM · Restricted Project, Restricted Project

Mar 15 2022

vsapsai added a comment to D121465: WIP: [clang][modules] Do not report declarations without linkage as ambiguous.

My concern with this approach is I'm not sure if isEquivalentInternalLinkageDeclaration is a desired long-term solution for anonymous C++ enums. If it is, we can piggy-back on it, otherwise hitching our wagon to this train might be undesirable.

Mar 15 2022, 9:24 PM · Restricted Project, Restricted Project
vsapsai added a comment to D121588: [C++20][Modules][Driver][HU 1/N] Initial handling for -xc++-{system,user}-header..

Sorry, I'm pretty ignorant in this area but based on

The job construction is altered to build a C++20 header unit (rather than a PCH file, as would be the case for other headers).

Mar 15 2022, 8:55 PM · Restricted Project, Restricted Project

Mar 11 2022

vsapsai added a comment to D121177: [modules] Merge equivalent extensions and diagnose ivar redeclarations for extensions loaded from different modules..

I see it is guaranteed by lookupInstanceVariable(Identifier) now. I don't know much about ObjC. But I feel a little bit strange. Is it possible that two distinct variable with the same identifier in ObjC? If it is impossible, I think it might be OK.

Mar 11 2022, 5:57 PM · Restricted Project, Restricted Project
vsapsai added a comment to D121176: [ASTStructuralEquivalence] Add support for comparing ObjCCategoryDecl..

Basically, this looks good to me. But my confidence with ObjC is low, so, I'd like @shafik as well to approve.
Besides, seems like the pre-merge check fails with the new tests on Debian, could you please address that?

Mar 11 2022, 5:38 PM · Restricted Project, Restricted Project
vsapsai updated the diff for D121177: [modules] Merge equivalent extensions and diagnose ivar redeclarations for extensions loaded from different modules..

Address comments and make the tests use non-fragile ABI (it's not default everywhere).

Mar 11 2022, 5:35 PM · Restricted Project, Restricted Project
vsapsai updated the diff for D121176: [ASTStructuralEquivalence] Add support for comparing ObjCCategoryDecl..

Fix clang-format error.

Mar 11 2022, 12:08 PM · Restricted Project, Restricted Project

Mar 10 2022

vsapsai updated the diff for D121176: [ASTStructuralEquivalence] Add support for comparing ObjCCategoryDecl..

Fix tests on Debian by using -fobjc-nonfragile-abi explicitly as declaring ivars in extensions is supported only with non-fragile ABI.

Mar 10 2022, 7:34 PM · Restricted Project, Restricted Project

Mar 9 2022

vsapsai added a comment to D121177: [modules] Merge equivalent extensions and diagnose ivar redeclarations for extensions loaded from different modules..

Thanks for the review, Chuanqi! I believe you were touching recently isSameEntity. Do you have any concerns about using StructuralEquivalenceContext instead of isSameEntity? I've decided to go with StructuralEquivalenceContext because at this point we are still dealing with deserialization and deduplication while ASTContext::isSameEntity kinda assumes that all deduplication is already done, at least based on the comment

// Objective-C classes and protocols with the same name always match.
if (isa<ObjCInterfaceDecl>(X) || isa<ObjCProtocolDecl>(X))
  return true;
Mar 9 2022, 8:03 PM · Restricted Project, Restricted Project
vsapsai added a comment to D121176: [ASTStructuralEquivalence] Add support for comparing ObjCCategoryDecl..

check-lldb has the following tests failing

lldb-shell :: Expr/TestIRMemoryMap.test
lldb-shell :: Process/TestEnvironment.test
lldb-shell :: Register/x86-64-gp-read.test
lldb-shell :: Register/x86-64-read.test
lldb-shell :: Register/x86-64-ymm-read.test
lldb-shell :: Register/x86-multithread-read.test
lldb-shell :: Register/x86-multithread-write.test
Mar 9 2022, 5:03 PM · Restricted Project, Restricted Project
vsapsai updated the diff for D121176: [ASTStructuralEquivalence] Add support for comparing ObjCCategoryDecl..

Add a comment and an assertion.

Mar 9 2022, 4:59 PM · Restricted Project, Restricted Project

Mar 8 2022

vsapsai added inline comments to D121176: [ASTStructuralEquivalence] Add support for comparing ObjCCategoryDecl..
Mar 8 2022, 7:43 PM · Restricted Project, Restricted Project
vsapsai added a comment to D121176: [ASTStructuralEquivalence] Add support for comparing ObjCCategoryDecl..

Thanks for the reviews! I'm going to address the comments, check-lldb, check tests failing on Debian.

Mar 8 2022, 4:31 PM · Restricted Project, Restricted Project

Mar 7 2022

vsapsai updated subscribers of D121177: [modules] Merge equivalent extensions and diagnose ivar redeclarations for extensions loaded from different modules..
Mar 7 2022, 5:35 PM · Restricted Project, Restricted Project
vsapsai added a comment to D121177: [modules] Merge equivalent extensions and diagnose ivar redeclarations for extensions loaded from different modules..

The main alternative to the current implementation was to change getRedeclContext for ObjCCategoryDecl, so we handle ivar redeclarations and merges in ObjCInterfaceDecl with ASTDeclReader::findExisting. Decided against it because of noticeably different merging behavior:

  • should merge not any same-name ivars but only those located in equivalent extensions;
  • should error for incompatible same-name ivars;
  • should handle ObjCCategoryDecl too but we should check them not during their deserialization but after their ivars are deserialized.
Mar 7 2022, 5:35 PM · Restricted Project, Restricted Project
vsapsai requested review of D121177: [modules] Merge equivalent extensions and diagnose ivar redeclarations for extensions loaded from different modules..
Mar 7 2022, 5:23 PM · Restricted Project, Restricted Project
vsapsai requested review of D121176: [ASTStructuralEquivalence] Add support for comparing ObjCCategoryDecl..
Mar 7 2022, 5:15 PM · Restricted Project, Restricted Project
vsapsai planned changes to D118525: [modules] Merge ObjC interface ivars with anonymous types..
Mar 7 2022, 1:43 PM · Restricted Project, Restricted Project, Restricted Project

Feb 28 2022

vsapsai added inline comments to D118525: [modules] Merge ObjC interface ivars with anonymous types..
Feb 28 2022, 11:43 AM · Restricted Project, Restricted Project, Restricted Project

Feb 17 2022

vsapsai added a comment to D118525: [modules] Merge ObjC interface ivars with anonymous types..

Ping.

Feb 17 2022, 5:25 PM · Restricted Project, Restricted Project, Restricted Project