[clang] [clang-repl][CMake][MSVC] Use LINKER: instead of `-Wl` (PR #118518)

2024-12-03 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/118518 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] fix error recovery while parsing completely fails (PR #127087)

2025-02-13 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev closed https://github.com/llvm/llvm-project/pull/127087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] fix error recovery while parsing completely fails (PR #127087)

2025-02-13 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. Lgtm! Thank you, @Vipul-Cariappa! https://github.com/llvm/llvm-project/pull/127087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2025-02-24 Thread Vassil Vassilev via cfe-commits
@@ -2639,6 +2628,19 @@ void Sema::MergeTypedefNameDecl(Scope *S, TypedefNameDecl *New, notePreviousDefinition(Old, New->getLocation()); } +void Sema::CleanupMergedEnum(Scope *S, Decl *New) { vgvassilev wrote: I realize that `Sema::ActOnDuplicateDefinition`

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2025-02-24 Thread Vassil Vassilev via cfe-commits
@@ -2551,18 +2551,7 @@ void Sema::MergeTypedefNameDecl(Scope *S, TypedefNameDecl *New, // Make the old tag definition visible. makeMergedDefinitionVisible(Hidden); - // If this was an unscoped enumeration, yank all of its enumerators - // out of the scop

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-02-26 Thread Vassil Vassilev via cfe-commits
@@ -114,6 +114,13 @@ TEST_F(InterpreterTest, Errors) { RecoverErr = Interp->Parse("var1 = 424;"); EXPECT_TRUE(!!RecoverErr); + + Err = Interp->Parse("int x = 5; auto capture = [&]() { return x * 2; };").takeError(); vgvassilev wrote: There is no such a

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-02-26 Thread Vassil Vassilev via cfe-commits
@@ -114,6 +114,13 @@ TEST_F(InterpreterTest, Errors) { RecoverErr = Interp->Parse("var1 = 424;"); EXPECT_TRUE(!!RecoverErr); + + Err = Interp->Parse("int x = 5; auto capture = [&]() { return x * 2; };").takeError(); vgvassilev wrote: Can we move this te

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-02-26 Thread Vassil Vassilev via cfe-commits
@@ -178,8 +178,8 @@ void IncrementalParser::CleanUpPTU(TranslationUnitDecl *MostRecentTU) { if (!ND) continue; // Check if we need to clean up the IdResolver chain. -if (ND->getDeclName().getFETokenInfo() && !D->getLangOpts().ObjC && -!D->getLangOpts(

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2025-02-17 Thread Vassil Vassilev via cfe-commits
@@ -571,11 +571,8 @@ StmtResult Parser::ParseExprStatement(ParsedStmtContext StmtCtx) { } Token *CurTok = nullptr; - // If the semicolon is missing at the end of REPL input, consider if - // we want to do value printing. Note this is only enabled in C++ mode - // since

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2025-03-07 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/114240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2025-03-07 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Please rebase this PR. https://github.com/llvm/llvm-project/pull/114240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Disable EmulatedTLS on Windows for interpreter executor (PR #127468)

2025-03-06 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Our local windows expert is @bellenot. Maybe he can help us out here. https://github.com/llvm/llvm-project/pull/127468 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-03-11 Thread Vassil Vassilev via cfe-commits
@@ -1,7 +1,8 @@ // REQUIRES: host-supports-jit // UNSUPPORTED: system-aix // RUN: cat %s | clang-repl | FileCheck %s -// RUN: cat %s | clang-repl -Xcc -O2 | FileCheck %s +// RUN: cat %s | not clang-repl -Xcc -Xclang -Xcc -verify -Xcc -O2 | FileCheck %s vgvassi

[clang] [modules] Add missing test file for b21ee08e57173102b67bc18237b135550 (PR #129221)

2025-02-28 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/129221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add `pragma clang scope [push|pop]` (PR #121025)

2025-03-01 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: I wonder if we had an rfc for this. Maybe we should solicit some feedback before moving forward with this extension. https://github.com/llvm/llvm-project/pull/121025 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-03-12 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/127467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix target creation in Wasm.cpp (PR #130909)

2025-03-12 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/130909 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-25 Thread Vassil Vassilev via cfe-commits
@@ -711,6 +712,14 @@ llvm::Error Interpreter::Undo(unsigned N) { } llvm::Error Interpreter::LoadDynamicLibrary(const char *name) { +#ifdef __EMSCRIPTEN__ + void *handle = dlopen(name, RTLD_NOW | RTLD_GLOBAL); + if (!handle) { +llvm::errs() << dlerror() << '\n'; +retu

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-03-26 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: @ilya-biryukov, would you mind giving this PR a test on your infrastructure and if it works maybe share some performance results? https://github.com/llvm/llvm-project/pull/133057 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-03-28 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > > > > > While I may not able to look into them in detail recently, it may be > > > > > helpful to split this into seperate patches to review and to land. > > > > > > > > > > > > I initially considered this, but @vgvassilev said in > > > > [root-project/root#17722 > > > >

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-04-01 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > > We really need to figure out how to add in-tree tests. > > Yupp sadly I was only able to test this through cppinterop and xeus-cpp as > I've commented above ([#133037 > (comment)](https://github.com/llvm/llvm-project/pull/133037#discussion_r2015819533)) > where it works

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-03-28 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > The small-scale benchmarks we had show 10% improvement in CPU and 23% > improvement in memory usage for some compilations! That's very good news. I think we can further reduce these times. IIRC, we still deserialize declarations that we do not need. One of the places to loo

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-31 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: We really need to figure out how to add in-tree tests. https://github.com/llvm/llvm-project/pull/133037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-03-31 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. Lgtm! https://github.com/llvm/llvm-project/pull/127467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Define LLVM_ABI and CLANG_ABI for __EMSCRIPTEN__ builds (PR #131578)

2025-03-31 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev milestoned https://github.com/llvm/llvm-project/pull/131578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-04-11 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > > Here's a new reproducer, this time verifying that a semi-fresh > > tip-of-the-tree doesn't trigger the same error: > > https://pastebin.com/7tYfjazz. Apologies for the delay. > > Thanks. I gave it a try, but I don't see any `use of overloaded operator '=' > is ambiguous`

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-04-11 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > > > Here's a new reproducer, this time verifying that a semi-fresh > > > tip-of-the-tree doesn't trigger the same error: > > > https://pastebin.com/7tYfjazz. Apologies for the delay. > > > > > > Thanks. I gave it a try, but I don't see any `use of overloaded operator > >

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-04-04 Thread Vassil Vassilev via cfe-commits
@@ -14,4 +15,13 @@ auto r2 = l2(); auto r3 = l2(); // CHECK: TWO -%quit +// Verify non-local lambda capture error is correctly reported +int x = 42; + +// expected-error {{non-local lambda expression cannot have a capture-default}} +auto capture = [&]() { return x * 2; }; + --

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-03-28 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > > > While I may not able to look into them in detail recently, it may be > > > helpful to split this into seperate patches to review and to land. > > > > > > I initially considered this, but @vgvassilev said in > > [root-project/root#17722 > > (comment)](https://github.co

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-18 Thread Vassil Vassilev via cfe-commits
@@ -451,13 +451,44 @@ const char *const Runtimes = R"( )"; llvm::Expected> -Interpreter::create(std::unique_ptr CI) { +Interpreter::create(std::unique_ptr CI, +std::unique_ptr DeviceCI) { llvm::Error Err = llvm::Error::success(); auto Interp =

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-18 Thread Vassil Vassilev via cfe-commits
@@ -451,13 +451,44 @@ const char *const Runtimes = R"( )"; llvm::Expected> -Interpreter::create(std::unique_ptr CI) { +Interpreter::create(std::unique_ptr CI, +std::unique_ptr DeviceCI) { llvm::Error Err = llvm::Error::success(); auto Interp =

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-19 Thread Vassil Vassilev via cfe-commits
@@ -451,13 +451,44 @@ const char *const Runtimes = R"( )"; llvm::Expected> -Interpreter::create(std::unique_ptr CI) { +Interpreter::create(std::unique_ptr CI, +std::unique_ptr DeviceCI) { llvm::Error Err = llvm::Error::success(); auto Interp =

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-28 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev milestoned https://github.com/llvm/llvm-project/pull/136404 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-04-28 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev milestoned https://github.com/llvm/llvm-project/pull/133037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-24 Thread Vassil Vassilev via cfe-commits
@@ -28,20 +28,21 @@ IncrementalCUDADeviceParser::IncrementalCUDADeviceParser( std::unique_ptr DeviceInstance, CompilerInstance &HostInstance, llvm::IntrusiveRefCntPtr FS, -llvm::Error &Err, const std::list &PTUs) vgvassilev wrote: Why removing

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-24 Thread Vassil Vassilev via cfe-commits
@@ -172,6 +154,19 @@ llvm::Error IncrementalCUDADeviceParser::GenerateFatbinary() { FatbinContent.append(PTXCode.begin(), PTXCode.end()); + auto &PTU = PTUs.back(); vgvassilev wrote: ```suggestion const PartialTranslationUnit &PTU = PTUs.back(); ``` h

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-24 Thread Vassil Vassilev via cfe-commits
@@ -760,8 +787,10 @@ std::unique_ptr Interpreter::GenModule() { return nullptr; } -CodeGenerator *Interpreter::getCodeGen() const { - FrontendAction *WrappedAct = Act->getWrapped(); +CodeGenerator *Interpreter::getCodeGen(IncrementalAction *Action) const { + if (!Action) +

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-24 Thread Vassil Vassilev via cfe-commits
@@ -50,25 +50,6 @@ IncrementalCUDADeviceParser::Parse(llvm::StringRef Input) { if (!PTU) return PTU.takeError(); - auto PTX = GeneratePTX(); vgvassilev wrote: If this code moved, can't we rely on the base class implementation of `Parse` here? https:/

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-24 Thread Vassil Vassilev via cfe-commits
@@ -28,20 +28,21 @@ IncrementalCUDADeviceParser::IncrementalCUDADeviceParser( std::unique_ptr DeviceInstance, CompilerInstance &HostInstance, llvm::IntrusiveRefCntPtr FS, -llvm::Error &Err, const std::list &PTUs) +llvm::Error &Err, std::list &PTUs) : In

[clang] [Modules] Fix an identifier hiding a function-like macro definition. (PR #135471)

2025-04-14 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev commented: The patch looks reasonable to me, however, I'd wait for somebody with more experience in the macro logic in modules. https://github.com/llvm/llvm-project/pull/135471 ___ cfe-commits mailing list cfe-commits@lis

[clang] [Modules] Fix an identifier hiding a function-like macro definition. (PR #135471)

2025-04-11 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Thanks! Does the pr fix https://bugs.llvm.org//show_bug.cgi?id=32670 https://github.com/llvm/llvm-project/pull/135471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix destructor for interpreter for the cuda negation case (PR #138091)

2025-05-05 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/138091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix destructor for interpreter for the cuda negation case (PR #138091)

2025-05-05 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev closed https://github.com/llvm/llvm-project/pull/138091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix destructor for interpreter for the cuda negation case (PR #138091)

2025-05-05 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev milestoned https://github.com/llvm/llvm-project/pull/138091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix destructor for interpreter for the cuda negation case (PR #138091)

2025-05-05 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Generally we should wait a day or two for the bots to go through these changes... https://github.com/llvm/llvm-project/pull/138091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [llvm] Prefer std::getenv to ::getenv (PR #108529)

2025-04-24 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Yes. Good point. https://github.com/llvm/llvm-project/pull/108529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Prefer std::getenv to ::getenv (PR #108529)

2025-04-24 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev closed https://github.com/llvm/llvm-project/pull/108529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-24 Thread Vassil Vassilev via cfe-commits
@@ -760,8 +787,10 @@ std::unique_ptr Interpreter::GenModule() { return nullptr; } -CodeGenerator *Interpreter::getCodeGen() const { - FrontendAction *WrappedAct = Act->getWrapped(); +CodeGenerator *Interpreter::getCodeGen(IncrementalAction *Action) const { + if (!Action) +

[clang] [clang] Add test for QualTypes in template class NNS (PR #137804)

2025-04-29 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/137804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-25 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev closed https://github.com/llvm/llvm-project/pull/136404 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-19 Thread Vassil Vassilev via cfe-commits
@@ -451,13 +451,44 @@ const char *const Runtimes = R"( )"; llvm::Expected> -Interpreter::create(std::unique_ptr CI) { +Interpreter::create(std::unique_ptr CI, +std::unique_ptr DeviceCI) { llvm::Error Err = llvm::Error::success(); auto Interp =

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-19 Thread Vassil Vassilev via cfe-commits
@@ -451,13 +451,44 @@ const char *const Runtimes = R"( )"; llvm::Expected> -Interpreter::create(std::unique_ptr CI) { +Interpreter::create(std::unique_ptr CI, +std::unique_ptr DeviceCI) { llvm::Error Err = llvm::Error::success(); auto Interp =

[clang] [clang-repl] Disable EmulatedTLS on Windows for interpreter executor (PR #127468)

2025-05-07 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > The JIT does not support native TLS on Windows yet. I thought @sunho has implemented the native tls support in jitlink. Is that different? https://github.com/llvm/llvm-project/pull/127468 ___ cfe-commits mailing list cfe-commits@l

<    5   6   7   8   9   10