Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline

yvvan (Ivan Donchevskii)
User

Projects

User does not belong to any projects.

User Details

User Since
May 24 2017, 5:35 AM (340 w, 3 d)

Recent Activity

Sep 13 2022

yvvan added inline comments to rG72142fbac496: [clangd] Fix hover crashing on integral or enumeral casts.
Sep 13 2022, 4:59 AM · Restricted Project, Restricted Project

Jul 29 2022

yvvan added a comment to D129973: [clang] Pass FoundDecl to DeclRefExpr creator for operator overloads.

With this change we don't pass "LocInfo" directly and it seems to break the locations when calling "getCXXOperatorNameRange" for this DeclRefExpr later on. Please fix it. You can introduce another "Create" static method for DeclRefExpr that accepts LocInfo and passes it to the DeclarationNameInfo constructor.

Thank you for the hint! This indeed "fixes" the test references so that they can be reverted to their original state. This is done in D130799.

Instead of a new create method or a new constructor (there are already quite a lot of them with complex signatures), I created a DeclarationNameInfo and passed it to one of the existing creators.

Jul 29 2022, 2:50 PM · Restricted Project, Restricted Project, Restricted Project

Jul 28 2022

yvvan added a comment to D129973: [clang] Pass FoundDecl to DeclRefExpr creator for operator overloads.

With this change we don't pass "LocInfo" directly and it seems to break the locations when calling "getCXXOperatorNameRange" for this DeclRefExpr later on. Please fix it. You can introduce another "Create" static method for DeclRefExpr that accepts LocInfo and passes it to the DeclarationNameInfo constructor.

Jul 28 2022, 6:35 AM · Restricted Project, Restricted Project, Restricted Project

Jun 8 2020

yvvan added a comment to D81263: [Sema][CodeComplete][ObjC] Don't include arrow/dot fixits.

I'm not a big objC expert here. The idea looks fine to me and won't affect my workflow. So let's take this patch if nobody comments against it here.

Jun 8 2020, 1:35 AM · Restricted Project
yvvan added a reviewer for D81263: [Sema][CodeComplete][ObjC] Don't include arrow/dot fixits: ilya-biryukov.
Jun 8 2020, 1:35 AM · Restricted Project

Jun 3 2020

yvvan added a comment to D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value.

@DmitryPolukhin Sorry, I didn't have time recently. Thanks a lot for taking care!

Jun 3 2020, 11:57 PM · Restricted Project

May 6 2020

yvvan added a comment to D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value.

@mgehre I think we need to adjust denormalize(const IO &) method here to convert \n back properly. It seems I missed it in my patch.

May 6 2020, 1:02 AM · Restricted Project

May 4 2020

yvvan added a comment to D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value.

@mgehre From your comment it seems that clang-apply-replacements handles the YAML wrong and does not make the proper conversion back from "\n\n" to "\n"

May 4 2020, 2:05 AM · Restricted Project

Feb 18 2020

yvvan accepted D74564: libclang: Add static build support for Windows.

LGTM

Feb 18 2020, 12:06 AM · Restricted Project

Feb 16 2020

yvvan added a comment to D74564: libclang: Add static build support for Windows.

Please, upload patches with context (-U9999).

Feb 16 2020, 11:27 PM · Restricted Project

Jul 3 2019

yvvan committed rG080014ee6dfa: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value (authored by yvvan).
[clang-tidy] Fix the YAML created for checks like modernize-pass-by-value
Jul 3 2019, 3:24 AM
yvvan committed rL365017: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value.
[clang-tidy] Fix the YAML created for checks like modernize-pass-by-value
Jul 3 2019, 3:21 AM
yvvan closed D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value.
Jul 3 2019, 3:21 AM · Restricted Project
yvvan added a comment to D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value.

ok, will do it through svn. i forgot that clang repo is called "cfe" so it's there

Jul 3 2019, 3:11 AM · Restricted Project
yvvan added a comment to D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value.

This script does not seem to work properly on windows.

