[all-commits] [llvm/llvm-project] 2b4d67: [Clang][Sema]: Allow copy constructor side effects...

Vinayak Dev via All-commits all-commits at lists.llvm.org
Fri Mar 1 07:40:58 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2b4d67bf59d609321701540a15f48eda04688652
      https://github.com/llvm/llvm-project/commit/2b4d67bf59d609321701540a15f48eda04688652
  Author: Vinayak Dev <104419489+vinayakdsci at users.noreply.github.com>
  Date:   2024-03-01 (Fri, 01 Mar 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaDecl.cpp
    M clang/test/SemaCXX/warn-unused-variables.cpp

  Log Message:
  -----------
  [Clang][Sema]: Allow copy constructor side effects (#81127)

Copy constructors can have initialization with side effects, and thus
clang should not emit a warning when -Wunused-variable is used in this
context. Currently however, a warning is emitted.

Now, compilation happens without warnings.

Fixes #79518



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