Page MenuHomePhabricator

nik (Nikolai Kosjar)
User

Projects

User does not belong to any projects.

User Details

User Since
May 9 2017, 8:22 AM (83 w, 3 d)

Recent Activity

Fri, Dec 7

nik added a comment to D48116: [libclang] Allow skipping warnings from all included files.

Have you considered doing the same filtering in ASTUnit's StoredDiagnosticConsumer? It should not be more difficult and allows to avoid changing the clang's diagnostic interfaces. That's what we do in clangd.

Fri, Dec 7, 4:04 AM
nik added a comment to D55415: Revert removal of tidy plugin support from libclang.

+1 as this seems to fix the regression.

Fri, Dec 7, 12:45 AM

Thu, Dec 6

nik added a comment to D48116: [libclang] Allow skipping warnings from all included files.

Have you considered doing the same filtering in ASTUnit's StoredDiagnosticConsumer? It should not be more difficult and allows to avoid changing the clang's diagnostic interfaces. That's what we do in clangd.

Thu, Dec 6, 8:35 AM
nik updated the diff for D41005: Reuse preamble even if an unsaved file does not exist.

Addressed comments.

Thu, Dec 6, 6:16 AM
nik added inline comments to D41005: Reuse preamble even if an unsaved file does not exist.
Thu, Dec 6, 6:16 AM
nik updated the diff for D53866: [Preamble] Stop generating preamble for circular #includes.

Added a dedicated diagnostic.

Thu, Dec 6, 2:26 AM
nik added inline comments to D53866: [Preamble] Stop generating preamble for circular #includes.
Thu, Dec 6, 2:26 AM

Wed, Dec 5

nik retitled D53866: [Preamble] Stop generating preamble for circular #includes from [Preamble] Fix preamble for circular #includes to [Preamble] Stop generating preamble for circular #includes.
Wed, Dec 5, 7:29 AM
nik updated the diff for D53866: [Preamble] Stop generating preamble for circular #includes.

Addressed comments.

Wed, Dec 5, 7:27 AM
nik added inline comments to D53866: [Preamble] Stop generating preamble for circular #includes.
Wed, Dec 5, 7:27 AM

Mon, Dec 3

nik added a comment to D41005: Reuse preamble even if an unsaved file does not exist.

Ping.

Mon, Dec 3, 7:22 AM
nik added a comment to D53866: [Preamble] Stop generating preamble for circular #includes.

Ping.

Mon, Dec 3, 7:21 AM

Sun, Dec 2

nik added a comment to D55139: [clangd] Avoid memory-mapping files on Windows.

Please fix this also for libclang clients. I think it's safe to assume that files might be edited once CXTranslationUnit_PrecompiledPreamble or CXTranslationUnit_CacheCompletionResults is set as flag - that's what clang_defaultEditingTranslationUnitOptions() returns.

Sun, Dec 2, 11:59 PM

Mon, Nov 26

nik added a comment to D41005: Reuse preamble even if an unsaved file does not exist.

Ping.

Mon, Nov 26, 3:29 AM
nik updated the diff for D53866: [Preamble] Stop generating preamble for circular #includes.

Maybe produce a fatal error in the preprocessor? That seems to be the simplest option: the preprocessor is aware it's building the preamble and there's definitely some logic to produce fatal errors in other cases (include not found).
A fatal error currently aborts other stages of the compilation pipeline and producing one would make the run of the compiler that tries to produce the preamble fail, giving the empty preamble as a result.

Mon, Nov 26, 1:56 AM

Fri, Nov 16

nik added a comment to D53866: [Preamble] Stop generating preamble for circular #includes.

I still don't have feedback for a real world case except "unintentional #include". Unfortunately, in real world cases the cyclic include might be not obvious at all.

Fri, Nov 16, 6:46 AM

Nov 14 2018

nik abandoned D54523: [Preamble] Reuse preamble even if an unsaved file does not exist.
Nov 14 2018, 5:39 AM
nik updated the diff for D41005: Reuse preamble even if an unsaved file does not exist.