Jul 3 2019, 2:52 AM · Restricted Project
yvvan added a comment to D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value.

I have a commit access but I don't understand how am I supposed to commit (haven't done that for a while). There's no clang svn repo anymore. Do you know what's the current state of repositories and where to commit?

Jul 3 2019, 1:23 AM · Restricted Project

Jul 2 2019

yvvan updated the diff for D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value.
Jul 2 2019, 12:40 AM · Restricted Project
yvvan added inline comments to D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value.
Jul 2 2019, 12:33 AM · Restricted Project

Jul 1 2019

yvvan added inline comments to D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value.
Jul 1 2019, 10:57 PM · Restricted Project

Jun 28 2019

yvvan updated the diff for D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value.

Sorry for delay.
Test added, redundant comments removed.

Jun 28 2019, 7:23 AM · Restricted Project

Jun 18 2019

yvvan created D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value.
Jun 18 2019, 3:14 AM · Restricted Project

Jun 5 2019

yvvan accepted D48116: [libclang] Allow skipping warnings from all included files.

libclang part is quite small here and looks ok. I would just accept it

Jun 5 2019, 4:02 AM · Restricted Project, Restricted Project

May 11 2019

yvvan retitled D53072: [clang-format] Add a new extra command line option for ide-specific formatting from [clang-format] Create a new tool for IDEs based on clang-format to [clang-format] Add a new extra command line option for ide-specific formatting.
May 11 2019, 12:03 PM · Restricted Project
yvvan updated the diff for D53072: [clang-format] Add a new extra command line option for ide-specific formatting.

Some misleading reformatting fixed.

May 11 2019, 11:55 AM · Restricted Project
yvvan updated the diff for D53072: [clang-format] Add a new extra command line option for ide-specific formatting.

Sorry for unrelated formatting changes - that's clang-format's work :)

May 11 2019, 11:42 AM · Restricted Project
yvvan added a comment to D53072: [clang-format] Add a new extra command line option for ide-specific formatting.

@sammccall
I can't avoid adding extra formatting options because my first attempt to introduce an ordinary clang-format option faced resistance because of not fitting the clang-format purpose to format files.

May 11 2019, 6:48 AM · Restricted Project

May 9 2019

yvvan added a comment to D53072: [clang-format] Add a new extra command line option for ide-specific formatting.

My feedback would be:

  • I definitely think more control over preserving line breaks would be useful. Actually preserving *blank* lines is an important property. If you see D60605, there are a lot of cases where clang-format wants to delete the line you just added. Maybe we can make MaxEmptyLinesToKeep: 9999999 work in more cases.
  • I'm not convinced you need/want to preserve *all* line breaks, isn't it just one? (where the user pressed enter)
  • It's unclear why "extraformattingoptions" is needed, rather than just the usual formatting options, or some other parameter. It would be nice to avoid a new library entry point (overload) if possible.
  • as far as command-line interface goes, this definitely feels more like a flag than a new tool
May 9 2019, 11:00 AM · Restricted Project
yvvan added a comment to D53072: [clang-format] Add a new extra command line option for ide-specific formatting.

@ilya-biryukov
I don't really care how it's used from the tool side. I'm also fine to have a new option in clang-format itself. That's why this review is here - to ask for opinions. It's easy to remove that "ide" part from this patch and just add an option for clang-format instead.
Do you have any other remarks/concerns apart from that?

May 9 2019, 4:48 AM · Restricted Project

May 8 2019

yvvan added a comment to D60605: [clangd] Revamp textDocument/onTypeFormatting..

@ilya-biryukov
What do you think about D53072? It can be polished and combined with this change removing some code from here (which I assume is a good thing).
The idea there is that clang-format knows that it's not allowed to remove new lines and it always marks them with MustBreakBefore.
I'm not sure if anybody needs an executable but I think it's not a big deal to have an extra reformat() function.

May 8 2019, 8:56 AM · Restricted Project, Restricted Project

May 3 2019

