Timm =?utf-8?q?Bäder?=
Message-ID:
In-Reply-To:
https://github.com/tbaederr closed
https://github.com/llvm/llvm-project/pull/113885
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/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/113885
>From 3005da1e2d25f124466743e5f7a5fc5b969f5740 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?=
Date: Mon, 28 Oct 2024 10:04:46 +0100
Subject: [PAT
https://github.com/zygoloid approved this pull request.
LG, thank you!
https://github.com/llvm/llvm-project/pull/113885
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tbaederr wrote:
I think I understand what you mean by changing the order now. I changed two
other places as well, just to be consistent.
https://github.com/llvm/llvm-project/pull/113885
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://l
https://github.com/tbaederr updated
https://github.com/llvm/llvm-project/pull/113885
>From de066be9c6d62bb17d50ddbff40d04cda40a2f45 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?=
Date: Mon, 28 Oct 2024 10:04:46 +0100
Subject: [PATCH] [clang][ExprConst] Reject field access with nul
zygoloid wrote:
As mentioned in the comment thread, I'd prefer to see this addressed by
reversing the order in which we call `addDecl` versus add an offset. While it's
a corner case, I think this change would cause us to start rejecting things
like [this example](https://godbolt.org/z/5Pae6Ghd
tbaederr wrote:
@zygoloid Do you approve too?
https://github.com/llvm/llvm-project/pull/113885
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman approved this pull request.
LGTM but the changes should come with a release note.
https://github.com/llvm/llvm-project/pull/113885
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/ma
tbaederr wrote:
Ping
https://github.com/llvm/llvm-project/pull/113885
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1703,7 +1703,7 @@ namespace {
bool checkNullPointerDiagnosingWith(const GenDiagType &GenDiag) {
if (Designator.Invalid)
return false;
- if (IsNullPtr) {
+ if (getLValueBase().isNull()) {
tbaederr wrote:
Looks like the check here
@@ -1703,7 +1703,7 @@ namespace {
bool checkNullPointerDiagnosingWith(const GenDiagType &GenDiag) {
if (Designator.Invalid)
return false;
- if (IsNullPtr) {
+ if (getLValueBase().isNull()) {
tbaederr wrote:
The offset is added in `a
@@ -1703,7 +1703,7 @@ namespace {
bool checkNullPointerDiagnosingWith(const GenDiagType &GenDiag) {
if (Designator.Invalid)
return false;
- if (IsNullPtr) {
+ if (getLValueBase().isNull()) {
zygoloid wrote:
Oh, I see. We're adjustin
@@ -1703,7 +1703,7 @@ namespace {
bool checkNullPointerDiagnosingWith(const GenDiagType &GenDiag) {
if (Designator.Invalid)
return false;
- if (IsNullPtr) {
+ if (getLValueBase().isNull()) {
zygoloid wrote:
Why was the old check not
https://github.com/tbaederr edited
https://github.com/llvm/llvm-project/pull/113885
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
Changes
Reject them if the base is null, not only if the entire pointer is null.
---
Full diff: https://github.com/llvm/llvm-project/pull/113885.diff
2 Files Affected:
- (modified) clang/lib/AST/ExprConstant.cpp (
https://github.com/tbaederr created
https://github.com/llvm/llvm-project/pull/113885
Reject them if the base is null, not only if the entire pointer is null.
>From 66d42412ddd22e0e4da293990d16a4d7692f973c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?=
Date: Mon, 28 Oct 2024 10:04
16 matches
Mail list logo