[PATCH] D159497: [RFC][clangd] Check if SelectionTree is complete

2023-11-02 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. > One such heuristic is to check the nodes in the selection tree for the exact > line match It looks like this heuristic doesn't work well in multiline cases. E.g. int f^unc() { return 0; } will give empty result with this patch applied. Repository: rG L

[PATCH] D138546: Clangd: Preserve target flags in system includes extractor

2022-12-27 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. It seems this patch can break GCC toolchains support This patch expects that we never get target-related options in `CommandLine` passed to `extractSystemIncludesAndTarget()` for **GCC** toolchain. But seems this is not always true because of https://github.com/llvm/ll

[PATCH] D109239: Add support for floating-option `-ffp-eval-method` and for new `pragma clang fp eval-method`

2022-10-23 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. It seems for x86_32 case (e.g. with -m32 in command line) there is a difference between clang and GCC: clang: `__FLT_EVAL_METHOD__` == 0 GCC: `__FLT_EVAL_METHOD__` == 2 Example: https://godbolt.org/z/EbY8rPYGn I am not sure, is it a correct behavior from clang? CHANGE

[PATCH] D135362: [clang] Make variables of undeduced types to have dependent alignment

2022-10-07 Thread Aleksandr Platonov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5a42c90b778c: [clang] Make variables of undeduced types to have dependent alignment (authored by ArcsinX). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1353

[PATCH] D135362: [clang] Make variables of undeduced types to have dependent alignment

2022-10-06 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX created this revision. ArcsinX added reviewers: aaron.ballman, rsmith, mizvekov. Herald added a project: All. ArcsinX requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Without this patch `VarDecl::hasDependent()` checks only undeduced

[PATCH] D134379: [clangd] IncludeCleaner: handle using namespace

2022-09-23 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D134379#3808043 , @kadircet wrote: > In D134379#3807770 , @ArcsinX wrote: > >> Anyway if this is the only concern, we can handle namespace declaration as a >> special case inside `Refe

[PATCH] D134379: [clangd] IncludeCleaner: handle using namespace