yvvan added a comment to D60678: [libclang] Forward isInline for NamespaceDecl to libclang.

Seems so.

May 3 2019, 7:58 AM · Restricted Project

Apr 29 2019

yvvan committed rG3209f46384b8: [libclang] Add missing export for clang_Cursor_isAnonymousRecordDecl (authored by yvvan).
[libclang] Add missing export for clang_Cursor_isAnonymousRecordDecl
Apr 29 2019, 7:15 AM
yvvan committed rC359453: [libclang] Add missing export for clang_Cursor_isAnonymousRecordDecl.
[libclang] Add missing export for clang_Cursor_isAnonymousRecordDecl
Apr 29 2019, 7:15 AM
yvvan committed rL359453: [libclang] Add missing export for clang_Cursor_isAnonymousRecordDecl.
[libclang] Add missing export for clang_Cursor_isAnonymousRecordDecl
Apr 29 2019, 7:15 AM
yvvan committed rC359448: [libclang] Restore old clang_Cursor_isAnonymous behaviour.
[libclang] Restore old clang_Cursor_isAnonymous behaviour
Apr 29 2019, 6:45 AM
yvvan committed rG50be573ed207: [libclang] Restore old clang_Cursor_isAnonymous behaviour (authored by yvvan).
[libclang] Restore old clang_Cursor_isAnonymous behaviour
Apr 29 2019, 6:45 AM
yvvan committed rL359448: [libclang] Restore old clang_Cursor_isAnonymous behaviour.
[libclang] Restore old clang_Cursor_isAnonymous behaviour
Apr 29 2019, 6:45 AM
yvvan closed D61232: [libclang] Restore old clang_Cursor_isAnonymous behaviour.
Apr 29 2019, 6:45 AM · Restricted Project, Restricted Project
yvvan accepted D61232: [libclang] Restore old clang_Cursor_isAnonymous behaviour.
Apr 29 2019, 5:26 AM · Restricted Project, Restricted Project

Apr 28 2019

yvvan added a comment to D61232: [libclang] Restore old clang_Cursor_isAnonymous behaviour.

Thank you! Sorry that I forgot about the required minor version increment.
I will run tests tomorrow and then I can commit it for you.

Apr 28 2019, 1:36 PM · Restricted Project, Restricted Project
yvvan added a comment to D61232: [libclang] Restore old clang_Cursor_isAnonymous behaviour.

Could you please also upload diff with the full context? It's -U9999 for git and quite similar for svn.
Otherwise looks ok.

Apr 28 2019, 12:09 AM · Restricted Project, Restricted Project

Apr 27 2019

yvvan added a comment to D61232: [libclang] Restore old clang_Cursor_isAnonymous behaviour.

Now we know that somebody else also uses libclang :)
I the mentioned change I only wanted to follow the same logic as in TypePrinter::printTag to cover more anonymity cases.

Apr 27 2019, 12:21 PM · Restricted Project, Restricted Project

Apr 25 2019

yvvan added a comment to D53072: [clang-format] Add a new extra command line option for ide-specific formatting.

Having a separate tool is nice because it allows the client to make it plugable. clang-format sometimes changes options quite significantly and it can be nice if you have a choice which version to pick, otherwise it might be unable to read the configuration you have.

Apr 25 2019, 6:05 AM · Restricted Project

Apr 17 2019

yvvan added reviewers for D53072: [clang-format] Add a new extra command line option for ide-specific formatting: Dmitry.Kozhevnikov, ilya-biryukov.
Apr 17 2019, 12:42 AM · Restricted Project

Apr 15 2019

yvvan added a reviewer for D53072: [clang-format] Add a new extra command line option for ide-specific formatting: marcobubke.
Apr 15 2019, 5:26 AM · Restricted Project
yvvan updated subscribers of D60678: [libclang] Forward isInline for NamespaceDecl to libclang.
Apr 15 2019, 3:03 AM · Restricted Project
yvvan created D60678: [libclang] Forward isInline for NamespaceDecl to libclang.
Apr 15 2019, 3:03 AM · Restricted Project

