[clang] [clang][Interp] Only diagnose null field access in constant contexts (PR #69223)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 23 05:48:36 PDT 2023
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>
Message-ID:
In-Reply-To: <llvm/llvm-project/pull/69223/clang at github.com>
================
@@ -295,7 +295,7 @@ class Pointer {
bool isUnion() const;
/// Checks if the storage is extern.
- bool isExtern() const { return Pointee->isExtern(); }
+ bool isExtern() const { return Pointee && Pointee->isExtern(); }
----------------
AaronBallman wrote:
If we need to care that `Pointee` can be null, we need to care consistently, don't we?
https://github.com/llvm/llvm-project/pull/69223
More information about the cfe-commits
mailing list