User Details
- User Since
- May 24 2017, 5:35 AM (340 w, 3 d)
Sep 13 2022
Jul 29 2022
Jul 28 2022
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.
Jun 8 2020
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 3 2020
@DmitryPolukhin Sorry, I didn't have time recently. Thanks a lot for taking care!
May 6 2020
@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 4 2020
@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"
Feb 18 2020
LGTM
Feb 16 2020
Please, upload patches with context (-U9999).
Jul 3 2019
ok, will do it through svn. i forgot that clang repo is called "cfe" so it's there
This script does not seem to work properly on windows.
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 2 2019
Jul 1 2019
Jun 28 2019
Sorry for delay.
Test added, redundant comments removed.
Jun 18 2019
Jun 5 2019
libclang part is quite small here and looks ok. I would just accept it
May 11 2019
Some misleading reformatting fixed.
Sorry for unrelated formatting changes - that's clang-format's work :)
@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 9 2019
@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 8 2019
@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 3 2019
Seems so.
Apr 29 2019
Apr 28 2019
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.
Could you please also upload diff with the full context? It's -U9999 for git and quite similar for svn.
Otherwise looks ok.
Apr 27 2019
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 25 2019
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 17 2019
Apr 15 2019
Apr 12 2019
New approach - title and summary are updated.
Mar 7 2019
Feb 22 2019
Feb 11 2019
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 8 2019
I've tested it with libclang. If something else is needed for proper clangd args forwarding - let me know.
Jan 11 2019
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 10 2019
Replace the absolute path with {{.*}} to be independent from the machine.
Jan 9 2019
Good point :)
Jan 7 2019
@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.
Dec 13 2018
Dec 12 2018
Add standard prologue to the new header
Dec 10 2018
Dec 7 2018
We can also add an extra variable for it if you care about build time
I generated the wrong diff. This is the proper one.
Dec 4 2018
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 3 2018
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.
Ok, no global option.
Why not placing your VolatileFSProvider in clang so that libclang could you it too?
Instead of forcing some default value let's give the client an ability to force disabled mmap if one desires.
Nov 30 2018
@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.
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 29 2018
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.
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 28 2018
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.
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