[PATCH] D87775: [clangd] Add option for disabling AddUsing tweak on some namespaces.

2020-09-18 Thread Adam Czachorowski 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 rGc894bfd1f580: [clangd] Add option for disabling AddUsing tweak on some namespaces. (authored by adamcz). Changed prior to commit: https://reviews.

[PATCH] D88281: [clangd] Use Decision Forest to score code compeltions.

2020-09-25 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz accepted this revision. adamcz added a comment. This revision is now accepted and ready to land. Could you add a test that sets this flag? Perhaps we can run CodeCompletionTests.cpp twice, once with this flag, once without? Just to exercise these code paths, I think most expectations ther

[PATCH] D88281: [clangd] Use Decision Forest to score code compeltions.

2020-09-28 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz accepted this revision. adamcz added inline comments. Comment at: clang-tools-extra/clangd/CodeComplete.cpp:1635 +case RM::Heuristics: + Scores.Quality = Quality.evaluate(); + Scores.Relevance = Relevance.evaluate(); usaxena95 wrote: > adamcz

[PATCH] D88281: [clangd] Use Decision Forest to score code compeltions.

2020-09-28 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added a comment. Just noticed: typo in commit description - compeltions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88281/new/ https://reviews.llvm.org/D88281 ___ cfe-commits mailing list cfe-co

[PATCH] D88431: [clangd] Rename evaluate() to evaluateHeuristics()

2020-09-28 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz accepted this revision. adamcz added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88431/new/ https://reviews.llvm.org/D88431 __

[PATCH] D86069: [clang] When loading preamble from AST file, re-export modules in Sema.

2020-08-19 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 286561. adamcz added a comment. Added comment in place of a FIXME Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86069/new/ https://reviews.llvm.org/D86069 Files: clang-tools-extra/clangd/unittests/ModulesTest

[PATCH] D86069: [clang] When loading preamble from AST file, re-export modules in Sema.

2020-08-20 Thread Adam Czachorowski 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 rGbaeff989b050: [clang] When loading preamble from AST file, re-export modules in Sema. (authored by adamcz). Repository: rG LLVM Github Monorepo C

[PATCH] D85923: [clangd] Fix crash-bug in preamble indexing when using modules.

2020-08-20 Thread Adam Czachorowski via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG53b9199a5cdb: [clangd] Fix crash-bug in preamble indexing when using modules. (authored by adamcz). Repository: rG LLVM

[PATCH] D86284: [clangd] Remove useless stderr logging.

2020-08-20 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous. Herald added a project: clang. adamcz requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. This was accidentally added in 53b9199a5cdba8a6e294e1fb183f308ec55

[PATCH] D86284: [clangd] Remove useless stderr logging.