Addressed comments.

Nov 14 2018, 5:38 AM
nik created D54523: [Preamble] Reuse preamble even if an unsaved file does not exist.
Nov 14 2018, 5:35 AM
nik added a comment to D41005: Reuse preamble even if an unsaved file does not exist.

Before this change, this was not a problem because OverriddenFiles were keyed on Status.getUniqueID(). Starting with this change, the key is the file path.

I suggest keeping two maps for overridden files: one for existing files (key is UniqueID), another one for the ones that don't exist (key is the file path).

Nov 14 2018, 5:34 AM

Nov 12 2018

nik added a comment to D41005: Reuse preamble even if an unsaved file does not exist.

Ping.

Nov 12 2018, 7:06 AM

Nov 6 2018

nik added a comment to D41005: Reuse preamble even if an unsaved file does not exist.

Coming back to this one, I see a failing test: PCHPreambleTest.ReparseWithOverriddenFileDoesNotInvalidatePreamble

Nov 6 2018, 7:20 AM
nik added a comment to D54077: [clangd] Implemented DraftFileSystem.
In D54077#1288413, @nik wrote:

If it helps (and the LSP allows it): In case A.h is edited, we flag it dirty. If the user makes some file depending on it visible (or the current file), we trigger a reparse for that. Not sure whether the LSP has a notion of current or visible files...

Nov 6 2018, 1:59 AM
nik added a comment to D54077: [clangd] Implemented DraftFileSystem.

I would be very happy if A.cc can see the unsaved A.h when I am editing A.cc.

Nov 6 2018, 1:55 AM

Nov 1 2018

nik added a comment to D53866: [Preamble] Stop generating preamble for circular #includes.

I've only the minimal example at hand right know - I'm waiting for feedback about the real world case.

Nov 1 2018, 2:09 AM

Oct 31 2018

nik added a comment to D53866: [Preamble] Stop generating preamble for circular #includes.

Why does resetting the conditional stack is the right thing to do here?

Oct 31 2018, 4:22 AM

Oct 30 2018

nik updated subscribers of D53866: [Preamble] Stop generating preamble for circular #includes.
Oct 30 2018, 8:08 AM
nik added reviewers for D53866: [Preamble] Stop generating preamble for circular #includes: erikjv, ilya-biryukov.
Oct 30 2018, 7:13 AM
nik created D53866: [Preamble] Stop generating preamble for circular #includes.
Oct 30 2018, 7:12 AM

Jun 13 2018

nik accepted D46862: [libclang] Optionally add code completion results for arrow instead of dot.
Jun 13 2018, 4:50 AM
nik added inline comments to D46862: [libclang] Optionally add code completion results for arrow instead of dot.
Jun 13 2018, 3:05 AM
nik updated the diff for D48116: [libclang] Allow skipping warnings from all included files.

Addressed comments.

Jun 13 2018, 2:52 AM
nik added reviewers for D48116: [libclang] Allow skipping warnings from all included files: yvvan, ilya-biryukov, bkramer, akyrtzi.
Jun 13 2018, 1:41 AM
nik created D48116: [libclang] Allow skipping warnings from all included files.
Jun 13 2018, 12:44 AM

Jun 6 2018

nik added a comment to D46862: [libclang] Optionally add code completion results for arrow instead of dot.
  • Sometimes you refer to "fixits", sometimes "fix-its" and some times "FixIts". Unify to what is already there.
  • The term "completion items" is new so far. Use "completions" for consistency.
Jun 6 2018, 3:32 AM
nik requested changes to D46862: [libclang] Optionally add code completion results for arrow instead of dot.
Jun 6 2018, 3:28 AM

Jun 1 2018

nik added a comment to rL333735: [CodeComplete] Add a few extra tests for r333538. NFC.

Thanks!

Jun 1 2018, 3:09 AM

May 30 2018

nik added a comment to D44480: [Sema] Don't skip function bodies with 'auto' without trailing return type.

Does getAs<AutoType>() work correctly with function returning auto&?

