[all-commits] [llvm/llvm-project] c3079f: [clang] Don't emit the warn_dangling_lifetime_poin...

Haojian Wu via All-commits all-commits at lists.llvm.org
Tue Jul 2 06:21:28 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c3079ffcd34e8ee2faaf7576a69a49acc1a3653f
      https://github.com/llvm/llvm-project/commit/c3079ffcd34e8ee2faaf7576a69a49acc1a3653f
  Author: Haojian Wu <hokein.wu at gmail.com>
  Date:   2024-07-02 (Tue, 02 Jul 2024)

  Changed paths:
    M clang/lib/Sema/CheckExprLifetime.cpp
    M clang/test/SemaCXX/warn-dangling-local.cpp

  Log Message:
  -----------
  [clang] Don't emit the warn_dangling_lifetime_pointer diagnostic for the assignment case. (#97408)

The `lifetime_pointer` case is handled before the assignment case. In
scenarios where we have the `gsl::Pointer` attribute, we may emit the
`-Wdangling-gsl` warning for assignment cases. This means we cannot use
`-Wno-dangling-assignment` to suppress the newly-added warning, this
patch fixes it.



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