Apr 12 2019

yvvan updated the diff for D53072: [clang-format] Add a new extra command line option for ide-specific formatting.

New approach - title and summary are updated.

Apr 12 2019, 5:25 AM · Restricted Project

Mar 7 2019

yvvan committed rG878271b2945e: [libclang] Fix CXTranslationUnit_KeepGoing (authored by yvvan).
[libclang] Fix CXTranslationUnit_KeepGoing
Mar 7 2019, 2:15 AM
yvvan committed rC355586: [libclang] Fix CXTranslationUnit_KeepGoing.
[libclang] Fix CXTranslationUnit_KeepGoing
Mar 7 2019, 2:14 AM
yvvan committed rL355586: [libclang] Fix CXTranslationUnit_KeepGoing.
[libclang] Fix CXTranslationUnit_KeepGoing
Mar 7 2019, 2:14 AM
yvvan closed D58501: [libclang] Fix CXTranslationUnit_KeepGoing.
Mar 7 2019, 2:14 AM · Restricted Project, Restricted Project

Feb 22 2019

yvvan accepted D58501: [libclang] Fix CXTranslationUnit_KeepGoing.
Feb 22 2019, 2:37 AM · Restricted Project, Restricted Project

Feb 11 2019

yvvan abandoned D57951: [Lex] Allow to set missing include error to not fatal.
Feb 11 2019, 2:12 AM
yvvan planned changes to D57951: [Lex] Allow to set missing include error to not fatal.

It's probably not needed because I don't see a path which checked for the fatal errors in 8.0. So i will probably abandon this one or update if it does not cover the case I need.

Feb 11 2019, 12:30 AM

Feb 8 2019

yvvan added a comment to D57951: [Lex] Allow to set missing include error to not fatal.

I've tested it with libclang. If something else is needed for proper clangd args forwarding - let me know.

Feb 8 2019, 6:48 AM
yvvan created D57951: [Lex] Allow to set missing include error to not fatal.
Feb 8 2019, 6:47 AM

Jan 11 2019

yvvan updated the diff for D53072: [clang-format] Add a new extra command line option for ide-specific formatting.

The tests are improved - now they actually act differently with and without the introduced flag. Also few more cases are covered (see the second added test).

Jan 11 2019, 7:48 AM · Restricted Project

Jan 10 2019

yvvan committed rC350805: [libclang] Fix clang_Cursor_isAnonymous.
[libclang] Fix clang_Cursor_isAnonymous
Jan 10 2019, 1:40 AM
yvvan committed rL350805: [libclang] Fix clang_Cursor_isAnonymous.
[libclang] Fix clang_Cursor_isAnonymous
Jan 10 2019, 1:39 AM
yvvan closed D54996: [libclang] Fix clang_Cursor_isAnonymous.
Jan 10 2019, 1:39 AM · Restricted Project
yvvan updated the diff for D54996: [libclang] Fix clang_Cursor_isAnonymous.

Replace the absolute path with {{.*}} to be independent from the machine.

Jan 10 2019, 1:14 AM · Restricted Project

Jan 9 2019

yvvan added a comment to D54996: [libclang] Fix clang_Cursor_isAnonymous.

Good point :)

Jan 9 2019, 11:36 PM · Restricted Project

Jan 7 2019

yvvan added a comment to D53072: [clang-format] Add a new extra command line option for ide-specific formatting.

@djasper
Ok, if there's a possible way to go forward I will find time to provide a better test which behaves differently depending on this check. Also my current patch is a bit bigger than this version.

Jan 7 2019, 4:50 AM · Restricted Project
yvvan added a comment to D53072: [clang-format] Add a new extra command line option for ide-specific formatting.
$ cat /tmp/test.cc
int foo(int a,
           int b) {
      f();
  }

$ clang-format -style="{ColumnLimit: 0}" /tmp/test.cc
int foo(int a,
        int b) {
  f();
}

