[PATCH] D158413: [Lex] Introduce Preprocessor::LexTokensUntilEOF()

2023-10-03 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. This looks reasonable to me, but I'd wait for @aaron.ballman greenlight as he seems to have had more comments/ideas. Comment at: clang/lib/Lex/Preprocessor.cpp:1000 + std::vector toks; + while (1) { +Token tok; Hahnfeld

[PATCH] D158413: [Lex] Introduce Preprocessor::LexTokensUntilEOF()

2023-09-14 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/lib/Lex/Preprocessor.cpp:1000 + std::vector toks; + while (1) { +Token tok; aaron.ballman wrote: > Hahnfeld wrote: > > aaron.ballman wrote: > > > I'd prefer not to assume the token stream has an EOF

[PATCH] D158413: [Lex] Introduce Preprocessor::LexAll()

2023-09-14 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/lib/Lex/Preprocessor.cpp:998 +std::vector Preprocessor::LexAll() { + std::vector toks; Shouldn't we take the results as a `LexAll(std::vector )`? Perhaps we should rename this interface to

[PATCH] D158415: [Lex] Handle repl_input_end in Preprocessor::LexAll()

2023-09-14 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. @Hahnfeld, let's move forward and rely on a post-commit review here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158415/new/ https://reviews.llvm.org/D158415 ___

[PATCH] D159339: [urgent][CodeGen] First check the kind and then the llvm::Function properties.

2023-09-08 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In D159339#4642147 , @daltenty wrote: > FYI: I tried to reproduce this on `powerpc64le-linux-gnu` at `-02` and didn't > see it at this point, though I get a whole lot of other uninitialized reads, > so there's definitely

[PATCH] D159115: [clang-repl] Adapt to the recent dylib-related changes in ORC.

2023-09-08 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a subscriber: lkail. v.g.vassilev added a comment. In D159115#4642111 , @tuliom wrote: > In D159115#4641834 , @mgorny wrote: > >> Is that actually a regression, or merely the test wasn't

[PATCH] D159167: [clang-repl][Orc] Export executable symbols in ClangReplInterpreterExceptionTests

2023-09-07 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159167/new/ https://reviews.llvm.org/D159167

[PATCH] D159339: [urgent][CodeGen] First check the kind and then the llvm::Function properties.

2023-09-05 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a subscriber: Hahnfeld. v.g.vassilev added a comment. The issue goes away for non-CXXMethodDecls but still persists in the case where we process: CXXDestructorDecl 0x9ab0f48 col:11 implicit used ~shared_ptr 'void () noexcept' inline default `-CompoundStmt 0x9ac3ca0

[PATCH] D159115: [clang-repl] Adapt to the recent dylib-related changes in ORC.

2023-09-05 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In D159115#4638323 , @mgorny wrote: > Changing the type from `unsigned long long` to `uintptr_t` fix the test for > me. Ah! Nice catch! Can you commit the fix? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D158415: [Lex] Handle repl_input_end in Preprocessor::LexAll()

2023-09-04 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. Looks reasonable to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158415/new/ https://reviews.llvm.org/D158415

[PATCH] D159339: [urgent][CodeGen] First check the kind and then the llvm::Function properties.

2023-09-01 Thread Vassil Vassilev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG92246a9be0ba: [CodeGen] First check the kind and then the llvm::Function properties. (authored by v.g.vassilev). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D159339: [urgent][CodeGen] First check the kind and then the llvm::Function properties.

2023-09-01 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2389 if (getTarget().getCXXABI().areMemberFunctionsAligned()) { -if (F->getPointerAlignment(getDataLayout()) < 2 && isa(D)) +if (isa(D) && F->getPointerAlignment(getDataLayout()) < 2)

[PATCH] D159339: [urgent][CodeGen] First check the kind and then the llvm::Function properties.

2023-09-01 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2389 if (getTarget().getCXXABI().areMemberFunctionsAligned()) { -if (F->getPointerAlignment(getDataLayout()) < 2 && isa(D)) +if (isa(D) && F->getPointerAlignment(getDataLayout()) < 2)

[PATCH] D159339: [urgent][CodeGen] First check the kind and then the llvm::Function properties.

2023-09-01 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev created this revision. v.g.vassilev added reviewers: rjmccall, daltenty, aaron.ballman. Herald added a subscriber: pengfei. Herald added a project: All. v.g.vassilev requested review of this revision. Herald added a subscriber: wangpc. This patch fixes valgrind reports from

[PATCH] D159115: [clang-repl] Adapt to the recent dylib-related changes in ORC.

2023-08-29 Thread Vassil Vassilev 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 rG196d8569d46d: [clang-repl] Adapt to the recent dylib-related changes in ORC. (authored by v.g.vassilev). Herald added a project: clang. Repository:

[PATCH] D159115: [clang-repl] Adapt to the recent dylib-related changes in ORC.

2023-08-29 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 554385. v.g.vassilev marked an inline comment as done. v.g.vassilev added a comment. Address style comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159115/new/ https://reviews.llvm.org/D159115 Files:

[PATCH] D159115: [clang-repl] Adapt to the recent dylib-related changes in ORC.

2023-08-29 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 554378. v.g.vassilev added a comment. Address review comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159115/new/ https://reviews.llvm.org/D159115 Files: clang/lib/Interpreter/IncrementalExecutor.cpp

[PATCH] D159115: [clang-repl] Adapt to the recent dylib-related changes in ORC.

2023-08-29 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev created this revision. v.g.vassilev added reviewers: lhames, sunho. Herald added a project: All. v.g.vassilev requested review of this revision. ORC splits into separate dylibs symbols coming from the process and symbols materialized in the Jit. This patch adapts intent of the

[PATCH] D159018: [clang][modules] Add a c23 module feature

2023-08-29 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. LGTM! In D159018#4622598 , @iana wrote: > Would we want to back port this to llvm 17? Yes probably. Repository: rG LLVM Github

[PATCH] D154382: [ClangRepl] support code completion at a REPL

2023-08-28 Thread Vassil Vassilev 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 rG5ab25a42ba70: Reland [clang-repl] support code completion at a REPL. (authored by capfredf, committed by v.g.vassilev). Changed prior to commit:

[PATCH] D154382: [ClangRepl] support code completion at a REPL

2023-08-25 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/unittests/Interpreter/CodeCompletionTest.cpp:38 + + std::vector Results; + We should make this an out parameter instead of returning it by copy. Comment at:

[PATCH] D158140: WIP: [clang-repl] Basic WebAssembly support for running inside a JS engine

2023-08-24 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/lib/Interpreter/WASM.cpp:79 + int Result = + lld::wasm::link(LinkerArgs, llvm::outs(), llvm::errs(), false, false); + if (!Result) sbc100 wrote: > v.g.vassilev wrote: > > sbc100 wrote: > > > argentite

[PATCH] D151904: [clang-repl][CUDA] Add an unit test for interactive CUDA

2023-08-24 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. @argentite ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151904/new/ https://reviews.llvm.org/D151904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D158140: WIP: [clang-repl] Basic WebAssembly support for running inside a JS engine

2023-08-23 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/lib/Interpreter/WASM.cpp:79 + int Result = + lld::wasm::link(LinkerArgs, llvm::outs(), llvm::errs(), false, false); + if (!Result) sbc100 wrote: > argentite wrote: > > v.g.vassilev wrote: > > > I am

[PATCH] D156858: Add Documentation for Execution Results Handling in Clang-REPL

2023-08-23 Thread Vassil Vassilev 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 rG3edd338a6407: [clang-repl] Add Documentation for Execution Results Handling. (authored by Krishna-13-cyber, committed by v.g.vassilev). Repository:

[PATCH] D156858: Add Documentation for Execution Results Handling in Clang-REPL

2023-08-23 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. The pre-merge check seems to fail at clang-format for some reason. This patch does not change anything that should be formatted by clang-format. We will try to add the images as editable graphviz content. We need to see if the

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-08-23 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In D148997#4607833 , @bnbarham wrote: > In D148997#4561620 , @v.g.vassilev > wrote: > >> So, in that case we should bring back the boolean flag for incremental >> processing and

[PATCH] D154382: [ClangRepl] support code completion at a REPL

2023-08-23 Thread Vassil Vassilev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGeb0e6c3134ef: [clang-repl] support code completion at a REPL. (authored by capfredf, committed by v.g.vassilev). Changed prior to commit: https://reviews.llvm.org/D154382?vs=552418=552696#toc

[PATCH] D158140: WIP: [clang-repl] Basic WebAssembly support for running inside a JS engine

2023-08-23 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added reviewers: pmatos, tlively. v.g.vassilev added a comment. Let's add more reviewers to see if we can figure out how to move forward here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158140/new/ https://reviews.llvm.org/D158140

[PATCH] D158140: WIP: [clang-repl] Basic WebAssembly support for running inside a JS engine

2023-08-23 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. This is quite exciting! Most of it looks already good enough to me. See inline comment. Comment at: clang/lib/Interpreter/WASM.cpp:79 + int Result = + lld::wasm::link(LinkerArgs, llvm::outs(), llvm::errs(), false, false); + if (!Result)

[PATCH] D157838: [clang-repl] Disambiguate declarations with private typedefs

2023-08-21 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. This change looks reasonable to me. Comment at: clang/test/Interpreter/disambiguate-decl-stmt.cpp:74 +// expected-error@-1 2 {{'Inner' is a private member of

[PATCH] D154382: [ClangRepl] support code completion at a REPL

2023-08-19 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. Thanks for working on this @capfredf. Let me know if I should land that for you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154382/new/ https://reviews.llvm.org/D154382

[PATCH] D157838: [clang-repl] Disambiguate declarations with private typedefs

2023-08-18 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/lib/Parse/ParseTentative.cpp:94 + // involve namespaces and friend declarations. + if (NextToken().is(tok::identifier)) +return true; I am wondering what is the false positive

[PATCH] D154382: [ClangRepl] support code completion at a REPL

2023-08-17 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. @sammccall could you take another look? It seems quite ready to me to land. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154382/new/ https://reviews.llvm.org/D154382 ___

[PATCH] D156537: [CodeGen] Keep track of eagerly emitted globals

2023-08-15 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In D156537#4587874 , @aaron.ballman wrote: > In D156537#4587832 , @v.g.vassilev > wrote: > >> @Hahnfeld, let's move forward and rely on a post-commit review here if >> necessary.

[PATCH] D156537: [CodeGen] Keep track of eagerly emitted globals

2023-08-15 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. @Hahnfeld, let's move forward and rely on a post-commit review here if necessary. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D157379: [CodeGen] Restrict addEmittedDeferredDecl to incremental extensions

2023-08-15 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. @Hahnfeld, let's move forward and rely on a post-commit review here if necessary. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D154382: [ClangRepl] support code completion at a REPL

2023-08-13 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/lib/Interpreter/CodeCompletion.cpp:1 +//===-- CodeCompletion.cpp - Code Completion for ClangRepl ---===// +// I would propose to rename this file to `InterpreterCodeCompletion.cpp` and implement the

[PATCH] D151904: [clang-repl][CUDA] Add an unit test for interactive CUDA

2023-08-13 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. @argentite what is the fate of this patch? Should we move forward with it? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151904/new/ https://reviews.llvm.org/D151904 ___

[PATCH] D154382: [ClangRepl] support code completion at a REPL

2023-08-13 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a reviewer: sammccall. v.g.vassilev added a subscriber: sammccall. v.g.vassilev added a comment. This looks mostly good to me. I noticed that @sammccall has done some work in that area in clangd and I was wondering if he has some thoughts about this patch. Repository: rG

[PATCH] D154382: [ClangRepl] support code completion at a REPL

2023-08-13 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/lib/Interpreter/IncrementalParser.h:91 + +class IncrementalSyntaxOnlyAction : public SyntaxOnlyAction { + const CompilerInstance *ParentCI; Can we not move this class definition locally to the CodeComplete

[PATCH] D156858: Add Documentation for Execution Results Handling in Clang-REPL

2023-08-13 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/docs/ClangRepl.rst:221 + +Execution Results Handling features discussed below help extend the Clang-REPL +functionality by creating an interface between the execution results of a We should probably spell

[PATCH] D156897: [CodeGen] Clean up access to EmittedDeferredDecls, NFCI.

2023-08-10 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. Looks reasonable to me. Let's give @rjmccall couple of more days to respond. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156897/new/ https://reviews.llvm.org/D156897 ___

[PATCH] D157480: [clang-repl] Disambiguate global namespace identifiers

2023-08-09 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157480/new/ https://reviews.llvm.org/D157480 ___ cfe-commits mailing list

[PATCH] D157477: [clang-repl] Add test for disambiguation of templates

2023-08-09 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. If you have not merged this patch please consider my comment. Comment at: clang/test/Interpreter/namespace-template-disambiguate.cpp:7 +namespace NS2 { struct A { public: using S = int; }; } +namespace NS2 { A::S f(A::S a); } + It

[PATCH] D157480: [clang-repl] Disambiguate global namespace identifiers

2023-08-09 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/test/Interpreter/global-namespace-disambiguate.cpp:6 +struct A { ~A(); }; +::A::~A() {} + Can we add this test to `disambiguate-decl-stmt.cpp` instead where we track these things? Repository: rG LLVM

[PATCH] D156858: Add Documentation for Execution Results Handling in Clang-REPL

2023-08-09 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/docs/ExecutionResultsHandling.rst:80 + +For example, the CPPYY code makes use of this feature to enable running +C++ within Python. It enables transporting values/information between C++ cppyy seems

[PATCH] D157477: [clang-repl] Add test for disambiguation of templates

2023-08-09 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. Thanks, @Hahnfeld! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157477/new/ https://reviews.llvm.org/D157477

[PATCH] D157379: [CodeGen] Restrict addEmittedDeferredDecl to incremental extensions

2023-08-08 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. This LGTM but I'd like to wait for @rjmccall for a week or so. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157379/new/ https://reviews.llvm.org/D157379 ___ cfe-commits

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-08-04 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In D148997#4561614 , @bnbarham wrote: > In D148997#4561577 , @v.g.vassilev > wrote: > >>> My other concern here is that it seems our use cases are somewhat >>> different, eg. we

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-08-04 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In D148997#4561516 , @bnbarham wrote: > In D148997#4561211 , @v.g.vassilev > wrote: > >

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-08-04 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In D148997#4561068 , @bnbarham wrote: > In D148997#4561022 , @v.g.vassilev > wrote: > >> I meant that I'd like to figure out if we could use the >> `annot_repl_input_end` before

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-08-04 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In D148997#4561015 , @bnbarham wrote: > In D148997#4559788 , @v.g.vassilev > wrote: > >> I'd prefer to avoid adding a new flag. Is there a way to see how does the >> diff looks

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-08-04 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In D148997#4559646 , @bnbarham wrote: >> Are there other users of incremental processing mode, other than the REPL / >> IncrementalParser? > > It seems Swift's clang importer also uses incremental processing mode, I'm >

[PATCH] D156877: Update Clang-REPL docs with removing the redundant subsections

2023-08-03 Thread Vassil Vassilev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG54081868dd22: [clang-repl] Remove redundant subsections from the table of content. (authored by Krishna-13-cyber, committed by v.g.vassilev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D156858: Add Documentation for Execution Results Handling in Clang-REPL

2023-08-03 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/docs/index.rst:96 ClangRepl + ExecutionResultsHandling We should probably move that under `ClangRepl`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D156877: Update Clang-REPL docs with removing the redundant subsections

2023-08-03 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156877/new/ https://reviews.llvm.org/D156877

[PATCH] D156537: [CodeGen] Keep track of eagerly emitted globals

2023-08-02 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In D156537#4554052 , @Hahnfeld wrote: > @v.g.vassilev do we have a means to detect this case? In D156897 > , I'm refactoring all accesses to > `EmittedDeferredDecl` to go via

[PATCH] D154382: [ClangRepl] support code completion at a REPL

2023-07-31 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. I think we are getting there. I added a few suggestions how to improve the current design. Comment at: clang/include/clang/Interpreter/CodeCompletion.h:15 +#define LLVM_CLANG_INTERPRETER_CODE_COMPLETION_H +#include "llvm/LineEditor/LineEditor.h"

[PATCH] D156660: [CodeGen] Assert that EmittedDeferredDecls is empty

2023-07-31 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156660/new/ https://reviews.llvm.org/D156660

[PATCH] D156425: [clang-repl] Remove redundant tests

2023-07-27 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev 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/D156425/new/ https://reviews.llvm.org/D156425

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2023-07-22 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a subscriber: alexfh. v.g.vassilev added a comment. @alexfh, could you test that patch on your internal infrastructure and check if it actually decreases the memory footprint and/or compile times? I believe this was the only blocker to land it as it is. CHANGES SINCE LAST

[PATCH] D154324: [C++20] [Modules] [ODRHash] Use CanonicalType for base classes

2023-07-22 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In D154324#4524368 , @rsmith wrote: > In D154324#4524235 , @v.g.vassilev > wrote: > >> @rsmith, thanks for the suggestions! Could you go over >> `ODRHash::AddTemplateName` suggest

[PATCH] D154324: [C++20] [Modules] [ODRHash] Use CanonicalType for base classes

2023-07-21 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. @rsmith, thanks for the suggestions! Could you go over `ODRHash::AddTemplateName` suggest how to fix it to address https://reviews.llvm.org/D153003 and https://reviews.llvm.org/D41416#4496451? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D154382: [ClangRepl] support code completion at a REPL

2023-07-20 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/unittests/Interpreter/CodeCompletionTest.cpp:71 +Completer(std::string("void app("), 9); + EXPECT_EQ((size_t)0, out.length()); +} capfredf wrote: > @v.g.vassilev The way I fixed this is a bit hacky. Do

[PATCH] D146809: [clang-repl] Implement pretty printing of custom types.

2023-07-17 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 541061. v.g.vassilev added a comment. Add forgotten file. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h

[PATCH] D146809: [clang-repl] Implement pretty printing of custom types.

2023-07-17 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/lib/Headers/__clang_interpreter_runtime_printvalue.h:79 + +template struct is_iterable : std::false_type {}; + aaron.ballman wrote: > Still need to make sure you're using reserved identifiers for these

[PATCH] D146809: [clang-repl] Implement pretty printing of custom types.

2023-07-17 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 541048. v.g.vassilev marked 5 inline comments as done. v.g.vassilev retitled this revision from "[clang-repl] Implement Value pretty printing" to "[clang-repl] Implement pretty printing of custom types.". v.g.vassilev added a comment. Herald added a

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2023-07-13 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In D41416#4496389 , @ChuanqiXu wrote: > In D41416#4496293 , @v.g.vassilev > wrote: > >> In D41416#4492367 , @v.g.vassilev >> wrote: >> >>>

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2023-07-13 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In D41416#4492367 , @v.g.vassilev wrote: > Address most of the comments. I will need some help with the > `Modules/pr60085.cppm` failure. I suspect we pass to CodeGen some > instantiation by iterator index and that does

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2023-07-12 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 539670. v.g.vassilev added a comment. Fix the odr_hash.cpp failure. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D41416/new/ https://reviews.llvm.org/D41416 Files: clang/include/clang/AST/DeclTemplate.h clang/lib/AST/DeclTemplate.cpp

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2023-07-12 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 539664. v.g.vassilev added a comment. Fix a compilation error. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D41416/new/ https://reviews.llvm.org/D41416 Files: clang/include/clang/AST/DeclTemplate.h clang/lib/AST/DeclTemplate.cpp

[PATCH] D154382: [ClangRepl] support code completion at a REPL

2023-07-12 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/include/clang/Sema/CodeCompleteConsumer.h:342 +/// Code completion at a top level in a REPL session. +CCC_ReplTopLevel, }; Comment at:

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-07-12 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev commandeered this revision. v.g.vassilev edited reviewers, added: junaire; removed: v.g.vassilev. v.g.vassilev added a comment. Jun has moved on in his career and I'd like to take responsibility for this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D154382: [ClangRepl] support code completion at a REPL

2023-07-12 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a reviewer: aaron.ballman. v.g.vassilev added a subscriber: aaron.ballman. v.g.vassilev added a comment. @capfredf this seems to be heading in a good direction. Please find another round of comments. @aaron.ballman, I could not find a person that's active in that area. Could

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2023-07-12 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/test/Modules/odr_hash.cpp:2905 // expected-error@second.h:* {{'PointersAndReferences::S5::x' from module 'SecondModule' is not present in definition of 'PointersAndReferences::S5' in module 'FirstModule'}} -//

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2023-07-12 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/lib/AST/DeclTemplate.cpp:337 +void RedeclarableTemplateDecl::loadLazySpecializationsImpl( + bool OnlyPartial/*=false*/) const { // Grab the most recent declaration to ensure

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2023-07-12 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 539409. v.g.vassilev marked 7 inline comments as done. v.g.vassilev added a comment. Address most of the comments. I will need some help with the `Modules/pr60085.cppm` failure. I suspect we pass to CodeGen some instantiation by iterator index and that

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2023-07-11 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/lib/Serialization/ASTWriterDecl.cpp:288 + } + for (auto : LazySpecializations) { +Record.push_back(SpecInfo.DeclID); SAtacker wrote: > ChuanqiXu wrote: > > v.g.vassilev wrote: > > > We

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2023-07-10 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 538633. v.g.vassilev added a comment. Rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D41416/new/ https://reviews.llvm.org/D41416 Files: clang/include/clang/AST/DeclTemplate.h clang/lib/AST/DeclTemplate.cpp

[PATCH] D154382: [ClangRepl] support code completion at a REPL

2023-07-06 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. Can you extend the commit log to include a description of how things are currently done? For example, it would be good to read about design and technical decisions, etc. Comment at: clang/lib/Interpreter/CodeCompletion.cpp:79 + if (auto Err =

[PATCH] D152109: Update clang-repl documentation

2023-07-05 Thread Vassil Vassilev 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 rG1ac3e13c3e4a: [clang-repl] Improve the clang-repl documentation. (authored by Krishna-13-cyber, committed by v.g.vassilev). Repository: rG LLVM

[PATCH] D152109: Update clang-repl documentation

2023-06-30 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. LGTM! If you don't have commit access I can commit this on your behalf. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152109/new/ https://reviews.llvm.org/D152109

[PATCH] D153003: [ODRHash] Fix ODR hashing of template names

2023-06-30 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In D153003#4462388 , @ChuanqiXu wrote: >> Oh, I guess we're somehow adding a semi-resolved form of the base class type >> of D into the ODR hash, which then includes details of the >> using-declaration. That seems wrong --

[PATCH] D152109: Update clang-repl documentation

2023-06-10 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/docs/ClangRepl.rst:119 + clang-repl> int c = sum(9,10); + clang-repl> std::cout << c; + 19clang-repl> Comment at: clang/docs/ClangRepl.rst:120 + clang-repl> std::cout << c; +

[PATCH] D152109: Update clang-repl documentation

2023-06-07 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. I think this is heading in a good direction. Please find some comments inline. Comment at: clang/docs/ClangRepl.rst:60 + +Clang-Repl-Usage + Comment at:

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-29 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/lib/Interpreter/ValuePrinter.cpp:1 +#include "InterpreterUtils.h" +#include "clang/AST/ASTContext.h" Please add the llvm preamble. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-29 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/lib/Interpreter/IncrementalParser.h:86 + Parser () { return *P; } + Is that used? Comment at: clang/lib/Interpreter/ValuePrinter.cpp:262 + +static llvm::Expected CompileDecl(Interpreter

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-28 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/include/clang/Interpreter/Interpreter.h:113 llvm::Expected CompileDtorCall(CXXRecordDecl *CXXRD); + std::string CreateUniqName(std::string Base); We should move this routine to its user in maybe

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-24 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added subscribers: sunho, sgraenitz, lhames. v.g.vassilev added a comment. I believe this is heading in a good direction. Here are some comments from a partial review. Also perhaps we should extend the patch description (future commit message) to capture the idea of the

[PATCH] D150937: [clang-repl] Disable all tests on unsupported platforms

2023-05-22 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. I would support this change but instead of asking the JIT we should just add `-fsyntax-only` to these invocations as they do not rely on the JIT at all. Comment at: clang/test/Interpreter/incremental-mode.cpp:3 // RUN: clang-repl -Xcc -emit-llvm

[PATCH] D146389: [clang-repl][CUDA] Initial interactive CUDA support for clang-repl

2023-05-20 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In D146389#4358358 , @argentite wrote: > Added some std::move fixes for Error -> Expected conversions > > We need to figure out a solution when NVPTX backend is not enabled. > clang-repl probably should not depends on that.

[PATCH] D150139: [clang-repl] Enable basic multiline support.

2023-05-20 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev closed this revision. v.g.vassilev added a comment. Landed in c96c5edb58ed29e0fd936bc082ec6cae7082854e Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150139/new/

[PATCH] D146389: [clang-repl][CUDA] Initial interactive CUDA support for clang-repl

2023-05-16 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146389/new/ https://reviews.llvm.org/D146389

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-16 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. I believe we are at the stage of better is enemy of good now. This looks good to me. I'd recommend to wait for @aaron.ballman's final review. Repository: rG LLVM Github

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-16 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/include/clang/Interpreter/Value.h:23 +// +// NOTE: Since the REPL itself could also include this runtime, extreme caution +// should be taken when MAKING CHANGES to this file, especially when INCLUDE NEW I

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-05-15 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. LGTM! Thanks for putting so much efforts into this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148997/new/

[PATCH] D146389: [clang-repl][CUDA] Initial interactive CUDA support for clang-repl

2023-05-15 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. This is looking good. Can you address my minor comments and run clang-format? Comment at: clang/lib/Interpreter/DeviceOffload.cpp:1 +//===-- Offload.cpp - CUDA Offloading ---*- C++ -*-===// +//

[PATCH] D146389: [clang-repl][CUDA] Initial interactive CUDA support for clang-repl

2023-05-13 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/lib/CodeGen/ModuleBuilder.cpp:39 const PreprocessorOptions // Only used for debug info. -const CodeGenOptions CodeGenOpts; // Intentionally copied in. +CodeGenOptions CodeGenOpts; // Intentionally copied in.

[PATCH] D146389: [clang-repl][CUDA] Initial interactive CUDA support for clang-repl

2023-05-12 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/lib/CodeGen/ModuleBuilder.cpp:39 const PreprocessorOptions // Only used for debug info. -const CodeGenOptions CodeGenOpts; // Intentionally copied in. +CodeGenOptions CodeGenOpts; // Intentionally copied in.

  1   2   3   4   5   6   7   >