[clang] [clang-repl] Fix printing preprocessed tokens and macros (PR #104964)

2024-08-21 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo closed https://github.com/llvm/llvm-project/pull/104964 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix printing preprocessed tokens and macros (PR #104964)

2024-08-20 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo created https://github.com/llvm/llvm-project/pull/104964 None >From dc37b356fb9527c3b4cf6b31f55d2dd5067fc29d Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Tue, 20 Aug 2024 16:25:15 +0200 Subject: [PATCH 1/2] [clang-repl] Fix printing preprocessed tokens --- cl

[clang] [clang-repl] Fix PCH with delayed template parsing (PR #103028)

2024-08-14 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo closed https://github.com/llvm/llvm-project/pull/103028 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix PCH with delayed template parsing (PR #103028)

2024-08-14 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: > > BTW, the delayed template parsing is a deprecated technique. Both clang and > > MSVC won't enable this after C++20 and we think it is the root of many bugs. > > I agree. It was needed in the past to parse the MSVC stdlib, let's check if > we still need it: > [root-project/ro

[clang] [clang-repl] Fix PCH with delayed template parsing (PR #103028)

2024-08-13 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo created https://github.com/llvm/llvm-project/pull/103028 When instantiating a delayed template, the recorded token stream is passed to `Parser::ParseLateTemplatedFuncDef` which will append the current token "so it doesn't get lost". With incremental extensions enabled

[clang] [Interp] Mark the test unsupported with Asan (PR #102859)

2024-08-12 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: > > Quick question for my understanding: With `spr` we don't get meaningful > > commit messages anymore? That's quite unfortunate... > > Can you please clarify? The commit messages in this PR are `initial version` and `Update const.cpp`, which is totally useless if I came across

[clang] [Interp] Mark the test unsupported with Asan (PR #102859)

2024-08-12 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: Quick question for my understanding: With `spr` we don't get meaningful commit messages anymore? That's quite unfortunate... https://github.com/llvm/llvm-project/pull/102859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [clang] Remove dead incremental Parser code (PR #102450)

2024-08-09 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo closed https://github.com/llvm/llvm-project/pull/102450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove dead incremental Parser code (PR #102450)

2024-08-08 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: > Your reasoning sounds right to me. Can we make sure we are not breaking > `clang -fincremental-extensions`, too? As far as I can tell, `-fincremental-extensions` should set the language option `IncrementalExtensions` which in turn is the default for `Preprocessor::IncrementalP

[clang] [clang] Remove dead incremental Parser code (PR #102450)

2024-08-08 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo created https://github.com/llvm/llvm-project/pull/102450 When incremental processing is enabled, the Parser will never report `tok::eof` but `tok::annot_repl_input_end`. However, that case is already taken care of in `IncrementalParser::ParseOrWrapTopLevelDecl()` so t

[clang] [Serialization] Fix instantiated default arguments (PR #76473)

2024-05-07 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo closed https://github.com/llvm/llvm-project/pull/76473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Keep the first llvm::Module empty to avoid invalid memory access. (PR #89031)

2024-04-19 Thread Jonas Hahnfeld via cfe-commits
@@ -364,6 +365,19 @@ IncrementalParser::Parse(llvm::StringRef input) { std::unique_ptr IncrementalParser::GenModule() { static unsigned ID = 0; if (CodeGenerator *CG = getCodeGen()) { +// Clang's CodeGen is designed to work with a single llvm::Module. In many +// ca

[clang] [clang-repl] Keep the first llvm::Module empty to avoid invalid memory access. (PR #89031)

2024-04-19 Thread Jonas Hahnfeld via cfe-commits
@@ -224,11 +228,8 @@ IncrementalParser::IncrementalParser(Interpreter &Interp, return; // PTU.takeError(); } - if (CodeGenerator *CG = getCodeGen()) { -std::unique_ptr M(CG->ReleaseModule()); -CG->StartModule("incr_module_" + std::to_string(P

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-04-15 Thread Jonas Hahnfeld via cfe-commits
Stefan =?utf-8?q?Gr=C3=A4nitz?= Message-ID: In-Reply-To: @@ -14,7 +14,7 @@ struct A { int a; A(int a) : a(a) {} virtual ~A(); }; // PartialTranslationUnit. inline A::~A() { printf("~A(%d)\n", a); } -// Create one instance with new and delete it. +// Create one instance with

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-03-19 Thread Jonas Hahnfeld via cfe-commits
Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: @@ -14,7 +14,7 @@ struct A { int a; A(int a) : a(a) {} virtual ~A(); }; // PartialTranslationUnit. inline A::~A() { printf("~A(%d)\n", a); } -// Create one instance with new and delete it. +// Create one instance with new

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-03-11 Thread Jonas Hahnfeld via cfe-commits
Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: @@ -14,7 +14,7 @@ struct A { int a; A(int a) : a(a) {} virtual ~A(); }; // PartialTranslationUnit. inline A::~A() { printf("~A(%d)\n", a); } -// Create one instance with new and delete it. +// Create one instance with new

[clang] [CUDA] Correctly set CUDA default architecture (PR #84017)

2024-03-06 Thread Jonas Hahnfeld via cfe-commits
@@ -2,56 +2,56 @@ // REQUIRES: nvptx-registered-target // REQUIRES: zlib -// RUN: not %clang -### --target=x86_64-linux-gnu -c %s -g -gz 2>&1 \ +// RUN: %clang -### --target=x86_64-linux-gnu --offload-arch=sm_52 -nogpulib -nogpuinc -c %s -g -gz 2>&1 \ // RUN: | FileCheck %s

[clang] [clang] Add cuda-path arguments to failing test (PR #84008)

2024-03-06 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: https://github.com/llvm/llvm-project/pull/84017 changed the test in ways that this isn't needed anymore. https://github.com/llvm/llvm-project/pull/84008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [clang] Add cuda-path arguments to failing test (PR #84008)

2024-03-06 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo closed https://github.com/llvm/llvm-project/pull/84008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA] Correctly set CUDA default architecture (PR #84017)

2024-03-05 Thread Jonas Hahnfeld via cfe-commits
@@ -2,56 +2,56 @@ // REQUIRES: nvptx-registered-target // REQUIRES: zlib -// RUN: not %clang -### --target=x86_64-linux-gnu -c %s -g -gz 2>&1 \ +// RUN: %clang -### --target=x86_64-linux-gnu --offload-arch=sm_52 -nogpulib -nogpuinc -c %s -g -gz 2>&1 \ // RUN: | FileCheck %s

[clang] [clang] Add cuda-path arguments to failing test (PR #84008)

2024-03-05 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: Ok, but that still doesn't change the fact that the Clang driver will search for a system-wide CUDA installation unless passed `--cuda-path`... https://github.com/llvm/llvm-project/pull/84008 ___ cfe-commits mailing list cfe-commits@list

[clang] [clang] Add cuda-path arguments to failing test (PR #84008)

2024-03-05 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: > > > Might need `-nogpulib -nogpuinc` in those cases, we do that in other > > > `.cu` files in the test suite. > > > > > > No, I already tried that, it doesn't work for me. All > > `clang/test/Driver/*.cu` that supply `-nocudainc` also pass `--cuda-path`... > > The only reason

[clang] [clang] Add cuda-path arguments to failing test (PR #84008)

2024-03-05 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: > > It definitely doesn't work for the "pure" CUDA invocations, it still finds > > my local installation and complains. It might work for the OpenMP > > invocations, but hard to tell for me on a system with CUDA installed. As > > it's a `.cu` test after all, I think I would prefe

[clang] [clang] Add cuda-path arguments to failing test (PR #84008)

2024-03-05 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: > We had a lot that were like this previously. Guessing this one slipped > through because of the `zlib` requirement. I actually think there are some more left; for example `clang/test/Driver/cuda-dwarf-2.cu` has many `not %clang` invocations that don't specify `--cuda-path`. Th

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-02-18 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: > But my point is that we can't land that if we don't understand what's going > wrong without that patch. We understand that very well and it's described in https://reviews.llvm.org/D153003 as well as the surrounding discussions: because of the way that `ODRHash` works, template

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-01-29 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: As far as I can tell from https://github.com/llvm/llvm-project/pull/76774#issuecomment-1914177330 above, the last push only changed the default value of `LoadExternalSpecializationsLazily`. In that case, my test results from https://github.com/llvm/llvm-project/pull/76774#issuec

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-01-26 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: The newest version of this patch still doesn't work correctly. Switching the new `LoadExternalSpecializationsLazily` to disabled by default (somehow the argument didn't work on its own) instead crashes, most of the cases involving `MultiOnDiskHashTable`. I suspect some kind of me

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-01-22 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: > Would you like to give an reproducer so that I can debug? Not easily at the moment, unless you want to go through building the entirety of ROOT :-/ https://github.com/llvm/llvm-project/pull/76774 ___ cfe-commits mailing list cfe-commi

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-01-21 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: > > > I tried applying this patch to ROOT/Cling and it fails to build because > > > something is of the opinion that `std::is_integral::value` is not > > > true. I don't have time right now to investigate further, but since this > > > is the only change I did it is highly likely

[clang] [llvm] [JITLink][RISCV] Implement eh_frame handling (PR #68253)

2024-01-20 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: > It seems after this change we started to fail on `LLVM :: > ExecutionEngine/JITLink/RISCV/ELF_ehframe.s` when using debug libgcxx. First, sorry for the slow response and breaking the builds with expensive checks in the first place. I believe the report is actually fully correct

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-01-19 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: I tried applying this patch to ROOT/Cling and it fails to build because something is of the opinion that `std::is_integral::value` is not true. I don't have time right now to investigate further, but since this is the only change I did it is highly likely that it's caused by this

[clang] [clang-repl] Add a interpreter-specific overload of operator new for C++ (PR #76218)

2024-01-17 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo approved this pull request. Looks good (sorry, this fell through) https://github.com/llvm/llvm-project/pull/76218 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2024-01-14 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo closed https://github.com/llvm/llvm-project/pull/69076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2024-01-09 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: > Please add a release note > This change needs a release note. Please add an entry to > `clang/docs/ReleaseNotes.rst` in the section the most adapted to the change, > and referencing any Github issue this change fixes. Thanks! Done. https://github.com/llvm/llvm-project/pull/69

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2024-01-09 Thread Jonas Hahnfeld via cfe-commits
@@ -15754,10 +15754,18 @@ bool Expr::EvaluateAsInitializer(APValue &Value, const ASTContext &Ctx, LValue LVal; LVal.set(VD); -if (!EvaluateInPlace(Value, Info, LVal, this, - /*AllowNonLiteralTypes=*/true) || -EStatus.HasSideEffects)

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2024-01-09 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo updated https://github.com/llvm/llvm-project/pull/69076 >From a55ca99a373b17501d56d18af9e8aa2dc2cbcea0 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Sat, 14 Oct 2023 20:10:28 +0200 Subject: [PATCH 1/3] Fix crash with modules and constexpr destructor With modules

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2024-01-09 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: > address my previous comment: [#69076 > (comment)](https://github.com/llvm/llvm-project/pull/69076#issuecomment-1780327252) I had already expanded the commit message with the full details, now also copied to the PR summary. Is that sufficient to address the comment? https://git

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2024-01-09 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo edited https://github.com/llvm/llvm-project/pull/69076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-07 Thread Jonas Hahnfeld via cfe-commits
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) { void ODRHash::AddBoolean(bool Value) { Bools.push_back(Value); } + +void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); } hahnjo wrote: That test does not exercise an alias argument t

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2024-01-07 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: Well, this patch is up since almost three months now (!). Sure, we can keep carrying a similar fix downstream, but ideally I would really like to get rid of as many local changes as possible. That's not possible without proper review, but the current situation is quite unsatisfac

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2024-01-07 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: Ping, is this ok to be accepted and landed? > So personally I am fine with the current workaround with a `FIXME`. You mean next to the comment I already added referring to the C++ standard? Can you formulate what I should put there? https://github.com/llvm/llvm-project/pull/6907

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-05 Thread Jonas Hahnfeld via cfe-commits
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) { void ODRHash::AddBoolean(bool Value) { Bools.push_back(Value); } + +void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); } hahnjo wrote: The review related to `ODRHash` is this one: ht

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2023-12-27 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: I finally had time to debug this: The reason for modules being involved here is because the serialization code calls `ParmVarDecl::getDefaultArg()` which strips the outermost `FullExpr`, such as `ExprWithCleanups`. A potential fix is in https://github.com/llvm/llvm-project/pull/7

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2023-12-27 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo updated https://github.com/llvm/llvm-project/pull/69076 >From a55ca99a373b17501d56d18af9e8aa2dc2cbcea0 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Sat, 14 Oct 2023 20:10:28 +0200 Subject: [PATCH] Fix crash with modules and constexpr destructor With modules, se

[clang] [Serialization] Fix instantiated default arguments (PR #76473)

2023-12-27 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo created https://github.com/llvm/llvm-project/pull/76473 `ParmVarDecl::getDefaultArg()` strips the outermost `FullExpr`, such as `ExprWithCleanups`. This leads to an `llvm_unreachable` being executed with the added test `clang/test/Modules/pr68702.cpp`; instead use the

[clang] [clang][Sema] Always clear UndefinedButUsed (PR #73955)

2023-12-12 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo closed https://github.com/llvm/llvm-project/pull/73955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Always clear UndefinedButUsed (PR #73955)

2023-12-12 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: I tried to craft a test here, but declaration unloading in `clang-repl` is not powerful enough (yet) to show a (user-visible) consequence of the problem. On a high level, the problem should be triggered by: ``` clang-repl> template struct A { void f() { } }; clang-repl> A().f();

[clang] [clang][Sema] Always clear UndefinedButUsed (PR #73955)

2023-11-30 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: I will try, but observing the consequences of this depends on unloading: Basically it happens if a declaration in `UndefinedButUsed` thas was previously defined is unloaded, which makes it undefined. For now, it's possible that for the upstream cases it's only an optimization bec

[clang] [clang][Sema] Always clear UndefinedButUsed (PR #73955)

2023-11-30 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo created https://github.com/llvm/llvm-project/pull/73955 Before, it was only cleared if there were undefined entities. This is important for Clang's incremental parsing as used by `clang-repl` that might receive multiple calls to `Sema.ActOnEndOfTranslationUnit`. >Fro

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2023-11-15 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: ping @shafik @cor3ntin @ChuanqiXu9, how can we make progress here? https://github.com/llvm/llvm-project/pull/69076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] Reapply #2 [clang-repl] [test] Make an XFAIL more precise (#70991) (PR #71168)

2023-11-03 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo approved this pull request. Looks reasonable to me. I know this fixes a test error for MinGW, but if possible maybe let it sit until early next week in case somebody else has a different opinion on moving `host=` to `lit`. https://github.com/llvm/llvm-project/pull/711

[clang] [clang-repl] [test] Make an XFAIL more precise (PR #70991)

2023-11-01 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo approved this pull request. Very interesting... See also https://github.com/llvm/llvm-project/issues/68092, now I understand even less what the problem is... https://github.com/llvm/llvm-project/pull/70991 ___ cfe-commits mai

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2023-10-30 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: I can add the comment as requested, but for the other questions related to full expressions and modules I'd really need input from experts... https://github.com/llvm/llvm-project/pull/69076 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [JITLink][RISCV] Implement eh_frame handling (PR #68253)

2023-10-28 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo closed https://github.com/llvm/llvm-project/pull/68253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2023-10-25 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: ping @cor3ntin @shafik, could you have a look here? https://github.com/llvm/llvm-project/pull/69076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [JITLink][RISCV] Implement eh_frame handling (PR #68253)

2023-10-23 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: @mtvec @luxufan ping :) https://github.com/llvm/llvm-project/pull/68253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [JITLink][RISCV] Implement eh_frame handling (PR #68253)

2023-10-23 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo edited https://github.com/llvm/llvm-project/pull/68253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [JITLink][RISCV] Implement eh_frame handling (PR #68253)

2023-10-23 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo updated https://github.com/llvm/llvm-project/pull/68253 >From d44b58748bcc815e151b8d99ab5cbae8b86ed056 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Wed, 4 Oct 2023 21:27:14 +0200 Subject: [PATCH 1/3] [JITLink][RISCV] Implement eh_frame handling This requires ad

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2023-10-17 Thread Jonas Hahnfeld via cfe-commits
@@ -0,0 +1,65 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: split-file %s %t + +// RUN: %clang_cc1 -std=c++20 -emit-obj -fmodules -fimplicit-module-maps -fmodules-cache-path=%t %t/main.cpp -o %t/main.o hahnjo wrote: No, we don't need it, you are right - the c

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2023-10-17 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo updated https://github.com/llvm/llvm-project/pull/69076 >From d149de4d4e00b63e506441b516f35aeb41786408 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Sat, 14 Oct 2023 20:10:28 +0200 Subject: [PATCH 1/2] Fix crash with modules and constexpr destructor Closes https

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2023-10-16 Thread Jonas Hahnfeld via cfe-commits
@@ -0,0 +1,65 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: split-file %s %t + +// RUN: %clang_cc1 -std=c++20 -emit-obj -fmodules -fimplicit-module-maps -fmodules-cache-path=%t %t/main.cpp -o %t/main.o + +//--- V.h +#ifndef V_H +#define V_H + +class A { +public: + constexpr A

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2023-10-14 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo created https://github.com/llvm/llvm-project/pull/69076 Closes https://github.com/llvm/llvm-project/issues/68702 >From d149de4d4e00b63e506441b516f35aeb41786408 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Sat, 14 Oct 2023 20:10:28 +0200 Subject: [PATCH] Fix cra

[clang] abb9eb2 - [Lex] Handle repl_input_end in Preprocessor::LexTokensUntilEOF()

2023-10-05 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-10-05T12:09:14+02:00 New Revision: abb9eb2778dc68ca3bc2ca786632e65682741469 URL: https://github.com/llvm/llvm-project/commit/abb9eb2778dc68ca3bc2ca786632e65682741469 DIFF: https://github.com/llvm/llvm-project/commit/abb9eb2778dc68ca3bc2ca786632e65682741469.diff

[clang] 3116d60 - [Lex] Introduce Preprocessor::LexTokensUntilEOF()

2023-10-05 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-10-05T11:04:07+02:00 New Revision: 3116d60494f219bfcb284d05d9ebed5b6c196ca5 URL: https://github.com/llvm/llvm-project/commit/3116d60494f219bfcb284d05d9ebed5b6c196ca5 DIFF: https://github.com/llvm/llvm-project/commit/3116d60494f219bfcb284d05d9ebed5b6c196ca5.diff

[clang] [clang-repl] Emit const variables only once (PR #65257)

2023-10-03 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: Note that this currently doesn't seem to work on Windows: https://github.com/llvm/llvm-project/issues/68092 https://github.com/llvm/llvm-project/pull/65257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] 4812eec - [clang-repl] XFAIL new const.cpp test on Windows

2023-10-03 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-10-03T13:30:01+02:00 New Revision: 4812eecd7106200c0330d6371afbe036f577244a URL: https://github.com/llvm/llvm-project/commit/4812eecd7106200c0330d6371afbe036f577244a DIFF: https://github.com/llvm/llvm-project/commit/4812eecd7106200c0330d6371afbe036f577244a.diff

[clang] b6ee41f - [clang-repl] Relax regular expression for new const.cpp test

2023-10-03 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-10-03T13:10:31+02:00 New Revision: b6ee41f83c6ea361bfafc2168e9223379b32773f URL: https://github.com/llvm/llvm-project/commit/b6ee41f83c6ea361bfafc2168e9223379b32773f DIFF: https://github.com/llvm/llvm-project/commit/b6ee41f83c6ea361bfafc2168e9223379b32773f.diff

[clang] [clang-repl] Emit const variables only once (PR #65257)

2023-10-03 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo closed https://github.com/llvm/llvm-project/pull/65257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl][CUDA] Move CUDA module registration to beginning of global_ctors (PR #66658)

2023-10-03 Thread Jonas Hahnfeld via cfe-commits
@@ -794,7 +794,7 @@ void CodeGenModule::Release() { AddGlobalCtor(ObjCInitFunction); if (Context.getLangOpts().CUDA && CUDARuntime) { if (llvm::Function *CudaCtorFunction = CUDARuntime->finalizeModule()) - AddGlobalCtor(CudaCtorFunction); + AddGlobalCtor(C

[clang] [clang-repl] Emit const variables only once (PR #65257)

2023-10-03 Thread Jonas Hahnfeld via cfe-commits
@@ -0,0 +1,29 @@ +// UNSUPPORTED: system-aix +// RUN: cat %s | clang-repl | FileCheck %s +// RUN: cat %s | clang-repl -Xcc -O2 | FileCheck %s + +extern "C" int printf(const char*, ...); + hahnjo wrote: `const A a(1);` is a file-scope constant, no? We don't need i

[clang] [clang-repl] Emit const variables only once (PR #65257)

2023-09-28 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: ping @vgvassilev https://github.com/llvm/llvm-project/pull/65257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Emit const variables only once (PR #65257)

2023-09-18 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: Ping on the updated patch, which is now also passing downstream testing after I realized that we were missing a backport of commit e451d552348bc714614d294e32dfbe7ec2cd4005, which explains why some constructors were wrongly ordered... https://github.com/llvm/llvm-project/pull/652

[clang] [clang-repl] Emit const variables only once (PR #65257)

2023-09-06 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo review_requested https://github.com/llvm/llvm-project/pull/65257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Emit const variables only once (PR #65257)

2023-09-06 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: The original patch worked for `clang-repl` but results in strong linkage which I found to cause problems with modules downstream in ROOT. Instead the latest push moves the special case one level higher to `basicGVALinkageForVariable` and returns `GVA_DiscardableODR` which fixes t

[clang] [clang-repl] Emit const variables only once (PR #65257)

2023-09-06 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo updated https://github.com/llvm/llvm-project/pull/65257: >From 7b52d2ad531286ca3e14c3f05da51c91fd71bd0d Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Wed, 6 Sep 2023 13:11:57 +0200 Subject: [PATCH] [clang-repl] Emit const variables only once Disable internal lin

[clang] [clang-repl] Emit const variables only once (PR #65257)

2023-09-04 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo review_requested https://github.com/llvm/llvm-project/pull/65257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Emit const variables only once (PR #65257)

2023-09-04 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo review_requested https://github.com/llvm/llvm-project/pull/65257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Emit const variables only once (PR #65257)

2023-09-04 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo review_requested https://github.com/llvm/llvm-project/pull/65257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Emit const variables only once (PR #65257)

2023-09-04 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo created https://github.com/llvm/llvm-project/pull/65257: Disable internal linkage for const variables if IncrementalExtensions are enabled. Otherwise the variables are emitted multiple times, with multiple constructions at unique memory locations, during every PTU. >

[clang] [clang-repl] Emit const variables only once (PR #65257)

2023-09-04 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo labeled https://github.com/llvm/llvm-project/pull/65257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6c274ba - [clang-repl] Disambiguate declarations with private typedefs

2023-08-23 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-08-23T11:29:26+02:00 New Revision: 6c274ba4108b07358ebd4e8d607c72d6db8c8100 URL: https://github.com/llvm/llvm-project/commit/6c274ba4108b07358ebd4e8d607c72d6db8c8100 DIFF: https://github.com/llvm/llvm-project/commit/6c274ba4108b07358ebd4e8d607c72d6db8c8100.diff

[clang] c861d32 - [CodeGen] Keep track of eagerly emitted globals

2023-08-18 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-08-18T09:42:28+02:00 New Revision: c861d32d7c2791bdc058d9d9fbaecc1c2f07b8c7 URL: https://github.com/llvm/llvm-project/commit/c861d32d7c2791bdc058d9d9fbaecc1c2f07b8c7 DIFF: https://github.com/llvm/llvm-project/commit/c861d32d7c2791bdc058d9d9fbaecc1c2f07b8c7.diff

[clang] 0e17372 - Revert "[CodeGen] Keep track of eagerly emitted globals"

2023-08-17 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-08-17T14:21:39+02:00 New Revision: 0e17372b380467ac8339afdec992fbf887a11feb URL: https://github.com/llvm/llvm-project/commit/0e17372b380467ac8339afdec992fbf887a11feb DIFF: https://github.com/llvm/llvm-project/commit/0e17372b380467ac8339afdec992fbf887a11feb.diff

[clang] f8dadef - [CodeGen] Keep track of eagerly emitted globals

2023-08-17 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-08-17T13:26:22+02:00 New Revision: f8dadefd4afc8e1b7b9a1e69a0ba8df051e03328 URL: https://github.com/llvm/llvm-project/commit/f8dadefd4afc8e1b7b9a1e69a0ba8df051e03328 DIFF: https://github.com/llvm/llvm-project/commit/f8dadefd4afc8e1b7b9a1e69a0ba8df051e03328.diff

[clang] d43a3d6 - [CodeGen] Restrict addEmittedDeferredDecl to incremental extensions

2023-08-17 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-08-17T11:54:05+02:00 New Revision: d43a3d6346961e639e29b8083b262416889e78ec URL: https://github.com/llvm/llvm-project/commit/d43a3d6346961e639e29b8083b262416889e78ec DIFF: https://github.com/llvm/llvm-project/commit/d43a3d6346961e639e29b8083b262416889e78ec.diff

[clang] b719e41 - [CodeGen] Clean up access to EmittedDeferredDecls, NFCI.

2023-08-17 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-08-17T10:39:47+02:00 New Revision: b719e410781ce9f3a2b316afea31c156bf99e036 URL: https://github.com/llvm/llvm-project/commit/b719e410781ce9f3a2b316afea31c156bf99e036 DIFF: https://github.com/llvm/llvm-project/commit/b719e410781ce9f3a2b316afea31c156bf99e036.diff

[clang] eeac432 - Disable two tests without {arm, aarch64}-registered-target

2023-08-17 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-08-17T10:04:38+02:00 New Revision: eeac4321c517ee8afc30ebe62c5b1778efc1173d URL: https://github.com/llvm/llvm-project/commit/eeac4321c517ee8afc30ebe62c5b1778efc1173d DIFF: https://github.com/llvm/llvm-project/commit/eeac4321c517ee8afc30ebe62c5b1778efc1173d.diff

[clang] 2f3fe3e - [CodeGen] Remove Constant arguments from linkage functions, NFCI.

2023-08-16 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-08-17T08:28:51+02:00 New Revision: 2f3fe3ed97bcf778d73eda5aae9f166810a4af02 URL: https://github.com/llvm/llvm-project/commit/2f3fe3ed97bcf778d73eda5aae9f166810a4af02 DIFF: https://github.com/llvm/llvm-project/commit/2f3fe3ed97bcf778d73eda5aae9f166810a4af02.diff

[clang] ba475a4 - [clang-repl] Disambiguate global namespace identifiers

2023-08-14 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-08-14T10:11:27+02:00 New Revision: ba475a4a3440a21e5de6a39a16215836f2614f04 URL: https://github.com/llvm/llvm-project/commit/ba475a4a3440a21e5de6a39a16215836f2614f04 DIFF: https://github.com/llvm/llvm-project/commit/ba475a4a3440a21e5de6a39a16215836f2614f04.diff

[clang] da555f7 - [clang-repl] Additional test for disambiguation of templates

2023-08-09 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-08-09T16:15:14+02:00 New Revision: da555f750ab21d200ce486b45af75476662ca3b5 URL: https://github.com/llvm/llvm-project/commit/da555f750ab21d200ce486b45af75476662ca3b5 DIFF: https://github.com/llvm/llvm-project/commit/da555f750ab21d200ce486b45af75476662ca3b5.diff

[clang] cb3136b - [clang] Pass --cuda-path to fix test/Driver/openmp-offload-jit.c

2023-08-08 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-08-08T10:21:55+02:00 New Revision: cb3136b0d3596f5c3984e4fb49359e2a1a28a547 URL: https://github.com/llvm/llvm-project/commit/cb3136b0d3596f5c3984e4fb49359e2a1a28a547 DIFF: https://github.com/llvm/llvm-project/commit/cb3136b0d3596f5c3984e4fb49359e2a1a28a547.diff

[clang] 99b5474 - [Modules] Add test for merging of template member parent

2023-08-01 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-08-02T08:16:46+02:00 New Revision: 99b54743106bae89217c3591ec7461266dbd00a4 URL: https://github.com/llvm/llvm-project/commit/99b54743106bae89217c3591ec7461266dbd00a4 DIFF: https://github.com/llvm/llvm-project/commit/99b54743106bae89217c3591ec7461266dbd00a4.diff

[clang] 5ea647d - [CodeGen] Assert that EmittedDeferredDecls is empty

2023-07-31 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-07-31T13:40:00+02:00 New Revision: 5ea647dea6355304b641bf7bc407db497c6d9d21 URL: https://github.com/llvm/llvm-project/commit/5ea647dea6355304b641bf7bc407db497c6d9d21 DIFF: https://github.com/llvm/llvm-project/commit/5ea647dea6355304b641bf7bc407db497c6d9d21.diff

[clang] ac6e9e6 - [clang-repl] Remove redundant tests

2023-07-27 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-07-27T16:22:56+02:00 New Revision: ac6e9e69bac76be2f05a20cea6ea8d69a0b43d1b URL: https://github.com/llvm/llvm-project/commit/ac6e9e69bac76be2f05a20cea6ea8d69a0b43d1b DIFF: https://github.com/llvm/llvm-project/commit/ac6e9e69bac76be2f05a20cea6ea8d69a0b43d1b.diff

[clang] ce8ff3f - Remove clang/ModuleInfo.txt

2023-06-16 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-06-16T09:11:11+02:00 New Revision: ce8ff3facc637ae116f0d1c560a602b4dc939deb URL: https://github.com/llvm/llvm-project/commit/ce8ff3facc637ae116f0d1c560a602b4dc939deb DIFF: https://github.com/llvm/llvm-project/commit/ce8ff3facc637ae116f0d1c560a602b4dc939deb.diff

[clang] 53c03a3 - [clang][modules] Add features for recent C++ versions

2023-05-17 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-05-17T15:18:50+02:00 New Revision: 53c03a3db16cd9b51476ce4b4fb1adc1b58f1ff7 URL: https://github.com/llvm/llvm-project/commit/53c03a3db16cd9b51476ce4b4fb1adc1b58f1ff7 DIFF: https://github.com/llvm/llvm-project/commit/53c03a3db16cd9b51476ce4b4fb1adc1b58f1ff7.diff

[clang] 0b3c48d - [cmake] Correct option to LLVM_FORCE_USE_OLD_TOOLCHAIN

2023-05-17 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-05-17T10:35:49+02:00 New Revision: 0b3c48d5722a30e8b052b8d08f6de5afcf2edeb1 URL: https://github.com/llvm/llvm-project/commit/0b3c48d5722a30e8b052b8d08f6de5afcf2edeb1 DIFF: https://github.com/llvm/llvm-project/commit/0b3c48d5722a30e8b052b8d08f6de5afcf2edeb1.diff

[clang] b5ee4f7 - Revert "Lazyly initialize uncommon toolchain detector"

2023-02-06 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-02-06T15:39:33+01:00 New Revision: b5ee4f755fcff56243f6ff0cea9e7a722259304a URL: https://github.com/llvm/llvm-project/commit/b5ee4f755fcff56243f6ff0cea9e7a722259304a DIFF: https://github.com/llvm/llvm-project/commit/b5ee4f755fcff56243f6ff0cea9e7a722259304a.diff

[clang] 01eb01c - [clang][Lex] Add back PPCallbacks::FileNotFound

2023-01-24 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-01-24T09:52:27+01:00 New Revision: 01eb01c7fd7ad6f569ad4d7bf65b5327ac111955 URL: https://github.com/llvm/llvm-project/commit/01eb01c7fd7ad6f569ad4d7bf65b5327ac111955 DIFF: https://github.com/llvm/llvm-project/commit/01eb01c7fd7ad6f569ad4d7bf65b5327ac111955.diff

[clang] f3c9342 - Fix build of nvptx-arch with CLANG_LINK_CLANG_DYLIB

2022-12-29 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2022-12-29T09:48:05+01:00 New Revision: f3c9342a3d56e1782e3b6db081401af334648492 URL: https://github.com/llvm/llvm-project/commit/f3c9342a3d56e1782e3b6db081401af334648492 DIFF: https://github.com/llvm/llvm-project/commit/f3c9342a3d56e1782e3b6db081401af334648492.diff

  1   2   3   >