Is this not what you want? If so, in what way?

Jan 7 2019, 4:42 AM · Restricted Project
yvvan added a comment to D53072: [clang-format] Add a new extra command line option for ide-specific formatting.

I don't quite understand. What you are describing should already be the behavior with ColumnLimit=0 and I think your test should pass without the new option. Doesn't it?

Jan 7 2019, 3:43 AM · Restricted Project

Dec 13 2018

yvvan committed rCTE349132: [clang-tidy] Remove extra config.h includes.
[clang-tidy] Remove extra config.h includes
Dec 13 2018, 11:48 PM
yvvan committed rL349132: [clang-tidy] Remove extra config.h includes.
[clang-tidy] Remove extra config.h includes
Dec 13 2018, 11:48 PM
yvvan added inline comments to D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin.
Dec 13 2018, 11:43 PM · Restricted Project
yvvan committed rCTE349131: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin.
[clang-tidy] Share the forced linking code between clang-tidy tool and plugin
Dec 13 2018, 11:32 PM
yvvan committed rL349131: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin.
[clang-tidy] Share the forced linking code between clang-tidy tool and plugin
Dec 13 2018, 11:32 PM
yvvan added inline comments to D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin.
Dec 13 2018, 11:27 PM · Restricted Project
yvvan added inline comments to D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin.
Dec 13 2018, 12:08 PM · Restricted Project
yvvan added inline comments to D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin.
Dec 13 2018, 12:00 PM · Restricted Project
yvvan committed rL349038: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin.
[clang-tidy] Share the forced linking code between clang-tidy tool and plugin
Dec 13 2018, 6:41 AM
yvvan committed rCTE349038: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin.
[clang-tidy] Share the forced linking code between clang-tidy tool and plugin
Dec 13 2018, 6:41 AM
yvvan closed D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin.
Dec 13 2018, 6:41 AM · Restricted Project
yvvan added a comment to D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin.

One thing: Could you please check the utility-scripts in clang-tidy that create new checks, if they need adjustments? Not sure if we have something in there that relies on the old structure.

Dec 13 2018, 6:18 AM · Restricted Project

Dec 12 2018

yvvan updated the diff for D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin.

Add standard prologue to the new header

Dec 12 2018, 3:06 AM · Restricted Project
yvvan updated the diff for D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin.
Dec 12 2018, 2:22 AM · Restricted Project
yvvan planned changes to D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin.
  1. Please always upload all patches with full context.
  2. There are two places where this pattern exists - this file, and tool/ClangTidyMain.cpp. It clearly leads to such issues, Can this be reworked to be just one file that is simply included in both places?
Dec 12 2018, 1:54 AM · Restricted Project
yvvan created D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin.
Dec 12 2018, 1:40 AM · Restricted Project

Dec 10 2018

yvvan committed rC348764: [libclang] Revert removal of tidy plugin support from libclang introduced in….
[libclang] Revert removal of tidy plugin support from libclang introduced in…
Dec 10 2018, 8:02 AM
yvvan committed rL348764: [libclang] Revert removal of tidy plugin support from libclang introduced in….
[libclang] Revert removal of tidy plugin support from libclang introduced in…
Dec 10 2018, 8:02 AM
yvvan closed D55415: Revert removal of tidy plugin support from libclang.
Dec 10 2018, 8:02 AM

Dec 7 2018

yvvan added a comment to D55415: Revert removal of tidy plugin support from libclang.

I'd be interested in hearing how this is used. I added this feature as an experiment a while back but it simply didn't work as I envisioned it to. Some checks do work but the overall latency makes it unusable in an IDE setting. People repeatedly asked me to remove it because it slows down builds while not adding value.

Dec 7 2018, 7:15 AM
yvvan added a comment to D55415: Revert removal of tidy plugin support from libclang.

We can also add an extra variable for it if you care about build time

Dec 7 2018, 12:46 AM
yvvan updated the diff for D55415: Revert removal of tidy plugin support from libclang.

I generated the wrong diff. This is the proper one.

