jj-marr wrote:
I'm still working on this. It seems like I broke the assertion tests. I'm
unsure why, but it should be fixed if I figure out a better way of evaluating
the macro.
https://github.com/llvm/llvm-project/pull/130458
___
cfe-commits mailing
https://github.com/jj-marr converted_to_draft
https://github.com/llvm/llvm-project/pull/130458
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jj-marr updated
https://github.com/llvm/llvm-project/pull/130458
>From d06c5ab5c30e535893335af798df339b0e9c6878 Mon Sep 17 00:00:00 2001
From: JJ Marr
Date: Sat, 8 Mar 2025 22:00:45 -0500
Subject: [PATCH] Explain which assertion failed during consteval
---
.../clang/Basic/D
https://github.com/jj-marr created
https://github.com/llvm/llvm-project/pull/130458
Take this piece of code:
```cpp
#include
consteval int square(int x) {
int result = x * x;
assert(result == 42);
return result;
}
void test() {
auto val = square(2);
}
```
The assertion will fail, and
https://github.com/jj-marr updated
https://github.com/llvm/llvm-project/pull/130458
>From d61892d8546944000118ad0312886da75cd6509b Mon Sep 17 00:00:00 2001
From: JJ Marr
Date: Sat, 8 Mar 2025 22:00:45 -0500
Subject: [PATCH] Explain which assertion failed during consteval
---
.../clang/Basic/D
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -std=c++23 -verify=expected,cxx20_plus %s
+
+#ifdef __ASSERT_FUNCTION
+#undef __ASSERT_FUNCTION
+#endif
+extern "C" void __assert_fail(const char*, const char*, unsigned, const char*);
+
+#define assert(cond) \
+ ((cond) ? (void)0 : __assert_f
https://github.com/jj-marr updated
https://github.com/llvm/llvm-project/pull/130458
>From 0cba377eb8693657b7688cd1feb1cc9c5734f307 Mon Sep 17 00:00:00 2001
From: JJ Marr
Date: Sat, 8 Mar 2025 22:00:45 -0500
Subject: [PATCH] Explain which assertion failed during consteval
---
.../clang/Basic/D
https://github.com/jj-marr ready_for_review
https://github.com/llvm/llvm-project/pull/130458
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jj-marr updated
https://github.com/llvm/llvm-project/pull/130458
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,sans-s
https://github.com/jj-marr updated
https://github.com/llvm/llvm-project/pull/130458
>From 3b6d28e4f74c1fda73abe3b5972d5ac2a43576de Mon Sep 17 00:00:00 2001
From: JJ Marr
Date: Sat, 8 Mar 2025 22:00:45 -0500
Subject: [PATCH] Explain which assertion failed during consteval
---
clang/docs/Releas
https://github.com/jj-marr updated
https://github.com/llvm/llvm-project/pull/130458
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,sans-s
https://github.com/jj-marr updated
https://github.com/llvm/llvm-project/pull/130458
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,sans-s
@@ -5975,9 +5975,15 @@ static bool CheckConstexprFunction(EvalInfo &Info,
SourceLocation CallLoc,
Definition->hasAttr(
return true;
- if (Info.getLangOpts().CPlusPlus11) {
-const FunctionDecl *DiagDecl = Definition ? Defin
jj-marr wrote:
> LGTM modulo nit.
>
> Are you happy with the current state? @cor3ntin @Sirraide
Shouldn't CI be passing? I can't figure out why there are failures.
https://github.com/llvm/llvm-project/pull/130458
___
cfe-commits mailing list
cfe-comm
@@ -5975,9 +5975,15 @@ static bool CheckConstexprFunction(EvalInfo &Info,
SourceLocation CallLoc,
Definition->hasAttr(
return true;
- if (Info.getLangOpts().CPlusPlus11) {
-const FunctionDecl *DiagDecl = Definition ? Defin
@@ -5975,9 +5975,22 @@ static bool CheckConstexprFunction(EvalInfo &Info,
SourceLocation CallLoc,
Definition->hasAttr(
return true;
- if (Info.getLangOpts().CPlusPlus11) {
-const FunctionDecl *DiagDecl = Definition ? Defin
https://github.com/jj-marr updated
https://github.com/llvm/llvm-project/pull/130458
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,sans-s
https://github.com/jj-marr updated
https://github.com/llvm/llvm-project/pull/130458
>From 64eb62576dc1ecf0e696f2448e410c2fd77575de Mon Sep 17 00:00:00 2001
From: JJ Marr
Date: Sat, 8 Mar 2025 22:00:45 -0500
Subject: [PATCH] Explain which assertion failed during consteval
---
clang/docs/Releas
https://github.com/jj-marr updated
https://github.com/llvm/llvm-project/pull/130458
>From 67984fbf0374fa40fd7b73431b17baddc301290f Mon Sep 17 00:00:00 2001
From: JJ Marr
Date: Sat, 8 Mar 2025 22:00:45 -0500
Subject: [PATCH] Explain which assertion failed during consteval
---
clang/docs/Releas
https://github.com/jj-marr updated
https://github.com/llvm/llvm-project/pull/130458
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,sans-s
jj-marr wrote:
> @jj-marr Thanks. Do you want us to merge that for you?
Is it something I can actually do myself?
https://github.com/llvm/llvm-project/pull/130458
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/m
jj-marr wrote:
OK, merge whenever.
https://github.com/llvm/llvm-project/pull/130458
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -851,6 +851,19 @@ bool CheckCallable(InterpState &S, CodePtr OpPC, const
Function *F) {
if (F->isLambdaStaticInvoker())
return true;
+ // Diagnose failed assertions specially.
+ if (S.Current->getLocation(OpPC).isMacroID() &&
+ F->getDecl()->getIdentifier()) {
https://github.com/jj-marr edited
https://github.com/llvm/llvm-project/pull/14
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jj-marr wrote:
Thinking more, this is not a good check at this time.
https://github.com/llvm/llvm-project/pull/140001
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jj-marr closed
https://github.com/llvm/llvm-project/pull/140001
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jj-marr wrote:
`std::span` has a capability gap with a const reference to a `std::vector`
until C++26 as `std::span` cannot be constructed from an initializer list.
Should this be a C++26 check?
https://github.com/llvm/llvm-project/pull/140001
___
c
27 matches
Mail list logo