2020-08-20 Thread Adam Czachorowski via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG707138d67786: [clangd] Remove useless stderr logging. (authored by

[PATCH] D85753: [clangd] Discard diagnostics from another SourceManager.

2020-08-21 Thread Adam Czachorowski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb4889353207a: [clangd] Discard diagnostics from another SourceManager. (authored by adamcz). Changed prior to commit: https://reviews.llvm.org/D85753?vs=285961&id=287000#toc Repository: rG LLVM Githu

[PATCH] D86473: [clangd] When inserting "using", add "::" in front if that's the style.

2020-08-24 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. adamcz added a reviewer: hokein. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous. Herald added a project: clang. adamcz requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. We guess the style based on the e

[PATCH] D86473: [clangd] When inserting "using", add "::" in front if that's the style.

2020-08-25 Thread Adam Czachorowski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4d90ff59ac45: [clangd] When inserting "using", add "::" in front if that's the style. (authored by adamcz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D864

[PATCH] D86624: [clang] Exclude invalid destructors from lookups.

2020-08-26 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. adamcz requested review of this revision. This fixes a crash when declaring a destructor with a wrong name, then writing result to pch file and loading it again. The PCH storage uses DeclarationNam

[PATCH] D86624: [clang] Exclude invalid destructors from lookups.

2020-08-26 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added inline comments. Comment at: clang/test/PCH/cxx-invalid-destructor.cpp:2 +// RUN: %clang_cc1 -x c++ -std=c++11 -emit-pch -o %t %S/cxx-invalid-destructor.h -fallow-pch-with-compiler-errors +// RUN: %clang_cc1 -x c++ -std=c++11 -include-pch %t %S/cxx-invalid-destruct

[PATCH] D86624: [clang] Exclude invalid destructors from lookups.

2020-08-26 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 287983. adamcz marked 2 inline comments as done. adamcz added a comment. addressed review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86624/new/ https://reviews.llvm.org/D86624 Files: clang/lib/AST

[PATCH] D86624: [clang] Exclude invalid destructors from lookups.

2020-08-26 Thread Adam Czachorowski 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 rGeed0af6179ca: [clang] Exclude invalid destructors from lookups. (authored by adamcz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D87244: [clang] Add fix-it for -Wreorder-ctor.

2020-09-07 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. Herald added subscribers: cfe-commits, mgrang. Herald added a project: clang. adamcz requested review of this revision. This version is very limited. It does not work when comments are present anywhere in the initializer list, since we do not have a good way to associ

[PATCH] D87244: [clang] Add fix-it for -Wreorder-ctor.

2020-09-07 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 290312. adamcz added a comment. fixed comment typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87244/new/ https://reviews.llvm.org/D87244 Files: clang/lib/Sema/SemaDeclCXX.cpp clang/test/SemaCXX/warn-reor

[PATCH] D87244: [clang] Add fix-it for -Wreorder-ctor.

2020-09-07 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 290313. adamcz added a comment. Add a missing const Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87244/new/ https://reviews.llvm.org/D87244 Files: clang/lib/Sema/SemaDeclCXX.cpp clang/test/SemaCXX/warn-reo

[PATCH] D87253: [libTooling] Change CDB heuristic to look further for files in a given language.

2020-09-07 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. adamcz requested review of this revision. When looking for compile commands for file of type X, other files of type X will be preferred over files of any other type, regardless of score. However,

[PATCH] D87253: [libTooling] Change CDB heuristic to look further for files in a given language.

2020-09-07 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added a reviewer: kadircet. adamcz added a comment. Hey Kadir What do you think about this change? This addresses https://github.com/clangd/clangd/issues/519, but I'm not entirely convinced this is a good idea. Let me know if you have an opinion on this. Repository: rG LLVM Github Mo

[PATCH] D92408: [clangd] ExtractFunction: disable on regions that sometimes, but not always return.

2020-12-08 Thread Adam Czachorowski 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 rGf6b205dae163: [clangd] ExtractFunction: disable on regions that sometimes, but not always… (authored by adamcz). Repository: rG LLVM Github Monore

[PATCH] D92847: [clangd] ExpandAutoType: Do not offer code action on lambdas.

2020-12-08 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. Herald added subscribers: usaxena95, kadircet, arphaman. adamcz requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. We can't expand lambda types anyway. Now we simply not offer the code actio

[PATCH] D92847: [clangd] ExpandAutoType: Do not offer code action on lambdas.

2020-12-08 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 310289. adamcz marked 2 inline comments as done. adamcz added a comment. addressed review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92847/new/ https://reviews.llvm.org/D92847 Files: clang-tools-e

[PATCH] D92847: [clangd] ExpandAutoType: Do not offer code action on lambdas.

2020-12-08 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added a comment. Also added some "const" to make clang-tidy happy Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92847/new/ https://reviews.llvm.org/D92847 ___ cfe-commits mailing list cfe-commits@

[PATCH] D92847: [clangd] ExpandAutoType: Do not offer code action on lambdas.

2020-12-08 Thread Adam Czachorowski 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 rG3c5bed734f9e: [clangd] ExpandAutoType: Do not offer code action on lambdas. (authored by adamcz). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D93220: [clangd] Add error handling (elog) in code completion.

2020-12-14 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. Herald added subscribers: usaxena95, kadircet, arphaman. adamcz requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D93220 Fil

[PATCH] D92663: [clangd] Add hot-reload of compile_commands.json and compile_flags.txt

2020-12-15 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added inline comments. Comment at: clang-tools-extra/clangd/GlobalCompilationDatabase.cpp:206 + auto Stat = FS.status(Path); + if (!Stat || !Stat->isRegularFile()) { +Size = NoFileCached; Here's a fun thought: what if this is a network or otherwise m

[PATCH] D93220: [clangd] Add error handling (elog) in code completion.

2020-12-16 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 312206. adamcz marked an inline comment as done. adamcz added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93220/new/ https://reviews.llvm.org/D93220 Files: clang-tools-extra/clan

[PATCH] D93220: [clangd] Add error handling (elog) in code completion.

2020-12-16 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added inline comments. Comment at: clang-tools-extra/clangd/CodeComplete.cpp:193 +} else { + elog("Code completion header path manipulation failed {0}", + HeaderFile.takeError()); sammccall wrote: > I think this is too noisy.

[PATCH] D91162: Give up on evaluating value-dependent potential constexpr before hitting the assertion.

2020-11-10 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. adamcz requested review of this revision. This addresses a new type of assert() crash since f7f2e4261a98b2da519d58e7f6794b013cda7a4b

[PATCH] D91625: [clang] Do not crash on pointer wchar_t pointer assignment.

2020-11-17 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. adamcz requested review of this revision. wchar_t can be signed (thus hasSignedIntegerRepresentation() returns true), but it doesn't have an unsigned type, which would lead to a crash when trying t

[PATCH] D91625: [clang] Do not crash on pointer wchar_t pointer assignment.

2020-11-17 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 305752. adamcz added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91625/new/ https://reviews.llvm.org/D91625 Files: clang/lib/Sema/SemaExpr.cpp clang/test/SemaCXX/wchar_t.cpp Index: cla

[PATCH] D91162: Give up on evaluating value-dependent potential constexpr before hitting the assertion.

2020-11-17 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 305818. adamcz added a comment. Added [clang] in commit description Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91162/new/ https://reviews.llvm.org/D91162 Files: clang/lib/AST/ExprConstant.cpp clang/test/

[PATCH] D91625: [clang] Do not crash on pointer wchar_t pointer assignment.

2020-11-18 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 306108. adamcz added a comment. addressed review comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91625/new/ https://reviews.llvm.org/D91625 Files: clang/lib/AST/ASTContext.cpp clang/test/SemaCXX/wchar

[PATCH] D91625: [clang] Do not crash on pointer wchar_t pointer assignment.

2020-11-18 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:8726 +else if (!lhptee->isWideCharType() && + lhptee->hasSignedIntegerRepresentation()) ltrans = S.Context.getCorrespondingUnsignedType(ltrans); hokein wrote: > I'm wonde

[PATCH] D91625: [clang] Do not crash on pointer wchar_t pointer assignment.

2020-11-20 Thread Adam Czachorowski 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 rG95ce9fbc235a: [clang] Do not crash on pointer wchar_t pointer assignment. (authored by adamcz). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D88495: [clangd] Disable msan instrumentation for generated Evaluate().

2020-09-29 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz accepted this revision. adamcz added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/quality/CompletionModelCodegen.py:164 +LLVM_NO_SANITIZE("memory") float Evaluate(const %s&); Please add a comment

[PATCH] D88536: [clangd] Split DecisionForest Evaluate() into one func per tree.

2020-09-30 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added inline comments. Comment at: clang-tools-extra/clangd/quality/CompletionModelCodegen.py:168 +nline.join(class_members), +nline.join([" float EvaluateTree%d() const;" % tree_num +for tree_num in range(num_trees)]),

[PATCH] D88590: [clangd] Add bencmark for measuring latency of DecisionForest model.

2020-10-01 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added a comment. Would it make sense to set random seed to something fixed to make this more reproducible? Comment at: clang-tools-extra/clangd/benchmarks/CompletionModel/DecisionForestBenchmark.cpp:2 +//===--- DecisionForestBenchmark.cpp - Benchmark for code completio

[PATCH] D88590: [clangd] Add bencmark for measuring latency of DecisionForest model.

2020-10-01 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added a comment. Also typo in commit description: bencmark Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88590/new/ https://reviews.llvm.org/D88590 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D88590: [clangd] Add benchmark for measuring latency of DecisionForest model.

2020-10-02 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz accepted this revision. adamcz added a comment. This revision is now accepted and ready to land. Still a couple of lint warnings, otherwise LGTM Comment at: clang-tools-extra/clangd/benchmarks/CompletionModel/DecisionForestBenchmark.cpp:74 + for (auto _ : State) { +

[PATCH] D88970: [clangd] Fix argument type (bool->float).

2020-10-07 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. adamcz added a reviewer: usaxena95. Herald added subscribers: cfe-commits, kadircet, arphaman. Herald added a project: clang. adamcz requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. The default value is 1.3f, but it was cast to true

[PATCH] D88970: [clangd] Fix argument type (bool->float).

2020-10-07 Thread Adam Czachorowski 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 rGbcd8422d7506: [clangd] Fix argument type (bool->float). (authored by adamcz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D88985: [clangd] Temporary fix for bad inference in Decision Forest.

2020-10-07 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz accepted this revision. adamcz added a comment. This revision is now accepted and ready to land. LG, but I'm not sure if we really need it. Up to you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88985/new/ https://reviews.llvm.org/D88985

[PATCH] D89307: [clangd] Disable extract variable for RHS of assignments

2020-10-13 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz accepted this revision. adamcz added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:400 + // This would just result in duplicating the code. + if (const auto *BO = Parent->ASTNode

[PATCH] D91966: [clangd] AddUsing: Used spelled text instead of type name.

2020-11-23 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman. Herald added a project: clang. adamcz requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. This improves the behavior related to type aliases, as well as cases of typ

[PATCH] D91966: [clangd] AddUsing: Used spelled text instead of type name.

2020-11-24 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 307347. adamcz marked an inline comment as done. adamcz added a comment. addressed review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91966/new/ https://reviews.llvm.org/D91966 Files: clang-tools-e

[PATCH] D91966: [clangd] AddUsing: Used spelled text instead of type name.

2020-11-24 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp:268 + SpelledTokens->back()); + llvm::StringRef NameRef = SpelledRange.text(SM); + kadircet wrote: > what about savi

[PATCH] D91966: [clangd] AddUsing: Used spelled text instead of type name.

2020-11-24 Thread Adam Czachorowski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf6e59294b63e: [clangd] AddUsing: Used spelled text instead of type name. (authored by adamcz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91966/new/ http

[PATCH] D92051: [clangd] PopulateSwitch: disable on dependent enums.

2020-11-24 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman. Herald added a project: clang. adamcz requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. If the enum is a dependent type, we would crash somewhere in getIntWidth().

[PATCH] D92053: [clangd] Addusing tweak: find insertion point after definition

2020-11-24 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman. Herald added a project: clang. adamcz requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. When type/function is defined in the middle of the file, previuosly we woul

[PATCH] D92053: [clangd] Addusing tweak: find insertion point after definition

2020-11-24 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 307429. adamcz added a comment. typo in description Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92053/new/ https://reviews.llvm.org/D92053 Files: clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp clan

[PATCH] D92053: [clangd] Addusing tweak: find insertion point after definition

2020-11-24 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 307446. adamcz marked an inline comment as done. adamcz added a comment. addressed review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92053/new/ https://reviews.llvm.org/D92053 Files: clang-tools-e

[PATCH] D92053: [clangd] Addusing tweak: find insertion point after definition

2020-11-24 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp:201 + for (const auto &TLD : TLDs) { +if (MustInsertAfterLoc.isValid() && +SM.isBeforeInTranslationUnit(TLD->getBeginLoc(), MustInsertAfterLoc)) kadircet

[PATCH] D92053: [clangd] Addusing tweak: find insertion point after definition

2020-11-24 Thread Adam Czachorowski 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 rGa200501bca4d: [clangd] Addusing tweak: find insertion point after definition (authored by adamcz). Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D92051: [clangd] PopulateSwitch: disable on dependent enums.

2020-11-25 Thread Adam Czachorowski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf6970503d291: [clangd] PopulateSwitch: disable on dependent enums. (authored by adamcz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92051/new/ https://re

[PATCH] D92186: [clangd] AddUsing: do not crash on non-namespace using decls.

2020-11-26 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman. Herald added a project: clang. adamcz requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D92186 Fil

[PATCH] D92186: [clangd] AddUsing: do not crash on non-namespace using decls.

2020-11-26 Thread Adam Czachorowski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9d87739f664b: [clangd] AddUsing: do not crash on non-namespace using decls. (authored by adamcz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92186/new/ h

[PATCH] D92408: [clangd] ExtractFunction: disable on regions that sometimes, but not always return.

2020-12-01 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman. Herald added a project: clang. adamcz requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. apply() will fail in those cases, so it's better to detect it in prepare()

[PATCH] D92494: [clangd] Bundle code completion items when the include paths differ, but resolve to the same file.

2020-12-02 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman. Herald added a project: clang. adamcz requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. This can happen when, for example, merging results from an external index t

[PATCH] D92494: [clangd] Bundle code completion items when the include paths differ, but resolve to the same file.

2020-12-02 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 309003. adamcz added a comment. -bracket Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92494/new/ https://reviews.llvm.org/D92494 Files: clang-tools-extra/clangd/CodeComplete.cpp clang-tools-extra/clangd/un

[PATCH] D92573: [clang] Add a C++17 deduction guide testcase.

2020-12-03 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz accepted this revision. adamcz added a comment. This revision is now accepted and ready to land. Thanks, adding this test is a very good idea. Comment at: clang/test/PCH/cxx17-deduction-guide-decl.cpp:16 + +// Class template argument deduction +template

[PATCH] D92494: [clangd] Bundle code completion items when the include paths differ, but resolve to the same file.

2020-12-03 Thread Adam Czachorowski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG517828a31b0d: [clangd] Bundle code completion items when the include paths differ, but… (authored by adamcz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D9

[PATCH] D92579: [clangd] AddUsing: Fix a crash on ElaboratedTypes without NestedNameSpecfiiers.

2020-12-03 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman. Herald added a project: clang. adamcz requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D92579 Fil

[PATCH] D92579: [clangd] AddUsing: Fix a crash on ElaboratedTypes without NestedNameSpecfiiers.

2020-12-03 Thread Adam Czachorowski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc282b7de5a5d: [clangd] AddUsing: Fix a crash on ElaboratedTypes without NestedNameSpecfiiers. (authored by adamcz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D92408: [clangd] ExtractFunction: disable on regions that sometimes, but not always return.

2020-12-07 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 309958. adamcz marked 2 inline comments as done. adamcz added a comment. addressed review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92408/new/ https://reviews.llvm.org/D92408 Files: clang-tools-e

[PATCH] D92408: [clangd] ExtractFunction: disable on regions that sometimes, but not always return.

2020-12-07 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92408/new/ https://reviews.llvm.org/D92408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D89571: [clangd] Add textDocument/ast extension method to dump the AST

2020-10-26 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:795 +unsigned Start, End; +if (auto O = positionToOffset(Inputs->Inputs.Contents, R.start)) + Start = *O; Please rename O to anything else. *O below looks

[PATCH] D89571: [clangd] Add textDocument/ast extension method to dump the AST

2020-10-29 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz accepted this revision. adamcz added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:799 + return CB(Offset.takeError()); +if (auto O = positionToOffset(Inputs->Inputs.Contents, R.end)

[PATCH] D103472: [clang] Fix a crash during code completion

2021-06-01 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. adamcz requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. During code completion, lookupInDeclContext() calls CodeCompletionDeclConsumer::FoundDecl(),which can mutate StoredDeclsMap, over which lookupInDeclContext

[PATCH] D103472: [clang] Fix a crash during code completion

2021-06-01 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added a reviewer: kadircet. adamcz added a comment. This is https://github.com/clangd/clangd/issues/771 Sending for review mostly to see if you have any comments on this approach. Trying to reproduce this without , or something like this didn't work for me so far, I must be holding it w

[PATCH] D103538: [clangd] Run code completion on each token coverd by --check-lines

2021-06-02 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. Herald added subscribers: usaxena95, kadircet, arphaman. adamcz requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. In --check mode we do not run code completion because it is too

[PATCH] D95145: [clang] Fix a nullptr dereference bug on invalid code

2021-01-22 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added inline comments. Comment at: clang/test/SemaCXX/subst-func-type-invalid-ret-type.cpp:2 +// RUN: %clang -fsyntax-only -std=c++17 %s -Xclang -verify +#include + hokein wrote: > A common practice is to avoid depending on STL in tests. I think we need t

[PATCH] D94919: [clangd] Fix a crash when indexing invalid ObjC method declaration

2021-01-22 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 318529. adamcz marked an inline comment as done. adamcz added a comment. addressed review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94919/new/ https://reviews.llvm.org/D94919 Files: clang-tools-e

[PATCH] D94919: [clangd] Fix a crash when indexing invalid ObjC method declaration

2021-01-22 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added inline comments. Comment at: clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp:1807-1811 +@interface Foo +- (void)fun:(bool)foo + bar:(bool)bar, + baz:(bool)baz; +@end dgoldman wrote: > It's hard to tell what Clang ma

[PATCH] D95145: [clang] Fix a nullptr dereference bug on invalid code

2021-01-22 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 318534. adamcz added a comment. addressed review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95145/new/ https://reviews.llvm.org/D95145 Files: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp clang

[PATCH] D95145: [clang] Fix a nullptr dereference bug on invalid code

2021-01-22 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added a comment. PTAL Comment at: clang/test/SemaCXX/subst-func-type-invalid-ret-type.cpp:2 +// RUN: %clang -fsyntax-only -std=c++17 %s -Xclang -verify +#include + adamcz wrote: > hokein wrote: > > A common practice is to avoid depending on STL in tests

[PATCH] D94919: [clangd] Fix a crash when indexing invalid ObjC method declaration

2021-01-22 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added a comment. The crash happens while indexing the file, not during code completion. The code completion tests generally specify a cursor position, but in this case it is not relevant and could confuse the reader. This seemed like a logical place for indexing bug, in the spirit of usi

[PATCH] D95145: [clang] Fix a nullptr dereference bug on invalid code

2021-01-25 Thread Adam Czachorowski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd462aa5a619a: [clang] Fix a nullptr dereference bug on invalid code (authored by adamcz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95145/new/ https://r

[PATCH] D94919: [clangd] Fix a crash when indexing invalid ObjC method declaration

2021-01-25 Thread Adam Czachorowski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG00054382b95a: [clangd] Fix a crash when indexing invalid ObjC method declaration (authored by adamcz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94919/ne

[PATCH] D110823: [clangd] Add code completion of param name on /* inside function calls.

2021-09-30 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. Herald added subscribers: usaxena95, kadircet, arphaman. adamcz requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. For example, if you have: void foo(int bar); foo(/*^ it s

[PATCH] D103538: [clangd] Run code completion on each token coverd by --check-lines

2021-06-04 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz marked an inline comment as done. adamcz added a comment. I didn't put much thought into where --check-lines goes. It's an interesting thought. I think having all the flags in one place is more valuable than trying to split them in some way. We contain all flags in the same place, close

[PATCH] D103538: [clangd] Run code completion on each token coverd by --check-lines

2021-06-04 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 349878. adamcz added a comment. review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103538/new/ https://reviews.llvm.org/D103538 Files: clang-tools-extra/clangd/tool/Check.cpp clang-tools-extra/cl

[PATCH] D103538: [clangd] Run code completion on each token coverd by --check-lines

2021-06-04 Thread Adam Czachorowski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGeba3ee04d450: [clangd] Run code completion on each token coverd by --check-lines (authored by adamcz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103538/n

[PATCH] D103472: [clang] Fix a crash during code completion

2021-06-07 Thread Adam Czachorowski 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 rG721476e6b211: [clang] Fix a crash during code completion (authored by adamcz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D103825: [clang] Do not crash when ArgTy is null in CheckArgAlignment

2021-06-07 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. adamcz requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. No repro case just yet. I only observed a crash like this and noticed ArgTy-Value = 0 in coredump. Repository: rG LLVM Github Monorepo https://reviews

[PATCH] D103825: [clang] Do not crash when ArgTy is null in CheckArgAlignment

2021-06-08 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 350612. adamcz added a comment. added a test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103825/new/ https://reviews.llvm.org/D103825 Files: clang/lib/Sema/SemaChecking.cpp clang/test/SemaCXX/recovery-exp

[PATCH] D103825: [clang] Do not crash when ArgTy is null in CheckArgAlignment

2021-06-08 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 350613. adamcz added a comment. update commit description Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103825/new/ https://reviews.llvm.org/D103825 Files: clang/lib/Sema/SemaChecking.cpp clang/test/SemaCXX

[PATCH] D103825: [clang] Do not crash when ArgTy is null in CheckArgAlignment

2021-06-08 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 350629. adamcz added a comment. Added some containsErrors() calls, not sure if that's the right thing to do Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103825/new/ https://reviews.llvm.org/D103825 Files: cl

[PATCH] D103825: [clang] Do not crash when ArgTy is null in CheckArgAlignment

2021-06-08 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added reviewers: kadircet, hokein. adamcz added a comment. FYI The ArgTy.isNull() check is sufficient to fix this. The Arg->containsErrors() is not - it's false in this case, since it seems CXXDefaultArgExpr with RecoveryExpr inside seems to not contains errors, according to containsErro

[PATCH] D103982: [clang] Make CXXDefaultArgExpr inherit dependence from the inner Expr

2021-06-09 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. adamcz added a reviewer: hokein. adamcz requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Before this change, CXXDefaultArgExpr would always have ExprDependence::None. This can lead to issues when, for example, t

[PATCH] D103825: [clang] Do not crash when ArgTy is null in CheckArgAlignment

2021-06-09 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added a comment. Thanks Haojian! I sent out https://reviews.llvm.org/D103982 for the CXXDefaultArgExpr. I'll update this change after I submit that one. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103825/new/ https://reviews.llvm.org/D103

[PATCH] D103982: [clang] Make CXXDefaultArgExpr inherit dependence from the inner Expr

2021-06-10 Thread Adam Czachorowski 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 rGa95937452f23: [clang] Make CXXDefaultArgExpr inherit dependence from the inner Expr (authored by adamcz). Repository: rG LLVM Github Monorepo CHA

[PATCH] D103825: [clang] Do not crash when ArgTy is null in CheckArgAlignment

2021-06-10 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 351155. adamcz added a comment. updated after the CXXDefaultArgExpr containsErrors() change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103825/new/ https://reviews.llvm.org/D103825 Files: clang/lib/Sema/Se

[PATCH] D103825: [clang] Do not crash when ArgTy is null in CheckArgAlignment

2021-06-10 Thread Adam Czachorowski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG49eba8bf1780: [clang] Do not crash when ArgTy is null in CheckArgAlignment (authored by adamcz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103825/new/ h

[PATCH] D105478: [clang] Make CXXRecrdDecl invalid if it contains any undeduced fields.

2021-08-02 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 363495. adamcz added a comment. ActOnInializerError instead of SetInvalidDecl Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105478/new/ https://reviews.llvm.org/D105478 Files: clang/lib/Parse/ParseDeclCXX.cpp

[PATCH] D105478: [clang] Make CXXRecrdDecl invalid if it contains any undeduced fields.

2021-08-02 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added inline comments. Comment at: clang/lib/Parse/ParseDeclCXX.cpp:2987 +if (ThisDecl) + ThisDecl->setInvalidDecl(); SkipUntil(tok::comma, StopAtSemi | StopBeforeMatch); hokein wrote: > it seems to me calling `Sema::ActOnInitiali

[PATCH] D105478: [clang] Make CXXRecrdDecl invalid if it contains any undeduced fields.

2021-08-03 Thread Adam Czachorowski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG08128fe7059e: [clang] Make member var invalid when static initializer is invalid. (authored by adamcz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105478/

<    1   2   3   4   >