[all-commits] [llvm/llvm-project] d2d288: [clang-tidy] Fix De Morgan for overloaded comparis...

Zinovy Nis via All-commits all-commits at lists.llvm.org
Mon Sep 21 23:47:18 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d2d28852845aaf0588a4c4a9db341cb217440247
      https://github.com/llvm/llvm-project/commit/d2d28852845aaf0588a4c4a9db341cb217440247
  Author: Zinovy Nis <zinovy.nis at gmail.com>
  Date:   2026-09-22 (Tue, 22 Sep 2026)

  Changed paths:
    M clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp
    M clang-tools-extra/docs/ReleaseNotes.md
    M clang-tools-extra/test/clang-tidy/checkers/readability/simplify-boolean-expr-demorgan.cpp

  Log Message:
  -----------
  [clang-tidy] Fix De Morgan for overloaded comparisons (#221432)

Before my patch:


(https://source.chromium.org/chromium/chromium/src/+/main:base/trace_event/memory_allocator_dump.cc;l=174)

```diff
-  if (!(name == rhs.name && units == rhs.units &&
-        entry_type == rhs.entry_type)) {
+  if (!name == rhs.name || !units == rhs.units ||
+        entry_type != rhs.entry_type) {
```

With the patch:

```diff
-  if (!(name == rhs.name && units == rhs.units &&
-        entry_type == rhs.entry_type)) {
+  if (name != rhs.name || units != rhs.units ||
+        entry_type != rhs.entry_type) {
```

Tests were written with the assistance of ChatGPT 5.6 Terra



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