aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/ByteCode
diff options
context:
space:
mode:
authorCorentin Jabot <corentinjabot@gmail.com>2025-07-16 15:25:24 +0300
committerGitHub <noreply@github.com>2025-07-16 14:25:24 +0200
commit9e5470e7d6ea1ad4fe25a9416706d769e41a03c1 (patch)
tree377c0fbb594fa302a151aadb0999f8f516219231 /clang/lib/AST/ByteCode
parent5abdce4083ed37203e4893f8f7ef3890586b008a (diff)
downloadllvm-9e5470e7d6ea1ad4fe25a9416706d769e41a03c1.zip
llvm-9e5470e7d6ea1ad4fe25a9416706d769e41a03c1.tar.gz
llvm-9e5470e7d6ea1ad4fe25a9416706d769e41a03c1.tar.bz2
[Clang] Diagnose forming references to nullptr (#143667)
Per [decl.ref], > Because a null pointer value or a pointer past the end of an object does not point to an object, a reference in a well-defined program cannot refer to such things. Note this does not fixes the new bytecode interpreter. Fixes #48665
Diffstat (limited to 'clang/lib/AST/ByteCode')
-rw-r--r--clang/lib/AST/ByteCode/State.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/AST/ByteCode/State.h b/clang/lib/AST/ByteCode/State.h
index 9a81fa6..6fc3322 100644
--- a/clang/lib/AST/ByteCode/State.h
+++ b/clang/lib/AST/ByteCode/State.h
@@ -35,6 +35,7 @@ enum AccessKinds {
AK_Construct,
AK_Destroy,
AK_IsWithinLifetime,
+ AK_Dereference
};
/// The order of this enum is important for diagnostics.