[clang] [clang-tools-extra] [llvm] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-24 Thread Timm Baeder via cfe-commits
tbaederr wrote: Adding Aaron since we're probably getting close. https://github.com/llvm/llvm-project/pull/78338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-24 Thread Timm Baeder via cfe-commits
@@ -368,6 +369,7 @@ template class LocalScope : public VariableScope { return; this->emitDestructors(); this->Ctx->emitDestroy(*Idx, SourceInfo{}); +removeStoredOpaqueValues(); tbaederr wrote: Ah, didn't see that. Well, it's fine to leave i

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-25 Thread Timm Baeder via cfe-commits
@@ -389,10 +390,29 @@ template class LocalScope : public VariableScope { if (!Local.Desc->isPrimitive() && !Local.Desc->isPrimitiveArray()) { this->Ctx->emitGetPtrLocal(Local.Offset, SourceInfo{}); this->Ctx->emitRecordDestruction(Local.Desc); +r

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-25 Thread Timm Baeder via cfe-commits
@@ -54,7 +54,7 @@ class ByteCodeExprGen : public ConstStmtVisitor, bool>, public: /// Initializes the compiler and the backend emitter. template - ByteCodeExprGen(Context &Ctx, Program &P, Tys &&... Args) + ByteCodeExprGen(Context &Ctx, Program &P, Tys &&...Args) --

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-25 Thread Timm Baeder via cfe-commits
@@ -389,10 +390,29 @@ template class LocalScope : public VariableScope { if (!Local.Desc->isPrimitive() && !Local.Desc->isPrimitiveArray()) { this->Ctx->emitGetPtrLocal(Local.Offset, SourceInfo{}); this->Ctx->emitRecordDestruction(Local.Desc); +r

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/66514 >From 2a0b02a285203228944d5dd206f968e776757993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 15 Sep 2023 15:51:39 +0200 Subject: [PATCH] [clang][Diagnostics] Highlight code snippets Ad

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

2024-01-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/79452 In C++, we get a ComplexToBool cast, but we might not in C. >From b207bff4cda462869bcf8547e44d23e5b8fc5e94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 25 Jan 2024 15:20:52 +0100 Subj

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

2024-01-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr unassigned https://github.com/llvm/llvm-project/pull/79452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

2024-01-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr unassigned https://github.com/llvm/llvm-project/pull/79452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

2024-01-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr unassigned https://github.com/llvm/llvm-project/pull/79452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

2024-01-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr unassigned https://github.com/llvm/llvm-project/pull/79452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-25 Thread Timm Baeder via cfe-commits
@@ -54,7 +54,7 @@ class ByteCodeExprGen : public ConstStmtVisitor, bool>, public: /// Initializes the compiler and the backend emitter. template - ByteCodeExprGen(Context &Ctx, Program &P, Tys &&... Args) + ByteCodeExprGen(Context &Ctx, Program &P, Tys &&...Args) --

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. https://github.com/llvm/llvm-project/pull/70053 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/66514 >From 29c174e595dd839cf96ca54778712ab3bc543103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 15 Sep 2023 15:51:39 +0200 Subject: [PATCH] [clang][Diagnostics] Highlight code snippets Ad

[clang] [clang][Interp] Handle std::move etc. builtins (PR #70772)

2024-01-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/70772 >From 7f4cb1f727a497c6da1fc3f4740522ff5adb3964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 31 Oct 2023 07:17:16 +0100 Subject: [PATCH] [clang][Interp] Handle std::move etc. builtins

[clang-tools-extra] [llvm] [clang] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-25 Thread Timm Baeder via cfe-commits
@@ -1098,7 +1098,13 @@ void VerifyDiagnosticConsumer::CheckDiagnostics() { // Produce an error if no expected-* directives could be found in the // source file(s) processed. if (Status == HasNoDirectives) { - Diags.Report(diag::err_verify_no_directives).setForc

[clang] [clang][Interp] Handle std::move etc. builtins (PR #70772)

2024-01-15 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , 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/70772 >From e850b96306ab5d9e6aac4171150195ea013f6ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?

[clang] [clang][Interp] Implement IntegralAP::{div, rem} (PR #72614)

2024-01-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/72614 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement integral->complex casts (PR #75590)

2024-01-15 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping @shafik https://github.com/llvm/llvm-project/pull/75590 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2024-01-15 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/71315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2024-01-15 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/69900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Support __real/__imag on primitives (PR #75485)

2024-01-15 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/75485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Fix diagnosing non-const variables pre-C++11 (PR #76718)

2024-01-15 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/76718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement ComplexToReal casts (PR #77294)

2024-01-15 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/77294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Add inline descriptor to global variables (PR #72892)

2024-01-15 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: tbaederr wrote: Pnig https://github.com/llvm/llvm-project/pull/72892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-15 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= ,

[clang] [clang][Interp] Implement ComplexToReal casts (PR #77294)

2024-01-15 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/77294 >From 4c9d611f5ae8cbad083811261e08954d92b0ca41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 8 Jan 2024 11:14:41 +0100 Subject: [PATCH

[clang] [clang][Interp] Add inline descriptor to global variables (PR #72892)

2024-01-15 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/72892 >From 8072f1e064c817273943615c796b82b4b4bd68c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 20 Nov 2023 11:5

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #72607)

2024-01-15 Thread Timm Baeder via cfe-commits
tbaederr wrote: This basically looks good to me, but I don't know much about vector types. https://github.com/llvm/llvm-project/pull/72607 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [clang][Interp] Add inline descriptor to global variables (PR #72892)

2024-01-15 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/72892 >From a5b16989efd7deaef47fc6e35032f2abf5e3a9da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 20 Nov 2023 11:5

[clang] [clang][Interp] Fix diagnosing non-const variables pre-C++11 (PR #76718)

2024-01-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/76718 >From aa6691d530024a57be78b19e9a682b4676a235d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 30 Dec 2023 20:46:13 +0100 Subject: [PATCH] [clang][Interp] Fix diagnosing non-const variabl

[clang] [Clang] Only compare template params of potential overload after checking their decl context (PR #78139)

2024-01-15 Thread Timm Baeder via cfe-commits
@@ -1259,6 +1259,40 @@ static bool IsOverloadOrOverrideImpl(Sema &SemaRef, FunctionDecl *New, if ((OldTemplate == nullptr) != (NewTemplate == nullptr)) return true; + // Is the function New an overload of the function Old? + QualType OldQType = SemaRef.Context.getCano

[clang] [clang][Interp] Implement dynamic memory allocation handling (PR #70306)

2024-01-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/70306 >From bf3dd8a13a2ed61d2cc9b2e49a7ff271f29c2ba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 25 Oct 2023 08:33:30 +0200 Subject: [PATCH] [clang][Interp] Implement dynamic memory allocat

[clang] [clang][Interp] Support __real/__imag on primitives (PR #75485)

2024-01-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/75485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement ComplexToReal casts (PR #77294)

2024-01-15 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/77294 >From 5f6a91cd7f709a3c94c65dc4ea41b5967b9fe343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 8 Jan 2024 11:14

[clang] [clang][Interp] Implement integral->complex casts (PR #75590)

2024-01-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/75590 >From 2823e9e9e32aeb2efe08e1b8b64b0fc7e8c408a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 15 Dec 2023 13:11:16 +0100 Subject: [PATCH] [clang][Interp] Implement integral->complex cast

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2024-01-15 Thread Timm Baeder via cfe-commits
@@ -198,6 +198,27 @@ bool ByteCodeStmtGen::visitFunc(const FunctionDecl *F) { return false; if (!this->emitInitPtrPop(InitExpr)) return false; + } else if (const IndirectFieldDecl *IFD = Init->getIndirectMember()) { +assert(IFD->getChai

[clang] [clang][Interp] Fix diagnosing non-const variables pre-C++11 (PR #76718)

2024-01-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/76718 >From d21af78a47bcbc924ea24fb806549344555961da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 30 Dec 2023 20:46:13 +0100 Subject: [PATCH] [clang][Interp] Fix diagnosing non-const variabl

[clang] [clang][Interp] Add inline descriptor to global variables (PR #72892)

2024-01-15 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -332,6 +332,22 @@ bool CheckInitialized(InterpState &S, CodePtr OpPC, const Pointer &Ptr, return false; } +bool CheckGlobalInitialized(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { + if (P

[clang] [clang][Interp] Add inline descriptor to global variables (PR #72892)

2024-01-15 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , 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/72892 >From 7551ede34ec97db3a3ef2284ca93c8279ae66524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Da

[clang] [clang][Interp] Add inline descriptor to global variables (PR #72892)

2024-01-16 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , 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/72892 >From 7551ede34ec97db3a3ef2284ca93c8279ae66524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Da

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2024-01-16 Thread Timm Baeder via cfe-commits
@@ -183,11 +178,7 @@ int32_t ByteCodeEmitter::getOffset(LabelTy Label) { return 0ull; } -bool ByteCodeEmitter::bail(const SourceLocation &Loc) { - if (!BailLocation) -BailLocation = Loc; - return false; -} +bool ByteCodeEmitter::bail(const SourceLocation &Loc) { return

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-16 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= ,

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2024-01-16 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/69900 >From 58ff884a20816526ea1b3e4035a65ab435e2396d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 22 Oct 2023 19:47:33 +0200 Subject: [PATC

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2024-01-16 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -198,6 +198,27 @@ bool ByteCodeStmtGen::visitFunc(const FunctionDecl *F) { return false; if (!this->emitInitPtrPop(InitExpr)) return false; + } else if (const IndirectFieldDecl *IFD = Init->

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2024-01-16 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/69900 >From 58ff884a20816526ea1b3e4035a65ab435e2396d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 22 Oct 2023 19:4

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2024-01-16 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , 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/69900 >From 58ff884a20816526ea1b3e4035a65ab435e2396d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Da

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2024-01-16 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , 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/69900 >From 58ff884a20816526ea1b3e4035a65ab435e2396d Mon Sep 17 00:00:00 2001 From: =?UTF-8?

[clang-tools-extra] [llvm] [clang] [CLANG] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-17 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/78338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [clang] [CLANG] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-17 Thread Timm Baeder via cfe-commits
@@ -5,5 +5,5 @@ # `.ii` file and `-verify` triggers extra diagnostics generation. Clangd should # strip those. # RUN: clangd-indexer %t.cpp -- -Xclang -verify --save-temps -- 2>&1 | FileCheck %s -# CHECK-NOT: error: no expected directives found: consider use of 'expected-no-d

[llvm] [clang-tools-extra] [clang] [CLANG] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-17 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr requested changes to this pull request. https://github.com/llvm/llvm-project/pull/78338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [CLANG] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-17 Thread Timm Baeder via cfe-commits
@@ -179,7 +179,7 @@ def err_verify_invalid_no_diags : Error< "%select{expected|'expected-no-diagnostics'}0 directive cannot follow " "%select{'expected-no-diagnostics' directive|other expected directives}0">; def err_verify_no_directives : Error< -"no expected direc

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-17 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= ,

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-18 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= ,

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/66514 >From 34ca28505542d55f62da80d8fd3c2561535185d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 15 Sep 2023 15:51:39 +0200 Subject: [PATCH] [clang][Diagnostics] Highlight code snippets Ad

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-18 Thread Timm Baeder via cfe-commits
tbaederr wrote: > The only thing we need to make sure is that highlighting isn't done in CI/ > redirected output It now respects `DiagOpts->ShowColors`, so that should work. But I guess you're talking about a test. :) https://github.com/llvm/llvm-project/pull/66514 _

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2024-01-18 Thread Timm Baeder via cfe-commits
@@ -54,36 +44,90 @@ bool Context::isPotentialConstantExpr(State &Parent, const FunctionDecl *FD) { bool Context::evaluateAsRValue(State &Parent, const Expr *E, APValue &Result) { assert(Stk.empty()); ByteCodeExprGen C(*this, *P, Parent, Stk, Result); - if (Check(Parent, C

[clang] [clang][Interp] Implement ComplexToReal casts (PR #77294)

2024-01-18 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 closed https://github.com/llvm/llvm-project/pull/77294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2024-01-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/71315 >From b549c6aaa47b4b6b90e03cb2b4a59f323e95888d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 31 Oct 2023 14:57:51 +0100 Subject: [PATCH] EvaluationResult --- clang/lib/AST/CMakeLists.

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2024-01-18 Thread Timm Baeder via cfe-commits
@@ -54,36 +44,90 @@ bool Context::isPotentialConstantExpr(State &Parent, const FunctionDecl *FD) { bool Context::evaluateAsRValue(State &Parent, const Expr *E, APValue &Result) { assert(Stk.empty()); ByteCodeExprGen C(*this, *P, Parent, Stk, Result); - if (Check(Parent, C

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-18 Thread Timm Baeder via cfe-commits
@@ -1112,6 +1121,140 @@ prepareAndFilterRanges(const SmallVectorImpl &Ranges, return LineRanges; } +/// Creates syntax highlighting information in form of StyleRanges. +/// +/// The returned unique ptr has always exactly size +/// (\p EndLineNumber - \p StartLineNumber + 1)

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-18 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/66514 >From 34ca28505542d55f62da80d8fd3c2561535185d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 15 Sep 2023 15:51:39 +0200 Subject: [PATC

[clang] [clang][Interp] Implement integral->complex casts (PR #75590)

2024-01-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/75590 >From 93d58a2aaeaae142723c844a2f19d4bec7c6bdf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 15 Dec 2023 13:11:16 +0100 Subject: [PATCH] [clang][Interp] Implement integral->complex cast

[clang] [clang][Interp] Fix diagnosing non-const variables pre-C++11 (PR #76718)

2024-01-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/76718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang] [CLANG] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-18 Thread Timm Baeder via cfe-commits
@@ -11,7 +11,7 @@ #error // expected-error@-1 {{}} -// CHECK: error: no expected directives found: consider use of 'expected-no-diagnostics' +// CHECK: error: no expected directives found: consider use of '{{.*}}-no-diagnostics' tbaederr wrote: Do

[clang-tools-extra] [llvm] [clang] [CLANG] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-18 Thread Timm Baeder via cfe-commits
@@ -11,7 +11,7 @@ #error // expected-error@-1 {{}} -// CHECK: error: no expected directives found: consider use of 'expected-no-diagnostics' +// CHECK: error: no expected directives found: consider use of '{{.*}}-no-diagnostics' tbaederr wrote: An

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2024-01-18 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/69900 ___ cfe-commits mailing list cfe-commits@lis

[clang] [clang][Interp] Implement integral->complex casts (PR #75590)

2024-01-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/75590 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-19 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/66514 >From 41bb52dc591ce1c154a4272abb738c80a7a57b90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 15 Sep 2023 15:5

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-19 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , 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/66514 >From 41bb52dc591ce1c154a4272abb738c80a7a57b90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Da

[llvm] [clang] [clang-tools-extra] [CLANG] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-19 Thread Timm Baeder via cfe-commits
@@ -11,7 +11,7 @@ #error // expected-error@-1 {{}} -// CHECK: error: no expected directives found: consider use of 'expected-no-diagnostics' +// CHECK: error: no expected directives found: consider use of '{{.*}}-no-diagnostics' tbaederr wrote: Th

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-19 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , 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/66514 >From 41bb52dc591ce1c154a4272abb738c80a7a57b90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2024-01-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/71315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle std::move etc. builtins (PR #70772)

2024-01-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/70772 >From c6c7d246b334a95306cda410e7d115353acb7c5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 31 Oct 2023 07:17:16 +0100 Subject: [PATCH] [clang][Interp] Handle std::move etc. builtins

[clang] [clang][Interp] Handle std::move etc. builtins (PR #70772)

2024-01-19 Thread Timm Baeder via cfe-commits
@@ -378,3 +378,92 @@ namespace Packs { static_assert(foo() == 2, ""); static_assert(foo<>() == 0, ""); } + +namespace std { +template struct remove_reference { using type = T; }; +template struct remove_reference { using type = T; }; +template struct remove_reference { u

[clang] [Clang][NFC] Optimize isAsciiIdentifierContinue (PR #78699)

2024-01-19 Thread Timm Baeder via cfe-commits
@@ -59,12 +59,29 @@ LLVM_READONLY inline bool isAsciiIdentifierStart(unsigned char c, return AllowDollar && c == '$'; } + +LLVM_READONLY inline bool isAsciiIdentifierContinue(unsigned char c) { + // Precomputed CHAR_UPPER|CHAR_LOWER|CHAR_DIGIT|CHAR_UNDER + static constexp

[clang] [Clang][NFC] Optimize isAsciiIdentifierContinue (PR #78699)

2024-01-19 Thread Timm Baeder via cfe-commits
@@ -59,12 +59,29 @@ LLVM_READONLY inline bool isAsciiIdentifierStart(unsigned char c, return AllowDollar && c == '$'; } + +LLVM_READONLY inline bool isAsciiIdentifierContinue(unsigned char c) { + // Precomputed CHAR_UPPER|CHAR_LOWER|CHAR_DIGIT|CHAR_UNDER + static constexp

[clang] [Clang][NFC] Optimize isAsciiIdentifierContinue (PR #78699)

2024-01-19 Thread Timm Baeder via cfe-commits
@@ -59,12 +59,29 @@ LLVM_READONLY inline bool isAsciiIdentifierStart(unsigned char c, return AllowDollar && c == '$'; } + +LLVM_READONLY inline bool isAsciiIdentifierContinue(unsigned char c) { + // Precomputed CHAR_UPPER|CHAR_LOWER|CHAR_DIGIT|CHAR_UNDER + static constexp

[clang] [Clang][NFC] Optimize isAsciiIdentifierContinue (PR #78699)

2024-01-19 Thread Timm Baeder via cfe-commits
@@ -59,12 +59,29 @@ LLVM_READONLY inline bool isAsciiIdentifierStart(unsigned char c, return AllowDollar && c == '$'; } + +LLVM_READONLY inline bool isAsciiIdentifierContinue(unsigned char c) { + // Precomputed CHAR_UPPER|CHAR_LOWER|CHAR_DIGIT|CHAR_UNDER + static constexp

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Timm Baeder via cfe-commits
@@ -2220,6 +2220,11 @@ llvm::Constant *ConstantLValueEmitter::emitPointerAuthPointer(const Expr *E) { // The assertions here are all checked by Sema. assert(Result.Val.isLValue()); + const auto *Base = Result.Val.getLValueBase().get(); + if (const auto *Decl = dyn_cast_

[clang] [Clang][ExprConstant] fix constant expression did not evaluate to integer (PR #97146)

2024-06-29 Thread Timm Baeder via cfe-commits
@@ -15858,7 +15858,7 @@ static bool FastEvaluateAsRValue(const Expr *Exp, Expr::EvalResult &Result, } if (const auto *CE = dyn_cast(Exp)) { -if (CE->hasAPValueResult()) { +if (CE->hasAPValueResult() && !CE->getAPValueResult().isLValue()) { tbaeder

[clang] [clang][Interp] Implement dynamic memory allocation handling (PR #70306)

2024-07-03 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/70306 >From a2213c595637d63b48658d2532e00b08fd05427f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 4 Jul 2024 07:26:27 +0200 Subject: [PATCH

[clang] [Parser][ObjC] Add -Wobjc-prefix-length warning option. (PR #97597)

2024-07-04 Thread Timm Baeder via cfe-commits
@@ -204,6 +204,89 @@ void Parser::CheckNestedObjCContexts(SourceLocation AtLoc) Diag(Decl->getBeginLoc(), diag::note_objc_container_start) << (int)ock; } +/// An Objective-C public name (a class name or protocol name) is +/// expected to have a prefix as all names are in a

[clang] Refactor clang::Linkage (PR #80063)

2024-07-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/80063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [compiler-rt] clang::Linkage #71049 (PR #80064)

2024-07-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/80064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Report erroneous floating point results in _Complex math (PR #90588)

2024-04-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/90588 Use handleFloatFloatBinOp to properly diagnose NaN results and divisions by zero. Fixes #84871 >From edb5cd5c610f112bca4c9d027a017e9e6dc9bf10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date:

[clang] [clang]Report erroneous floating point results in _Complex math (PR #90588)

2024-04-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/90588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Report erroneous floating point results in _Complex math (PR #90588)

2024-05-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/90588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement dynamic memory allocation handling (PR #70306)

2024-06-12 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/70306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement complex division (PR #94892)

2024-06-17 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/94892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement Complex-complex multiplication (PR #94891)

2024-06-17 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/94891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement Complex-complex multiplication (PR #94891)

2024-06-17 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/94891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Ensure noexcept(typeid(E)) checks if E throws when needed (PR #95846)

2024-06-17 Thread Timm Baeder via cfe-commits
@@ -,13 +,18 @@ static CanThrowResult canDynamicCastThrow(const CXXDynamicCastExpr *DC) { } static CanThrowResult canTypeidThrow(Sema &S, const CXXTypeidExpr *DC) { - if (DC->isTypeOperand()) + // Operand is not evaluated, cannot possibly throw tbae

[clang] [Clang] [Sema] Ensure noexcept(typeid(E)) checks if E throws when needed (PR #95846)

2024-06-17 Thread Timm Baeder via cfe-commits
@@ -,13 +,18 @@ static CanThrowResult canDynamicCastThrow(const CXXDynamicCastExpr *DC) { } static CanThrowResult canTypeidThrow(Sema &S, const CXXTypeidExpr *DC) { - if (DC->isTypeOperand()) + // Operand is not evaluated, cannot possibly throw + if (!DC->isPotenti

[clang] [clang][Interp] Implement complex division (PR #94892)

2024-06-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/94892 >From 7a1c16f2fe0b23ffe49789275ffa66b2ac64c4d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 9 Jun 2024 09:25:24 +0200 Subject: [PATCH] [clang][Interp] Implement Complex division ---

[clang] [clang] Remove update_options_td_flags.py (PR #95909)

2024-06-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/95909 The comment says: > This script will be removed after the next LLVM release. but it's still there. Change that. >From 0137a56765c1486b461c21c36d5977469fd6ffef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=

[clang] [clang][Interp] Implement complex division (PR #94892)

2024-06-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/94892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove update_options_td_flags.py (PR #95909)

2024-06-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/95909 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement dynamic memory allocation handling (PR #70306)

2024-06-18 Thread Timm Baeder via cfe-commits
@@ -2544,6 +2544,85 @@ bool ByteCodeExprGen::VisitCXXInheritedCtorInitExpr( return this->emitCall(F, 0, E); } +template +bool ByteCodeExprGen::VisitCXXNewExpr(const CXXNewExpr *E) { + assert(classifyPrim(E->getType()) == PT_Ptr); + const Expr *Init = E->getInitializer();

[clang] [clang][Interp] Implement dynamic memory allocation handling (PR #70306)

2024-06-18 Thread Timm Baeder via cfe-commits
@@ -0,0 +1,119 @@ +//== DynamicAllocator.cpp - Dynamic allocations --*- C++ -*-==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

<    2   3   4   5   6   7   8   9   10   11   >