Dec 7 2018, 12:17 AM
yvvan created D55415: Revert removal of tidy plugin support from libclang.
Dec 7 2018, 12:16 AM

Dec 4 2018

yvvan abandoned D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap.

The fact that so many call-sites decide what to do is pretty error-prone.
There was already at least one issue when this flag was not properly set by some of the call-sites.

Dec 4 2018, 1:05 AM

Dec 3 2018

yvvan added a comment to D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap.

Hm. What about another way around? - We have user include paths (-I) and report them to the filesystem. This means that we have specific paths under which nothing can be mmaped and everything else can be. In particular cases we can also report -isystem there. This is quite the same logic as current isVolatile parameter but is set only once for each path.

Dec 3 2018, 7:34 AM
yvvan added a comment to D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap.

Ok, no global option.
Why not placing your VolatileFSProvider in clang so that libclang could you it too?

Would be happy to, will need to figure out what to do with PCH and PCM files first. However if we do this on clang level, I believe we should remove the isVolatile flag from the VFS interfaces in the first place.
It would be nice to not loose out on the opportunity to avoid fully loading the PCH files, but that obviously requires passing some flags into the VFS implementation or various hacks (matching on filenames/extensions?) to find out which files are PCHs.
I actually don't know which approach to choose: on one hand, I'd really want to get rid of the isVolatile flag, on the other hand I'd really want to avoid loading large binary files into memory and that requires passing the flags.

Dec 3 2018, 4:09 AM
yvvan planned changes to D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap.

Ok, no global option.
Why not placing your VolatileFSProvider in clang so that libclang could you it too?

Dec 3 2018, 3:37 AM
yvvan added inline comments to D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap.
Dec 3 2018, 1:34 AM
yvvan updated the diff for D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap.

Instead of forcing some default value let's give the client an ability to force disabled mmap if one desires.

Dec 3 2018, 1:19 AM

Nov 30 2018

yvvan added a comment to D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap.

@ilya-biryukov
What do you think about the global settable bool in MemoryBuffer in place of the ifdef from https://reviews.llvm.org/D35200 ? In this case the client on Windows can set it and you're safe that any MemoryBuffer call never mmaps.

Nov 30 2018, 12:54 PM
yvvan added a comment to D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap.

No success with unmapping. Buffers are hold by PCMCache in Preprocessor (and the same one in ASTReader) and if I clean them then SourceManger crashed sooner or later on some call that gets data from external files.
So far I have no steps to reproduce the lock on user file so I don't currently know if I try something else.

Nov 30 2018, 1:31 AM

Nov 29 2018

yvvan added a comment to D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap.

I'm currently trying out another suggestion - which unmaps memory buffer caches after ASTUnit's Parse or Reparse and is limited to Windows only.
And my aim currently is not only clangd but any other client as well.

Nov 29 2018, 7:10 AM
yvvan added a comment to D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap.

According to https://msdn.microsoft.com/en-us/2e9c3174-af48-4fa3-9f6a-fb62b23ed994 - "Unmapping a mapped view of a file invalidates the range occupied by the view in the address space of the process and makes the range available for other allocations".
Also as far as i understand from https://msdn.microsoft.com/en-us/library/ms810613.aspx mapped files can only be edited in other apps as mapped files opened with the same name (OpenFileMapping).

Nov 29 2018, 1:26 AM

Nov 28 2018

yvvan added a comment to D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap.

To clarify a little bit - i did not write my own simple app but used libclang in qt creator to reproduce the lock and track the issue. This time I hope to go further, collect flags used by clang and make a simple example.

Nov 28 2018, 9:40 AM
yvvan added a comment to D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap.

I was able to lock files last time with mmap. The Windows API calls are CreateFileMappingW (it's in the Path.inc, line 794) and MapViewOfFile (further down). As far as I remember the second call actually creates the lock and is freed only by UnmapViewOfFile in destructor

Nov 28 2018, 7:53 AM