May 30 2018, 11:53 PM
nik added a comment to D44480: [Sema] Don't skip function bodies with 'auto' without trailing return type.

I've stumbled about this bug too and was looking into it and then I saw the mail about this change being submitted :)

May 30 2018, 8:39 AM

May 29 2018

nik requested changes to D46862: [libclang] Optionally add code completion results for arrow instead of dot.

Generates build errors here:

May 29 2018, 2:55 AM

May 16 2018

nik added a comment to D46050: [Frontend] Avoid running plugins during code completion parse.

If this is fine now, please submit as I don't have the permissions to do so.

May 16 2018, 12:39 AM
nik updated the diff for D46050: [Frontend] Avoid running plugins during code completion parse.

Addressed inline nit.

May 16 2018, 12:38 AM

May 11 2018

nik added a comment to D46050: [Frontend] Avoid running plugins during code completion parse.

Ping

May 11 2018, 12:04 AM

May 8 2018

nik updated the summary of D45815: [libclang] Allow skipping function bodies in preamble only.
May 8 2018, 2:09 AM
nik added inline comments to D45815: [libclang] Allow skipping function bodies in preamble only.
May 8 2018, 1:56 AM
nik updated the diff for D45815: [libclang] Allow skipping function bodies in preamble only.

Addressed comments.

May 8 2018, 1:56 AM

May 7 2018

nik added a comment to D46050: [Frontend] Avoid running plugins during code completion parse.

OK, the issue with the test dependencies I've had is resolved by https://reviews.llvm.org/D46514

May 7 2018, 11:33 PM
nik added a comment to D46514: [lit] Fix running tests that require 'examples'.

I have no permissions to submit, please do this for me.

May 7 2018, 11:18 PM
nik added a comment to D40481: [libclang] Fix cursors for arguments of Subscript and Call operators.

Ping.

May 7 2018, 12:26 AM
nik created D46514: [lit] Fix running tests that require 'examples'.
May 7 2018, 12:12 AM
nik updated the diff for D46050: [Frontend] Avoid running plugins during code completion parse.

Moved the test to "Index".

May 7 2018, 12:10 AM
nik added inline comments to D46050: [Frontend] Avoid running plugins during code completion parse.
May 7 2018, 12:10 AM

May 3 2018

nik added a comment to D45815: [libclang] Allow skipping function bodies in preamble only.

Do I miss something? I've uploaded a new diff/version and state is still "(X) Requested Changes to Prior Diff".

May 3 2018, 11:58 PM

Apr 27 2018

nik added a comment to D45815: [libclang] Allow skipping function bodies in preamble only.

OK, to skip all function bodies in the preamble except for template functions and functions within a template class, I've amended the previous diff with:

Apr 27 2018, 7:30 AM
nik added a comment to D45815: [libclang] Allow skipping function bodies in preamble only.

Trying to format the diff in the previous comment:

Apr 27 2018, 7:30 AM
nik added inline comments to D45815: [libclang] Allow skipping function bodies in preamble only.
Apr 27 2018, 7:18 AM
nik retitled D45815: [libclang] Allow skipping function bodies in preamble only from [libclang] Add options to limit skipping of function bodies to [libclang] Allow skipping function bodies in preamble only.
Apr 27 2018, 2:43 AM
nik added a comment to D45815: [libclang] Allow skipping function bodies in preamble only.

OK, I've rechecked this change. I don't see any obvious mistake :)

I think I got to the bottom of it. We didn't expect a big win, because we expect people to not put their non-template code into the header files. Which is probably true.
The problem with our reasoning, is that this patch also skip bodies of non-template functions inside template classes, e.g.

template <class T>
struct vector {
   template <class It>
   void append(T* pos, It begin, It end) {
        / * This function won't be skipped, it is a template. */ 
   }

   void push_back(T const&) {
        /* However, this function will be skipped! It is not a template! */
   }
};

So it's not surprising that we get a big win. Template function are (probably) much more rare than non-template functions inside templates.

Apr 27 2018, 2:42 AM
nik updated the diff for D45815: [libclang] Allow skipping function bodies in preamble only.

