[all-commits] [llvm/llvm-project] 883ef1: [clang] Don't omit null pointer checks with -fms-c...
eleviant via All-commits
all-commits at lists.llvm.org
Thu Jul 9 06:59:05 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 883ef1ba1442618938961e8f8e3a6a74f3b7320a
https://github.com/llvm/llvm-project/commit/883ef1ba1442618938961e8f8e3a6a74f3b7320a
Author: eleviant <eleviant at accesssoftek.com>
Date: 2026-07-09 (Thu, 09 Jul 2026)
Changed paths:
M clang/docs/ReleaseNotes.md
M clang/include/clang/Options/Options.td
A clang/test/CodeGen/null-checks.c
Log Message:
-----------
[clang] Don't omit null pointer checks with -fms-compatibility (#204658)
MSVC preserves null check after dereference, e.g
```
struct Obj { int value, extra; };
int null_check_is_kept(Obj* p) {
int v = p->value;
if (p == nullptr)
return -1;
return v + p->extra;
}
```
Also MSVC keeps standard library calls (e.g memcpy), where target is
null pointer.
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