[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-15 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/80662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-14 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/80662 >From b93916c9798ea09488e30b9b0aae9e54ef0b1956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 15 Feb 2024 07:03:58 +0100 Subject:

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-14 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/80662 ___ cfe-commits mailing list

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-14 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/80662 >From c10713b9a6494aa052541c4ac3a296d83a890867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 14 Feb 2024

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-14 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -119,12 +121,26 @@ template bool EvalEmitter::emitRet(const SourceInfo ) { template <> bool EvalEmitter::emitRet(const SourceInfo ) { if (!isActive()) return true; -

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/80662 >From bd8e8351850d843a64da05964f817b918c1ebd59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 5 Feb 2024 10:29:45 +0100 Subject: [PATCH] [clang][Interp] Do r-to-l conversion immediately

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-05 Thread Aaron Ballman via cfe-commits
@@ -119,12 +121,26 @@ template bool EvalEmitter::emitRet(const SourceInfo ) { template <> bool EvalEmitter::emitRet(const SourceInfo ) { if (!isActive()) return true; - EvalResult.setPointer(S.Stk.pop()); + + const Pointer = S.Stk.pop(); + // Implicitly convert

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-05 Thread Timm Baeder via cfe-commits
@@ -119,12 +121,26 @@ template bool EvalEmitter::emitRet(const SourceInfo ) { template <> bool EvalEmitter::emitRet(const SourceInfo ) { if (!isActive()) return true; - EvalResult.setPointer(S.Stk.pop()); + + const Pointer = S.Stk.pop(); + // Implicitly convert

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/80662 >From 91c130565aca5e915140aacf3ffca5c59b689523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 5 Feb 2024 10:29:45 +0100 Subject: [PATCH] [clang][Interp] Do r-to-l conversion immediately

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-05 Thread Aaron Ballman via cfe-commits
@@ -119,12 +121,26 @@ template bool EvalEmitter::emitRet(const SourceInfo ) { template <> bool EvalEmitter::emitRet(const SourceInfo ) { if (!isActive()) return true; - EvalResult.setPointer(S.Stk.pop()); + + const Pointer = S.Stk.pop(); + // Implicitly convert

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-05 Thread Timm Baeder via cfe-commits
@@ -119,12 +121,26 @@ template bool EvalEmitter::emitRet(const SourceInfo ) { template <> bool EvalEmitter::emitRet(const SourceInfo ) { if (!isActive()) return true; - EvalResult.setPointer(S.Stk.pop()); + + const Pointer = S.Stk.pop(); + // Implicitly convert

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-05 Thread Aaron Ballman via cfe-commits
@@ -119,12 +121,26 @@ template bool EvalEmitter::emitRet(const SourceInfo ) { template <> bool EvalEmitter::emitRet(const SourceInfo ) { if (!isActive()) return true; - EvalResult.setPointer(S.Stk.pop()); + + const Pointer = S.Stk.pop(); + // Implicitly convert

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-05 Thread Timm Baeder via cfe-commits
@@ -119,12 +121,26 @@ template bool EvalEmitter::emitRet(const SourceInfo ) { template <> bool EvalEmitter::emitRet(const SourceInfo ) { if (!isActive()) return true; - EvalResult.setPointer(S.Stk.pop()); + + const Pointer = S.Stk.pop(); + // Implicitly convert

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-05 Thread Aaron Ballman via cfe-commits
@@ -119,12 +121,26 @@ template bool EvalEmitter::emitRet(const SourceInfo ) { template <> bool EvalEmitter::emitRet(const SourceInfo ) { if (!isActive()) return true; - EvalResult.setPointer(S.Stk.pop()); + + const Pointer = S.Stk.pop(); + // Implicitly convert

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-05 Thread Timm Baeder via cfe-commits
tbaederr wrote: Asking for review here since I'm not sure if the reasoning makes sense for other people. https://github.com/llvm/llvm-project/pull/80662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes First, we need to register local constant variables in C, so we get the same diagnostic behavior as the current interpeter. Second, when returning an LValue (as a Pointer), which we eventually convert to

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/80662 First, we need to register local constant variables in C, so we get the same diagnostic behavior as the current interpeter. Second, when returning an LValue (as a Pointer), which we eventually convert to an