hanickadot wrote:
I pushed new design, will update PR's description soon, but now I need to
finish proposal's wording.
https://github.com/llvm/llvm-project/pull/111861
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-
hanickadot wrote:
> Unfortunately we currently have two constant expression evaluators, can you
> take a look at implementing this in the bytecode interpreter as well? Since
> this PR is already pretty big I think it would be OK to do it in a follow-up
> PR.
I will try, I'm not familiar with
@@ -1921,6 +1921,22 @@ static bool EvaluateFixedPointOrInteger(const Expr *E,
APFixedPoint &Result,
static bool EvaluateFixedPoint(const Expr *E, APFixedPoint &Result,
EvalInfo &Info);
+/// Support for atomic builtins
+static bool EvaluateAtomic
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/98756
From 7d65b133b5f04e078b3b26cee2b4be0fe78d01e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Mon, 6 Jan 2025 21:06:10 +0100
Subject: [PATCH 1/2] [clang] implement P3309 atomic bui
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/98756
From 7d65b133b5f04e078b3b26cee2b4be0fe78d01e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Mon, 6 Jan 2025 21:06:10 +0100
Subject: [PATCH 1/2] [clang] implement P3309 atomic bui
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/98756
From 7d65b133b5f04e078b3b26cee2b4be0fe78d01e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Mon, 6 Jan 2025 21:06:10 +0100
Subject: [PATCH 1/2] [clang] implement P3309 atomic bui
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/98756
From 7d65b133b5f04e078b3b26cee2b4be0fe78d01e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Mon, 6 Jan 2025 21:06:10 +0100
Subject: [PATCH] [clang] implement P3309 atomic builtin
hanickadot wrote:
It's broken after rebase, fixing it now...
https://github.com/llvm/llvm-project/pull/98756
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/98756
From bfb43ab80b0272e60c8b43bcd14533ee68a11f13 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Mon, 6 Jan 2025 20:40:01 +0100
Subject: [PATCH] [clang] implement P3309 atomic builtin
hanickadot wrote:
I have no additional list of thing Jessica pointed out, LGTM
https://github.com/llvm/llvm-project/pull/112694
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hanickadot approved this pull request.
https://github.com/llvm/llvm-project/pull/112694
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hanickadot wrote:
Do you have example before/after of the change? It's a bit hard to imagine.
https://github.com/llvm/llvm-project/pull/112694
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
hanickadot wrote:
I'm struggling to make sensible API with composition. When I tried that all
`const|static|dynamic|reinterpret|schema_cast` weren't consistent with rest of
std library.
https://github.com/llvm/llvm-project/pull/111861
___
cfe-commits
@@ -0,0 +1,517 @@
+// -*- 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
@@ -0,0 +1,517 @@
+// -*- 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
@@ -0,0 +1,517 @@
+// -*- 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
@@ -0,0 +1,517 @@
+// -*- 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
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/111861
From e1c8d5e689fe8d3d0338eb64220aaf6371aed48a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Thu, 10 Oct 2024 21:05:55 +0200
Subject: [PATCH 1/3] [clang & libcxx] constexpr point
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/111861
From e1c8d5e689fe8d3d0338eb64220aaf6371aed48a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Thu, 10 Oct 2024 21:05:55 +0200
Subject: [PATCH 1/2] [clang & libcxx] constexpr point
hanickadot wrote:
> Hmm, so needs to somehow allow accessing bits that aren't low bits?
yes, for example upper byte on aarch64
> As a general comment not specific to this patch, I'd prefer to build around
> llvm.ptrmask and geps as much as possible, as opposed to relying on ptrtoint.
I 100% a
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/111861
From e1c8d5e689fe8d3d0338eb64220aaf6371aed48a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Thu, 10 Oct 2024 21:05:55 +0200
Subject: [PATCH] [clang & libcxx] constexpr pointer t
hanickadot wrote:
> Is there some explanation of the set of builtins you chose somewhere? How is
> "masking" a pointer different from the existing
> __builtin_align_down/__builtin_align_up?
Intention is to allow to use any bits in pointer for tagging and give freedom.
To do so. I'm not propos
hanickadot wrote:
example of simple usage:
```c++
int64_t a = 42;
uintptr_t tag = 0b101u;
auto tptr = std::tagged_ptr(&a, tag);
assert(tptr.unsafe_dirty_pointer() != &a);
int64_t * original = tptr.pointer();
assert(tag == tptr.tag());
assert(original == &a);
auto [p, t] = tptr;
as
https://github.com/hanickadot created
https://github.com/llvm/llvm-project/pull/111861
This PR is not for merging! It's just for reviewing design meant for standard
library proposal P3125 (pointer tagging)
This code allows us to do pointer tagging in a safe way and also in constexpr.
It's all
hanickadot wrote:
I was also implementing this and run into an issue, so I looked into your
implementation and you have exactly same issue as I do, following code will
fail:
```c++
namespace std {
template consteval bool is_within_lifetime(const T * ptr) noexcept
{
return __builtin_is
@@ -17264,3 +17288,76 @@ bool Expr::tryEvaluateStrLen(uint64_t &Result,
ASTContext &Ctx) const {
EvalInfo Info(Ctx, Status, EvalInfo::EM_ConstantFold);
return EvaluateBuiltinStrLen(this, Result, Info);
}
+
+namespace {
+struct IsWithinLifetimeHandler {
+ EvalInfo &Info;
+
@@ -3760,6 +3765,9 @@ findSubobject(EvalInfo &Info, const Expr *E, const
CompleteObject &Obj,
if ((O->isAbsent() && !(handler.AccessKind == AK_Construct && I == N)) ||
(O->isIndeterminate() &&
!isValidIndeterminateAccess(handler.AccessKind))) {
+ // O
@@ -3927,6 +3935,9 @@ findSubobject(EvalInfo &Info, const Expr *E, const
CompleteObject &Obj,
// Placement new onto an inactive union member makes it active.
O->setUnion(Field, APValue());
} else {
+// Pointer to/into inactive unio
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/98756
From e21d8acf36c188056bc2f08b60470fdd6d62cf7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Sat, 13 Jul 2024 20:59:22 +0200
Subject: [PATCH] [clang] constexpr atomic builtins (__
https://github.com/hanickadot closed
https://github.com/llvm/llvm-project/pull/99773
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/99773
From ebf1c6996f18cbd706ec3d76a1887c58c9ce3230 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Sat, 20 Jul 2024 20:12:45 +0200
Subject: [PATCH 1/2] [clang-tidy] `bugprone-exception-
hanickadot wrote:
When this change is building at Compiler Explorer I noticed it spams build
output with warnings:
```
In file included from /root/llvm-project/clang/include/clang/AST/Type.h:31,
from
/root/llvm-project/clang/include/clang/AST/DeclarationName.h:16,
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/99773
From ebf1c6996f18cbd706ec3d76a1887c58c9ce3230 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Sat, 20 Jul 2024 20:12:45 +0200
Subject: [PATCH] [clang-tidy] `bugprone-exception-esca
@@ -518,6 +518,10 @@ Changes in existing checks
usages of ``std::string_view::compare``. Added a `StringLikeClasses` option
to detect usages of ``compare`` method in custom string-like classes.
+- Improved :doc:`exception-escape
`
hanickadot wrote:
Oh, s
https://github.com/hanickadot edited
https://github.com/llvm/llvm-project/pull/99773
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hanickadot edited
https://github.com/llvm/llvm-project/pull/99773
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hanickadot edited
https://github.com/llvm/llvm-project/pull/99773
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hanickadot created
https://github.com/llvm/llvm-project/pull/99773
As in title, code which check eligibility of exceptions with pointer types to
be handled by exception handler of type `void *` disallowed this case. It was
check:
```c++
if (isStandardPointerConvertible(Exce
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/98756
From f308fee20b44b1a7f83ca0038acf7b43fdd46fa9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Sat, 13 Jul 2024 20:59:22 +0200
Subject: [PATCH] [clang] constexpr atomic builtins (__
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/98756
From 76fe494219d085247e537b3633c321ffe2917226 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Sat, 13 Jul 2024 20:10:26 +0200
Subject: [PATCH 1/2] [clang] constexpr atomic builtins
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/98756
From 76fe494219d085247e537b3633c321ffe2917226 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Sat, 13 Jul 2024 20:10:26 +0200
Subject: [PATCH] [clang] constexpr atomic builtins (__
https://github.com/hanickadot created
https://github.com/llvm/llvm-project/pull/98756
This implements clang support for P3309 constexpr std::atomic & std::atomic_ref
(currently in LWG) by allowing constant evaluation of clang's __c11_atomic_OP
and GCC's __atomic_OP builtins.
From e42b4a8877fe
https://github.com/hanickadot closed
https://github.com/llvm/llvm-project/pull/98738
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/98738
From c691efa7649c990814bb363511106457e306aefa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Sat, 13 Jul 2024 14:28:07 +0200
Subject: [PATCH] [clang] [libc++] atomic constexpr sup
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/98738
From 83645b161f62bbff2baf5a90eef2c6cd1b280180 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Sat, 13 Jul 2024 13:12:24 +0200
Subject: [PATCH] [clang] [libc++] atomic constexpr sup
hanickadot wrote:
@philnik777 I would rather not, at least for the review, manipulating two
branches will be cumbersome. I can split it before merging, but as I don't
expect this to happen soon, it should be fine.
https://github.com/llvm/llvm-project/pull/98738
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/98738
From 63cefb0634ece515cbc1939c56d4fa2f0ef1eccf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Sat, 13 Jul 2024 13:12:24 +0200
Subject: [PATCH] [clang] [libc++] atomic constexpr sup
https://github.com/hanickadot edited
https://github.com/llvm/llvm-project/pull/98738
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hanickadot edited
https://github.com/llvm/llvm-project/pull/98738
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hanickadot approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/97952
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hanickadot approved this pull request.
https://github.com/llvm/llvm-project/pull/82448
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2122,20 +2135,70 @@ struct CounterCoverageMappingBuilder
subtractCounters(ParentCount, TrueCount));
}
- void createDecision(const BinaryOperator *E) {
+ void createOrCancelDecision(const BinaryOperator *E, unsigned Since) {
unsigned NumCon
@@ -2122,20 +2135,70 @@ struct CounterCoverageMappingBuilder
subtractCounters(ParentCount, TrueCount));
}
- void createDecision(const BinaryOperator *E) {
+ void createOrCancelDecision(const BinaryOperator *E, unsigned Since) {
unsigned NumCon
https://github.com/hanickadot edited
https://github.com/llvm/llvm-project/pull/82448
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -14416,7 +14416,7 @@ Syntax:
::
declare void @llvm.instrprof.mcdc.tvbitmap.update(ptr , i64 ,
-i32 )
+i32 )
hanickadot wrote:
I saw a patt
@@ -484,10 +484,31 @@ MC/DC Instrumentation
-
When instrumenting for Modified Condition/Decision Coverage (MC/DC) using the
-clang option ``-fcoverage-mcdc``, users are limited to at most **six**
leaf-level
-conditions in a boolean expression. A warning w
https://github.com/hanickadot approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/89869
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hanickadot approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/91446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hanickadot wrote:
> @hanickadot Your comments to `llvm/CoverageMapping.cpp` are not for this PR.
> See #80676 .
>
> They are my preferences.
Didn't know the context, I saw it green as added. Just ignore it.
https://github.com/llvm/llvm-project/pull/82448
__
@@ -223,9 +223,130 @@ Expected CounterMappingContext::evaluate(const
Counter &C) const {
return LastPoppedValue;
}
+mcdc::TVIdxBuilder::TVIdxBuilder(const SmallVectorImpl &NextIDs,
+ int Offset)
+: Indices(NextIDs.size()) {
+ // Construc
@@ -223,9 +223,130 @@ Expected CounterMappingContext::evaluate(const
Counter &C) const {
return LastPoppedValue;
}
+mcdc::TVIdxBuilder::TVIdxBuilder(const SmallVectorImpl &NextIDs,
+ int Offset)
+: Indices(NextIDs.size()) {
+ // Construc
@@ -1959,9 +2013,44 @@ struct CounterCoverageMappingBuilder
subtractCounters(ParentCount, TrueCount));
}
+ void RewindDecision(unsigned Since) {
+#ifndef NDEBUG
+llvm::DenseSet SeenIDs;
+#endif
+unsigned NConds = 0;
hanickadot
@@ -223,9 +223,130 @@ Expected CounterMappingContext::evaluate(const
Counter &C) const {
return LastPoppedValue;
}
+mcdc::TVIdxBuilder::TVIdxBuilder(const SmallVectorImpl &NextIDs,
+ int Offset)
+: Indices(NextIDs.size()) {
+ // Construc
https://github.com/hanickadot requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/82448
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -723,7 +737,15 @@ struct MCDCCoverageBuilder {
if (I == CondIDs.end())
return -1;
else
- return I->second;
+ return I->second.ID;
+ }
+
+ void ccc(const Expr *CondExpr, mcdc::ConditionIDs IDs) {
hanickadot wrote:
this should be nam
https://github.com/hanickadot edited
https://github.com/llvm/llvm-project/pull/82448
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,25 @@
+// RUN: %clang_cc1 -mllvm -emptyline-comment-coverage=false
-fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping
-emit-llvm-only %s | FileCheck %s
+
+// CHECK-LABEL: binary_conditional:
+// CHECK-NEXT: File 0, [[@LINE+4]]:31 -> {{
https://github.com/hanickadot approved this pull request.
Small typo in test. Otherwise LGTM
https://github.com/llvm/llvm-project/pull/82141
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com
https://github.com/hanickadot edited
https://github.com/llvm/llvm-project/pull/82141
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hanickadot closed
https://github.com/llvm/llvm-project/pull/80292
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/80292
From 886cd32ef022fcb7c5a4604c5238074a54f78b96 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Thu, 1 Feb 2024 22:20:44 +0100
Subject: [PATCH] [coverage] fix crash in code coverage
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/80292
From af3118a1bbc071ec5d3a9d5b43cce66b0fe828e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Thu, 1 Feb 2024 22:20:44 +0100
Subject: [PATCH] [coverage] fix crash in code coverage
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/80292
From 4b2d3b7b8f04510f791e4d3cc68b2de5a273c735 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Thu, 1 Feb 2024 22:20:44 +0100
Subject: [PATCH] [coverage] fix crash in code coverage
@@ -234,6 +234,35 @@ constexpr int check_macro_consteval_if_skipped(int i) {
// CHECK-NEXT: [[@LINE
return i;
}
+struct false_value {
+ constexpr operator bool() {
+return false;
+ }
+};
+
+template struct dependable_false_value {
+ constexpr operator bool() {
+
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/80292
From 4b2d3b7b8f04510f791e4d3cc68b2de5a273c735 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Thu, 1 Feb 2024 22:20:44 +0100
Subject: [PATCH] [coverage] fix crash in code coverage
hanickadot wrote:
> Changes LGTM, but please add a release note to `clang/docs/ReleaseNotes.rst`
> so users know about the fix.
>
> Thank you for the fix!
Even if it's a fix for recent PR I did few days ago?
Also, how do I get this into release branch (the previous change is there)?
https://
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/80292
From f1dfd7fb2713f879de3532c903217b911b81db34 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Thu, 1 Feb 2024 22:20:44 +0100
Subject: [PATCH] [coverage] fix crash in code coverage
@@ -1808,12 +1808,24 @@ struct CounterCoverageMappingBuilder
}
}
+private:
+ static bool evaluateConstantCondition(const Expr *Condition) {
+if (const auto *Expr = dyn_cast(Condition))
+ return Expr->getResultAsAPSInt().getExtValue();
+
+if (const auto *Exp
@@ -1808,12 +1808,24 @@ struct CounterCoverageMappingBuilder
}
}
+private:
+ static bool evaluateConstantCondition(const Expr *Condition) {
+if (const auto *Expr = dyn_cast(Condition))
+ return Expr->getResultAsAPSInt().getExtValue();
+
+if (const auto *Exp
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/80292
From 84817eb419dfe0a66e8b4b1d21cf67cbc6b20199 Mon Sep 17 00:00:00 2001
From: Alexandre Ganea <37383324+aga...@users.noreply.github.com>
Date: Thu, 1 Feb 2024 08:14:05 -0500
Subject: [PATCH] [coverage] fix crash
@@ -1808,12 +1808,24 @@ struct CounterCoverageMappingBuilder
}
}
+private:
+ static bool evaluateConstantCondition(const Expr *Condition) {
+if (const auto *Expr = dyn_cast(Condition))
+ return Expr->getResultAsAPSInt().getExtValue();
+
+if (const auto *Exp
https://github.com/hanickadot created
https://github.com/llvm/llvm-project/pull/80292
Fixes https://github.com/llvm/llvm-project/issues/80285
From 84c3e120e04394d024851f30044de591cf1599e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Thu, 1 Feb 2024 14:34:16 +010
https://github.com/hanickadot closed
https://github.com/llvm/llvm-project/pull/78033
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/78033
From e2e0ecab6693547938274ffa0a7f517cedf52205 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Mon, 22 Jan 2024 00:00:43 +0100
Subject: [PATCH 1/9] [coverage] skipping code coverage
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/78033
From ae319fd34659c1373ce573346b93ffaa290a3312 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Mon, 22 Jan 2024 00:00:43 +0100
Subject: [PATCH 1/9] [coverage] skipping code coverage
@@ -1700,43 +1776,116 @@ struct CounterCoverageMappingBuilder
Visit(S->getSubStmt());
}
+ void CoverIfConsteval(const IfStmt *S) {
+assert(S->isConsteval());
+
+const auto *Then = S->getThen();
+const auto *Else = S->getElse();
+
+// I'm using 'propagate
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/78033
From ae319fd34659c1373ce573346b93ffaa290a3312 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Mon, 22 Jan 2024 00:00:43 +0100
Subject: [PATCH 1/8] [coverage] skipping code coverage
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/78033
From ae319fd34659c1373ce573346b93ffaa290a3312 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Mon, 22 Jan 2024 00:00:43 +0100
Subject: [PATCH 1/7] [coverage] skipping code coverage
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/78033
From ae319fd34659c1373ce573346b93ffaa290a3312 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Mon, 22 Jan 2024 00:00:43 +0100
Subject: [PATCH 1/6] [coverage] skipping code coverage
@@ -1251,6 +1264,69 @@ struct CounterCoverageMappingBuilder
popRegions(Index);
}
+ /// Find a valid range starting with \p StartingLoc and ending before \p
+ /// BeforeLoc.
+ std::optional findAreaStartingFromTo(SourceLocation StartingLoc,
+
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/78033
From ae319fd34659c1373ce573346b93ffaa290a3312 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Mon, 22 Jan 2024 00:00:43 +0100
Subject: [PATCH 1/5] [coverage] skipping code coverage
@@ -174,6 +179,10 @@ class SourceMappingRegion {
void setGap(bool Gap) { GapRegion = Gap; }
+ bool isSkipped() const { return SkippedRegion; }
hanickadot wrote:
SkippedRegions are also created by preprocessor for comments and whitespaces,
then they are s
@@ -1700,43 +1776,116 @@ struct CounterCoverageMappingBuilder
Visit(S->getSubStmt());
}
+ void CoverIfConsteval(const IfStmt *S) {
+assert(S->isConsteval());
+
+const auto *Then = S->getThen();
+const auto *Else = S->getElse();
+
+// I'm using 'propagate
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/78033
From ae319fd34659c1373ce573346b93ffaa290a3312 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Mon, 22 Jan 2024 00:00:43 +0100
Subject: [PATCH 1/7] [coverage] skipping code coverage
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/78033
From ae319fd34659c1373ce573346b93ffaa290a3312 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Mon, 22 Jan 2024 00:00:43 +0100
Subject: [PATCH 1/6] [coverage] skipping code coverage
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/78033
From ae319fd34659c1373ce573346b93ffaa290a3312 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Mon, 22 Jan 2024 00:00:43 +0100
Subject: [PATCH 1/5] [coverage] skipping code coverage
https://github.com/hanickadot edited
https://github.com/llvm/llvm-project/pull/78033
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/78033
From ae319fd34659c1373ce573346b93ffaa290a3312 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Mon, 22 Jan 2024 00:00:43 +0100
Subject: [PATCH 1/4] [coverage] skipping code coverage
https://github.com/hanickadot updated
https://github.com/llvm/llvm-project/pull/78033
From ae319fd34659c1373ce573346b93ffaa290a3312 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?=
Date: Mon, 22 Jan 2024 00:00:43 +0100
Subject: [PATCH 1/3] [coverage] skipping code coverage
@@ -1251,6 +1264,70 @@ struct CounterCoverageMappingBuilder
popRegions(Index);
}
+ /// Find a valid range starting with \p StartingLoc and ending before \p
+ /// BeforeLoc.
+ std::optional findAreaStartingFromTo(SourceLocation StartingLoc,
hanickadot
1 - 100 of 147 matches
Mail list logo