[all-commits] [llvm/llvm-project] c43f82: [Clang] Be less strict about diagnosing null point...
Corentin Jabot via All-commits
all-commits at lists.llvm.org
Sat Jul 19 10:30:38 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c43f828d59672b4844a7409e4660b9f8f509da35
https://github.com/llvm/llvm-project/commit/c43f828d59672b4844a7409e4660b9f8f509da35
Author: Corentin Jabot <corentinjabot at gmail.com>
Date: 2025-07-19 (Sat, 19 Jul 2025)
Changed paths:
M clang/lib/AST/ExprConstant.cpp
M clang/test/AST/ByteCode/const-eval.c
M clang/test/Sema/const-eval.c
M clang/test/SemaCXX/constant-expression-cxx14.cpp
Log Message:
-----------
[Clang] Be less strict about diagnosing null pointer dereference. (#149648)
In #143667, we made constant evaluation fail on `*null_ptr`, as this is
UB. However, `&(*(foo*)0)` seems to be a common pattern, which made
#143667 too disruptive.
So instead of failing the evaluation, we note the UB, which let clang
recovers when checking for constant initialization.
Fixes #149500
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list