Reduction to skip-in-preamble-only functionality.

Apr 27 2018, 2:42 AM

Apr 26 2018

nik updated the summary of D46050: [Frontend] Avoid running plugins during code completion parse.
Apr 26 2018, 3:53 AM
nik added inline comments to D46050: [Frontend] Avoid running plugins during code completion parse.
Apr 26 2018, 2:46 AM
nik updated the diff for D46050: [Frontend] Avoid running plugins during code completion parse.

Added a test and clarified scenario in commit message.

Apr 26 2018, 2:37 AM
nik added a comment to D46050: [Frontend] Avoid running plugins during code completion parse.

Seems reasonable; can you add a test for this (maybe somewhere in clang/test/Frontend/plugin*)?

Apr 26 2018, 2:36 AM

Apr 25 2018

nik updated the diff for D46050: [Frontend] Avoid running plugins during code completion parse.

only clang-format fixes

Apr 25 2018, 3:34 AM
nik added reviewers for D46050: [Frontend] Avoid running plugins during code completion parse: john.brawn, thakis, yvvan.
Apr 25 2018, 3:23 AM
nik created D46050: [Frontend] Avoid running plugins during code completion parse.
Apr 25 2018, 3:23 AM

Apr 24 2018

nik updated the diff for D45815: [libclang] Allow skipping function bodies in preamble only.

Addressed inline comments.

Apr 24 2018, 7:03 AM
nik added a comment to D45815: [libclang] Allow skipping function bodies in preamble only.
In D45815#1073581, @nik wrote:

Hmm, that indicates that template function bodies are actually not that
dominant, which I also haven't thought. Now I'm doubting the correctness of
my patch/tests.

The numbers are definitely interesting, we need to double-check if that it's the case. But they definitely make a good point for including this option.
It seems Qt and LLVM are exactly the types of codebases where skipping the templates doesn't bring much value, as most of the code is not templated. On the other hand, skipping inline function might potentially be a win for those.

I'm still tempted to say that we should either skip all bodies or none of them to keep the code simpler, but I see why having errors from template instantiations is preferable.

Apr 24 2018, 7:03 AM
nik added a reviewer for D45815: [libclang] Allow skipping function bodies in preamble only: erikjv.
Apr 24 2018, 1:46 AM

Apr 20 2018

nik added a comment to D45815: [libclang] Allow skipping function bodies in preamble only.
In D45815#1072094, @nik wrote:

@ilya: Using SkipFunctionBodies_AllExceptTemplates for the preamble might be also useful for clangd.

Unfortunately, that's also the biggest performance win you get when skipping the function bodies.
I.e. most codebases do not have function bodies in headers unless the function is template.

Have you measured the performance gain of skipping only non-template functions, but not skipping the template ones?
Would that really make a significant difference for any real codebase?

Apr 20 2018, 7:39 AM

Apr 19 2018

nik added a comment to D40481: [libclang] Fix cursors for arguments of Subscript and Call operators.

This one still applies and tests pass.

Apr 19 2018, 7:12 AM
nik added a comment to D41005: Reuse preamble even if an unsaved file does not exist.

Sorry for the delay, I think I'll come back to this one soon.

Apr 19 2018, 7:03 AM
nik added a comment to D45815: [libclang] Allow skipping function bodies in preamble only.

@ilya: Using SkipFunctionBodies_AllExceptTemplates for the preamble might be also useful for clangd.

Apr 19 2018, 7:02 AM
nik added reviewers for D45815: [libclang] Allow skipping function bodies in preamble only: yvvan, arphaman, ilya-biryukov.
Apr 19 2018, 7:00 AM
nik created D45815: [libclang] Allow skipping function bodies in preamble only.
Apr 19 2018, 6:51 AM

Apr 17 2018

nik added a comment to D36390: Fix overloaded static functions in SemaCodeComplete.

Huch, seems already submitted. Ignore :>

Apr 17 2018, 1:09 AM
nik added a comment to D36390: Fix overloaded static functions in SemaCodeComplete.