2022-09-21 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. Anyway if this is the only concern, we can handle namespace declaration as a special case inside `ReferencedLocationCrawler::add()`. something like this: diff -for (const Decl *Redecl : D->redecls()) - Result.User.insert(Redecl->getLocation()); +if (

[PATCH] D134379: [clangd] IncludeCleaner: handle using namespace

2022-09-21 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D134379#3806664 , @sammccall wrote: > Is test.h meaningfully used in that example? > Yes, the code is going to fail to compile without it, but it seems like the > "spirit" of IWYU would say to delete both the include and the u

[PATCH] D134379: [clangd] IncludeCleaner: handle using namespace

2022-09-21 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX created this revision. ArcsinX added reviewers: sammccall, kbobyrev. Herald added subscribers: kadircet, arphaman. Herald added a project: All. ArcsinX requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra

[PATCH] D133886: [clang][RecoveryExpr] Don't perform alignment check if parameter type is dependent

2022-09-15 Thread Aleksandr Platonov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. ArcsinX marked an inline comment as done. Closed by commit rG3ce7d256f2d7: [clang][RecoveryExpr] Don't perform alignment check if parameter type is… (authored by ArcsinX). Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D133886: [clang][RecoveryExpr] Don't perform alignment check if parameter type contains errors

2022-09-15 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX marked 3 inline comments as done. ArcsinX added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:5779 QualType ParamTy = Proto->getParamType(ArgIdx); +if (ParamTy->containsErrors()) + continue; hokein wrote: > ArcsinX

[PATCH] D133886: [clang][RecoveryExpr] Don't perform alignment check if parameter type contains errors

2022-09-15 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 460358. ArcsinX added a comment. - Check for dependent type inside CheckArgAlignment() - Simplify test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133886/new/ https://reviews.llvm.org/D133886 Files: clang/

[PATCH] D133886: [clang][RecoveryExpr] Don't perform alignment check if parameter type contains errors

2022-09-15 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:5779 QualType ParamTy = Proto->getParamType(ArgIdx); +if (ParamTy->containsErrors()) + continue; hokein wrote: > It looks like for the failure case the `ParamTy`

[PATCH] D133886: [clang][RecoveryExpr] Don't perform alignment check if parameter type contains errors

2022-09-14 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. This looks similar to the problem fixed in D103825 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133886/new/ https://reviews.llvm.org/D133886

[PATCH] D133886: [clang][RecoveryExpr] Don't perform alignment check if parameter type contains errors

2022-09-14 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX created this revision. ArcsinX added reviewers: hokein, kadircet. Herald added a project: All. ArcsinX requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch fixes a crash which appears because of CheckArgAlignment() call with

[PATCH] D133043: [clangd] Fix tests for implicit C function declaration

2022-09-01 Thread Aleksandr Platonov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcc4b86cfc01c: [clangd] Fix tests for implicit C function declaration (authored by ArcsinX). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133043/new/ https:

[PATCH] D133043: [clangd] Fix tests for implicit C function declaration

2022-08-31 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX created this revision. ArcsinX added reviewers: aaron.ballman, sammccall, kadircet. Herald added a subscriber: arphaman. Herald added a project: All. ArcsinX requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools

[PATCH] D131091: [clang][index] Index unresolved member expression as reference

2022-08-19 Thread Aleksandr Platonov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGee648c0ce09b: [clang][index] Index unresolved member expression as reference (authored by denis-fatkulin, committed by ArcsinX). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D131706: [clangd][unittests][IncludeCleaner] Don't call findReferencedFiles() if the result is not used

2022-08-12 Thread Aleksandr Platonov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG42ee0d8c16f7: [clangd][unittests][IncludeCleaner] Don't call findReferencedFiles() if the… (authored by ArcsinX). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D131706: [clangd][unittests][IncludeCleaner] Don't call findReferencedFiles() if the result is not used

2022-08-11 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX created this revision. ArcsinX added reviewers: kbobyrev, sammccall, kadircet. Herald added subscribers: usaxena95, arphaman. Herald added a project: All. ArcsinX requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-

[PATCH] D130417: [clang-format] Missing space between trailing return type 'auto' and left brace

2022-07-28 Thread Aleksandr Platonov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4977fd2192fc: [clang-format] Missing space between trailing return type 'auto' and left brace (authored by denis-fatkulin, committed by ArcsinX). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D130299: [clang-format] FIX: Misannotation 'auto' as trailing return type in lambdas

2022-07-27 Thread Aleksandr Platonov 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 rG17fb879764dc: [clang-format] FIX: Misannotation 'auto' as trailing return type in lambdas (authored by denis-fatkulin, committed by ArcsinX). Repos

[PATCH] D122748: [Sema] Don't check bounds for function pointer

2022-04-13 Thread Aleksandr Platonov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb2c3ae0b6f05: [Sema] Don't check bounds for function pointer (authored by ArcsinX). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122748/new/ https://review

[PATCH] D122748: [Sema] Don't check bounds for function pointer

2022-04-13 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. Friendly ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122748/new/ https://reviews.llvm.org/D122748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D122748: [Sema] Don't check bounds for function pointer

2022-04-06 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. Friendly ping. In D122748#3417500 , @erichkeane wrote: > would still like to see the feedback from the original submitter here to see > if there is more work to do in here that would be valuable. Unsure, maybe we can process w

[PATCH] D122748: [Sema] Don't check bounds for function pointer

2022-03-30 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D122748#3417240 , @erichkeane wrote: > That said, we might not want to early-exist here, I think we can just skip > the `IsUnboundedArray` branch? It seems you are right, thanks, fixed. Repository: rG LLVM Github Monorep

[PATCH] D122748: [Sema] Don't check bounds for function pointer

2022-03-30 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 419242. ArcsinX added a comment. Check for function type only if IsUnboundedArray is true Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122748/new/ https://reviews.llvm.org/D122748 Files: clang/lib/Sema/Sema

[PATCH] D122748: [Sema] Don't check bounds for function pointer

2022-03-30 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX created this revision. ArcsinX added reviewers: aaron.ballman, erichkeane, abhinavgaba, chrish_ericsson_atx. Herald added a project: All. ArcsinX requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Currently, clang crashes with i386 ta

[PATCH] D121245: [clang][parser] Allow GNU attributes before namespace identifier

2022-03-15 Thread Aleksandr Platonov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8bd00557e3f4: [clang][parser] Allow GNU attributes before namespace identifier (authored by ArcsinX). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121245/ne

[PATCH] D121245: [clang][parser] Allow GNU attributes before namespace identifier

2022-03-15 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D121245#3380346 , @aaron.ballman wrote: > LGTM! Might be worth adding a release note for it (does this close any bugs > in the bug database? If so, it'd be worth mentioning those in the commit > message and release note). T

[PATCH] D121245: [clang][parser] Allow GNU attributes before namespace identifier

2022-03-15 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 415470. ArcsinX added a comment. Update release notes Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121245/new/ https://reviews.llvm.org/D121245 Files: clang/docs/ReleaseNotes.rst clang/lib/Parse/Pa

[PATCH] D121245: [clang][parser] Allow GNU attributes before namespace identifier

2022-03-12 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX marked an inline comment as done. ArcsinX added inline comments. Comment at: clang/lib/Parse/ParseDeclCXX.cpp:79 + + auto ReadLabelAttrubutes = [&] { +// Read label attributes, if present. aaron.ballman wrote: > However, I don't think there's a reaso

[PATCH] D121245: [clang][parser] Allow GNU attributes before namespace identifier

2022-03-12 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 414868. ArcsinX added a comment. - get attributes location from ParsedAttributesWithRange object - parse subsequent attributes of different kinds in a loop Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121245/ne

[PATCH] D121245: [clang][parser] Allow GNU attributes before namespace identifier

2022-03-08 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX created this revision. ArcsinX added reviewers: aaron.ballman, rsmith. Herald added a subscriber: jdoerfert. Herald added a project: All. ArcsinX requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. GCC supports: - `namespace identifie

[PATCH] D116966: [analyzer] Don't specify PLUGIN_TOOL for analyzer plugins

2022-01-25 Thread Aleksandr Platonov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG491c154677bc: [analyzer] Don't specify PLUGIN_TOOL for analyzer plugins (authored by ArcsinX). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116966/new/ htt

[PATCH] D116966: [analyzer] Don't specify PLUGIN_TOOL for analyzer plugins

2022-01-21 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D116966#3261479 , @beanz wrote: > Have you looked at the impact on binary size? PLUGIN_TOOL _should_ cause the > plugins to link against the copy of LLVM & Clang in the tool target binary > which reduces the binary size of th

[PATCH] D116966: [analyzer] Don't specify PLUGIN_TOOL for analyzer plugins

2022-01-21 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D116966#3261168 , @aaron.ballman wrote: > However, the changes you've made don't look to be specific to building on > Windows; this removes `PLUGIN_TOOL` for all targets. I presume it's still > needed for non-Windows targets

[PATCH] D116966: [analyzer] Don't specify PLUGIN_TOOL for analyzer plugins

2022-01-21 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. Friendly ping. I am not sure that this patch is clear, so I will try to explain it again: - clang static analyzer plugins are *NOT* a typical clang plugins: instead of `llvm::Registry<>::Add` usage, these plugins provides `сlang_registerCheckers` and `clang_analyzerAPI

[PATCH] D116966: [analyzer] Don't specify PLUGIN_TOOL for analyzer plugins

2022-01-14 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D116966#3243374 , @aaron.ballman wrote: > To be clear, I'm trying to figure out whether plugins are *actually* > supported on Windows or whether they just so happen to work if the stars line > up right for you. If they're su

[PATCH] D116966: [analyzer] Don't specify PLUGIN_TOOL for analyzer plugins

2022-01-14 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D116966#3243318 , @aaron.ballman wrote: > AFAIK, we don't support plugins on Windows. See: > https://reviews.llvm.org/D16761#1441359 I don't think anything has changed in > this regard. I can say that I successfully use cla

[PATCH] D116966: [analyzer] Don't specify PLUGIN_TOOL for analyzer plugins

2022-01-13 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D116966#3242170 , @aaronpuchert wrote: > This is only observable on Windows, right? Thanks for your reply. Yes, PLUGIN_TOOL argument is used on Windows only, so this problems can't be observed on non-Windows systems and this

[PATCH] D116966: [analyzer] Don't specify PLUGIN_TOOL for analyzer plugins

2022-01-10 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX created this revision. ArcsinX added reviewers: aaronpuchert, hintonda, NoQ, Szelethus, lebedev.ri. Herald added subscribers: manas, wenlei, steakhal, ASDenysPetrov, usaxena95, dkrupp, donat.nagy, kadircet, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun, mgorny. ArcsinX

[PATCH] D115959: [clangd] Fix undefined behavior when generating error message at rename with an invalid name

2021-12-19 Thread Aleksandr Platonov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG555eacf75f21: [clangd] Fix undefined behavior when generating error message at rename with an… (authored by ArcsinX). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D115959: [clangd] Fix undefined behavior when generating error message at rename with an invalid name

2021-12-17 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX created this revision. ArcsinX added reviewers: sammccall, kadircet, hokein. Herald added subscribers: usaxena95, arphaman. ArcsinX requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. `Message()` lambd

[PATCH] D107304: [clangd][query-driver] Extract GCC version from the driver output

2021-08-08 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX abandoned this revision. ArcsinX added a comment. As I can see, no chances for this to get approved. So. closing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107304/new/ https://reviews.llvm.org/D107304 __

[PATCH] D107304: [clangd][query-driver] Extract GCC version from the driver output

2021-08-04 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D107304#2926310 , @sammccall wrote: > Clang's current answer is "yes we are GCC >=4, but no we are not GCC >=5". > This causes the codebase to reject the compiler, because it relies on > features/absence of bugs from GCC 5. @A

[PATCH] D107304: [clangd][query-driver] Extract GCC version from the driver output

2021-08-04 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D107304#2924886 , @kadircet wrote: > Ok if you think that setting GCC version to higher values by default won't > break anything, I think that GCC version should be the same, which was used to build the project: it can be hi

[PATCH] D107304: [clangd][query-driver] Extract GCC version from the driver output

2021-08-03 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D107304#2922975 , @kadircet wrote: > But I am not convinced that changing the default behaviour here is going to > be beneficial for majority of the users. I think that majority of users doesn't use `--query-driver` at all.

[PATCH] D107304: [clangd][query-driver] Extract GCC version from the driver output

2021-08-03 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. @kadircet Thanks for clarification. Now your position is clear for me. But clang was designed as a drop-in replacement for GCC: - https://clang.llvm.org/docs/LanguageExtensions.html#introduction - https://clang.llvm.org/features.html#gcccompat I do not have any proves t

[PATCH] D107304: [clangd][query-driver] Extract GCC version from the driver output

2021-08-03 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D107304#2921694 , @kadircet wrote: >> The most confusing thing for me that we already have this implicitly set >> -fgnuc-version=4.2.1. So, we already have implicitly set __GNUC__ and other >> GCC macros as a default behavior

[PATCH] D107304: [clangd][query-driver] Extract GCC version from the driver output

2021-08-03 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D107304#2921588 , @kadircet wrote: > I am not sure this is a good idea. Surely we can go with this approach and > pretend to have the same GNUC version as the toolchain, but we are still > using clang underneath as @joerg poi

[PATCH] D107304: [clangd][query-driver] Extract GCC version from the driver output

2021-08-02 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D107304#2920960 , @joerg wrote: > What do you mean with "GCC macros are correct"? Imagine that we have a project and we build it with GCC, we have `compile_commands.json` file which contains all compile command used to build

[PATCH] D107304: [clangd][query-driver] Extract GCC version from the driver output

2021-08-02 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX created this revision. ArcsinX added reviewers: sammccall, kadircet. Herald added subscribers: usaxena95, arphaman. ArcsinX requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Clang uses 4.2.1 as a def

[PATCH] D104056: [clangd][nfc] Show more information in logs when compiler instance prepare fails

2021-06-30 Thread Aleksandr Platonov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa62579fc008e: [clangd][nfc] Show more information in logs when compiler instance prepare fails (authored by ArcsinX). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D104056: [clangd][nfc] Show more information in logs when compiler instance prepare fails

2021-06-29 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 355389. ArcsinX added a comment. Check ASTDiags.take() for empty instead of ASTDiags.getNumErrors() value check Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104056/new/ https://reviews.llvm.org/D104056 Files:

[PATCH] D104056: [clangd][nfc] Show more information in logs when compiler instance prepare fails

2021-06-10 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX created this revision. ArcsinX added reviewers: sammccall, kadircet. Herald added subscribers: usaxena95, arphaman. ArcsinX requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Without this patch clangd

[PATCH] D97535: [clangd] Use URIs instead of paths in the index file list

2021-03-05 Thread Aleksandr Platonov 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 rGc4efd04f18c7: [clangd] Use URIs instead of paths in the index file list (authored by ArcsinX). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D97535: [clangd] Use URIs instead of paths in the index file list

2021-03-04 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. Thank you for review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97535/new/ https://reviews.llvm.org/D97535 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[PATCH] D97535: [clangd] Use URIs instead of paths in the index file list

2021-03-04 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 328222. ArcsinX added a comment. Call `FileIndex::updateMain()` with an absolute file path in tests to avoid test failures in debug mode. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97535/new/ https://review

[PATCH] D97535: [clangd] Use URIs instead of paths in the index file list

2021-03-03 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 327853. ArcsinX added a comment. - use URIs as keys - create the file list from the keys Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97535/new/ https://reviews.llvm.org/D97535 Files: clang-tools-extra/clan

[PATCH] D97535: [clangd] Use URIs instead of paths in the index file list

2021-03-02 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX planned changes to this revision. ArcsinX added a comment. In D97535#2596992 , @kadircet wrote: > But until that day, I suppose the best we can do is change the contract of > `FileSymbols` to sey keys are always `URIs representing the file produci

[PATCH] D97535: [clangd] Use URIs instead of paths in the index file list

2021-03-02 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added inline comments. Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:292 +for (const auto &Sym : *Slab) { + if (Sym.Definition) +Files.insert(Sym.Definition.FileURI); kadircet wrote: > ArcsinX wrote: > > kadircet wrote: > > > i

[PATCH] D97535: [clangd] Use URIs instead of paths in the index file list

2021-03-01 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added inline comments. Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:292 +for (const auto &Sym : *Slab) { + if (Sym.Definition) +Files.insert(Sym.Definition.FileURI); kadircet wrote: > it feels weird to choose one or the other

[PATCH] D97535: [clangd] Use URIs instead of paths in the index file list

2021-02-27 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX marked an inline comment as done. ArcsinX added inline comments. Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:279 SymbolSlabs.push_back(FileAndSymbols.second); + for (const auto &S : *FileAndSymbols.second) { +if (S.Definition)

[PATCH] D97535: [clangd] Use URIs instead of paths in the index file list

2021-02-27 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 326903. ArcsinX added a comment. - Do not insert the keys into the file list - Iterate through refs and symbols to create the file list after releasing the lock Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D975

[PATCH] D97535: [clangd] Use URIs instead of paths in the index file list

2021-02-26 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added reviewers: sammccall, kadircet, hokein. ArcsinX added a comment. Initial discussion D94952#inline-892421 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97535/new/ https://reviews.llvm.or

[PATCH] D97535: [clangd] Use URIs instead of paths in the index file list

2021-02-26 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX created this revision. Herald added subscribers: usaxena95, kadircet, arphaman. ArcsinX requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. Without this patch the file list of the index is derived from the keys, b

[PATCH] D94952: [clangd] Take into account what is in the index (symbols, references, etc.) at indexes merge

2021-02-05 Thread Aleksandr Platonov 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 rG91698fe45f60: [clangd] Take into account what is in the index (symbols, references, etc.) at… (authored by ArcsinX). Repository: rG LLVM Github Mo

[PATCH] D94952: [clangd] Take into account what is in the index (symbols, references, etc.) at indexes merge

2021-02-04 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX marked 3 inline comments as done. ArcsinX added a comment. Thank you for review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94952/new/ https://reviews.llvm.org/D94952 ___ cfe-commits mailing l

[PATCH] D94952: [clangd] Take into account what is in the index (symbols, references, etc.) at indexes merge

2021-02-04 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 321442. ArcsinX added a comment. - Remove default value of `IdxContents` in `FileSymbols` constructor. - Fix index contents for the preamble index (Symbols => Symbols|Relations). - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D94952: [clangd] Take into account what is in the index (symbols, references, etc.) at indexes merge

2021-02-04 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added inline comments. Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:433 PreambleSymbols.update( -Uri, std::make_unique(std::move(*IF->Symbols)), +FilePath ? *FilePath : (consumeError(FilePath.takeError()), Uri), +std::make_unique(s

[PATCH] D94952: [clangd] Take into account what is in the index (symbols, references, etc.) at indexes merge

2021-01-27 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX marked 4 inline comments as done. ArcsinX added inline comments. Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:433 PreambleSymbols.update( -Uri, std::make_unique(std::move(*IF->Symbols)), +FilePath ? *FilePath : (consumeError(FilePath.takeE

[PATCH] D94952: [clangd] Take into account what is in the index (symbols, references, etc.) at indexes merge

2021-01-27 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 319602. ArcsinX added a comment. - Set `IdxContents` at `FileSymbols` object breation instead of at `FileSymbols::buildIndex()` call. - Revert change of the preamble index key scheme - Add comment for `IndexContents` - `IndexDataKind` => `IndexContents` Rep

[PATCH] D95349: [clangd] Allow diagnostics to be suppressed with configuration

2021-01-27 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added inline comments. Comment at: clang-tools-extra/clangd/ParsedAST.cpp:319 -if (!CTChecks.empty()) { - ASTDiags.setLevelAdjuster([&CTContext](DiagnosticsEngine::Level DiagLevel, - const clang::Diagnostic &Info) {

[PATCH] D94952: [clangd] Take into account what is in the index (symbols, references, etc.) at indexes merge

2021-01-26 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added inline comments. Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:433 PreambleSymbols.update( -Uri, std::make_unique(std::move(*IF->Symbols)), +FilePath ? *FilePath : (consumeError(FilePath.takeError()), Uri), +std::make_unique(s

[PATCH] D94952: [clangd] Take into account what is in the index (symbols, references, etc.) at indexes merge

2021-01-25 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added inline comments. Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:433 PreambleSymbols.update( -Uri, std::make_unique(std::move(*IF->Symbols)), +FilePath ? *FilePath : (consumeError(FilePath.takeError()), Uri), +std::make_unique(s

[PATCH] D94952: [clangd] Take into account what is in the index (symbols, references, etc.) at indexes merge

2021-01-25 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added inline comments. Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:433 PreambleSymbols.update( -Uri, std::make_unique(std::move(*IF->Symbols)), +FilePath ? *FilePath : (consumeError(FilePath.takeError()), Uri), +std::make_unique(s

[PATCH] D95206: [clangd][SwapIndex] ensure that the old index is alive while we are using it via the function returned by `SwapIndex::indexedFiles()` call

2021-01-22 Thread Aleksandr Platonov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7388c3468595: [clangd][SwapIndex] ensure that the old index is alive while we are using it… (authored by ArcsinX). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D95206: [clangd][SwapIndex] ensure that the old index is alive while we are using it via the function returned by `SwapIndex::indexedFiles()` call

2021-01-22 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 318474. ArcsinX added a comment. Fix format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95206/new/ https://reviews.llvm.org/D95206 Files: clang-tools-extra/clangd/index/Index.cpp clang-tools-extra/clangd

[PATCH] D95206: [clangd][SwapIndex] ensure that the old index is alive while we are using it via the function returned by `SwapIndex::indexedFiles()` call

2021-01-22 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 318470. ArcsinX added a comment. Call snapshot() only once to avoid possible race. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95206/new/ https://reviews.llvm.org/D95206 Files: clang-tools-extra/clangd/ind

[PATCH] D95206: [clangd][SwapIndex] ensure that the old index is alive while we are using it via the function returned by `SwapIndex::indexedFiles()` call

2021-01-22 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 318442. ArcsinX added a comment. Fix format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95206/new/ https://reviews.llvm.org/D95206 Files: clang-tools-extra/clangd/index/Index.cpp clang-tools-extra/clangd

[PATCH] D95206: [clangd][SwapIndex] ensure that the old index is alive while we are using it via the function returned by `SwapIndex::indexedFiles()` call

2021-01-21 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX created this revision. ArcsinX added reviewers: sammccall, kadircet. Herald added subscribers: usaxena95, arphaman. ArcsinX requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. Without this patch the old index coul

[PATCH] D94952: [clangd] Take into account what is in the index (symbols, references, etc.) at indexes merge

2021-01-19 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 317521. ArcsinX added a comment. Prevent crash in debug mode. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94952/new/ https://reviews.llvm.org/D94952 Files: clang-tools-extra/clangd/index/BackgroundRebuild.

[PATCH] D94952: [clangd] Take into account what is in the index (symbols, references, etc.) at indexes merge

2021-01-19 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added reviewers: sammccall, kadircet. ArcsinX added a comment. Initial discussion https://reviews.llvm.org/D93683?id=313280#inline-875666 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94952/new/ https://reviews.llvm.org/D94952

[PATCH] D94952: [clangd] Take into account what is in the index (symbols, references, etc.) at indexes merge

2021-01-19 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX created this revision. Herald added subscribers: usaxena95, kadircet, arphaman. ArcsinX requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. Current indexes merge logic skip data from the static index if the file i

[PATCH] D94477: [clangd] Add main file macros into the main-file index.

2021-01-14 Thread Aleksandr Platonov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2e25be0b6134: [clangd] Add main file macros into the main-file index. (authored by ArcsinX). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94477/new/ https:

[PATCH] D94477: [clangd] Add main file macros into the main-file index.

2021-01-12 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 316331. ArcsinX added a comment. - std::pair => struct MacroOccurrence - remove addressed fixme comment - assert() => cantFail() - use toSourceCode() to get the macro name Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D94477: [clangd] Add main file macros into the main-file index.

2021-01-12 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added reviewers: sammccall, kadircet. ArcsinX added a comment. I am not happy with my solution, hope to hear an advice. Initial discussion about this problem: https://reviews.llvm.org/D93683#2468842 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D94477: [clangd] Add main file macros into the main-file index.

2021-01-12 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX created this revision. Herald added subscribers: usaxena95, kadircet, arphaman. ArcsinX requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. This patch is a try to fix `WorkspaceSymbols.Macros` test after D93796 <

[PATCH] D93796: [clangd][fuzzyFind] Do not show stale symbols in the result.

2021-01-06 Thread Aleksandr Platonov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG979228f120f4: [clangd][fuzzyFind] Do not show stale symbols in the result. (authored by ArcsinX). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93796/new/ h

[PATCH] D93796: [clangd][fuzzyFind] Do not show stale symbols in the result.

2020-12-24 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX created this revision. ArcsinX added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman. ArcsinX requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. This is follow up to D93393

[PATCH] D93683: [clangd] Do not take stale definition from the static index.

2020-12-23 Thread Aleksandr Platonov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2522fa053b62: [clangd] Do not take stale definition from the static index. (authored by ArcsinX). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93683/new/ h

[PATCH] D93683: [clangd] Do not take stale definition from the static index.

2020-12-23 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX marked an inline comment as done. ArcsinX added a comment. In D93683#2469584 , @sammccall wrote: > In D93683#2469553 , @ArcsinX wrote: > >> In D93683#2468842 , @sammc

[PATCH] D93683: [clangd] Do not take stale definition from the static index.

2020-12-23 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 313504. ArcsinX added a comment. Add comment. Fix possible `MergeIndexTest.LookupRemovedDefinition` test failure. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93683/new/ https://reviews.llvm.org/D93683 Files:

[PATCH] D93683: [clangd] Do not take stale definition from the static index.

2020-12-22 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D93683#2468842 , @sammccall wrote: > I'm not 100% sure this bug would block adding the equivalent change for > `fuzzyFind` though - it'll affect documentSymbol but not code-completion IIUC > (because of the workaround I mentio

[PATCH] D93683: [clangd] Do not take stale definition from the static index.

2020-12-22 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 313320. ArcsinX added a comment. - Simplify test. - Revert PreambleSymbols.update() first argument change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93683/new/ https://reviews.llvm.org/D93683 Files: clan

[PATCH] D93683: [clangd] Do not take stale definition from the static index.

2020-12-22 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added reviewers: sammccall, kadircet. ArcsinX added a comment. I also want to propose the similar patch for fuzzyFind() (as a part of this patch or a separate one), but I faced the following problem: `Test.cpp` #define FOO 1 This example creates empty dynamic index for main file symb

[PATCH] D93683: [clangd] Do not take stale definition from the static index.

2020-12-22 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX created this revision. Herald added subscribers: usaxena95, kadircet, arphaman. ArcsinX requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. This is follow up to D93393 . Without th

[PATCH] D93393: [clangd] Ignore the static index refs from the dynamic index files.

2020-12-18 Thread Aleksandr Platonov 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 rGe35f9229dcb2: [clangd] Ignore the static index refs from the dynamic index files. (authored by ArcsinX). Repository: rG LLVM Github Monorepo CHAN

[PATCH] D93393: [clangd] Ignore the static index refs from the dynamic index files.

2020-12-18 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 312742. ArcsinX added a comment. Fix format Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93393/new/ https://reviews.llvm.org/D93393 Files: clang-tools-extra/clangd/index/FileIndex.cpp clang-tools-e

  1   2   3   >