Ping

Apr 17 2018, 1:06 AM
nik added a comment to D43453: Fix overloaded static functions for templates.

Ping

Apr 17 2018, 1:06 AM
nik added a comment to D38615: [libclang] Only mark CXCursors for explicit attributes with a type.

Ping

Apr 17 2018, 12:59 AM

Feb 7 2018

nik added a comment to D40481: [libclang] Fix cursors for arguments of Subscript and Call operators.

Ping...

Feb 7 2018, 3:44 AM

Jan 31 2018

nik abandoned D42099: [libclang] Add missing CINDEX_LINKAGE.

Abandoning since the change is already in.

Jan 31 2018, 7:59 AM

Jan 19 2018

nik added a comment to D42099: [libclang] Add missing CINDEX_LINKAGE.

Hmm, nothing changed. So how to get rid of this correctly. Is "Abandon Revision" the right thing to do?

Jan 19 2018, 7:19 AM
nik added a reviewer for D40481: [libclang] Fix cursors for arguments of Subscript and Call operators: jbcoe.
Jan 19 2018, 7:16 AM
nik added a comment to D40481: [libclang] Fix cursors for arguments of Subscript and Call operators.

Ping!

Jan 19 2018, 7:16 AM

Jan 16 2018

nik added a comment to D42099: [libclang] Add missing CINDEX_LINKAGE.

This was one was already submitted/merged by yvvan. Hmm, this review does not reflect that yet?

Jan 16 2018, 11:08 PM
nik added reviewers for D42099: [libclang] Add missing CINDEX_LINKAGE: yvvan, jbcoe.
Jan 16 2018, 4:10 AM
nik created D42099: [libclang] Add missing CINDEX_LINKAGE.
Jan 16 2018, 4:10 AM
nik added a comment to D39903: [libclang] Allow pretty printing declarations.

I can merge this for you.
Please add me as reviewer in any follow-up patches and we can turn them around more quickly.

Jan 16 2018, 12:36 AM

Jan 14 2018

nik added a comment to D39903: [libclang] Allow pretty printing declarations.

Can you submit this for me? I don't have the permissions.

Jan 14 2018, 11:55 PM
nik updated the diff for D39903: [libclang] Allow pretty printing declarations.

Addressed inline comment.

Jan 14 2018, 11:46 PM

Jan 12 2018

nik updated the diff for D39903: [libclang] Allow pretty printing declarations.

What about this? :)

Jan 12 2018, 8:20 AM
nik updated the diff for D39903: [libclang] Allow pretty printing declarations.

Added assert() for getter/setter.

Jan 12 2018, 4:20 AM
nik added inline comments to D39903: [libclang] Allow pretty printing declarations.
Jan 12 2018, 4:20 AM
nik updated the diff for D39903: [libclang] Allow pretty printing declarations.

Addressed comments.

Jan 12 2018, 1:55 AM
nik added a comment to D39903: [libclang] Allow pretty printing declarations.

It might be worth adding some very simple get/set tests to ensure that properties are set as intended.

Jan 12 2018, 1:54 AM

Jan 11 2018

nik updated the diff for D39903: [libclang] Allow pretty printing declarations.

Used macros as in a previous version to make it less verbose and error prone.

Jan 11 2018, 4:05 AM
nik updated the diff for D39903: [libclang] Allow pretty printing declarations.

Could one use an enum to get/set different properties of the policy?

I've seen other C-API's (for Linear and Quadratic programming) follow a similar approach quite extensibly.

It would significantly reduce the size of the API.

Jan 11 2018, 3:51 AM

Jan 10 2018

nik updated the diff for D39903: [libclang] Allow pretty printing declarations.

Rebased only, please review.

Jan 10 2018, 5:22 AM
nik added a comment to D40481: [libclang] Fix cursors for arguments of Subscript and Call operators.

Ping...

Jan 10 2018, 1:32 AM
nik added a comment to D39903: [libclang] Allow pretty printing declarations.

Ping...

Jan 10 2018, 1:18 AM