[all-commits] [llvm/llvm-project] 11ce3d: [llvm] Add LLVM_CTOR_NODISCARD (#65418)

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Tue Sep 5 16:47:18 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 11ce3d99b7654a2211ce6ab56eb9d0667efe0939
      https://github.com/llvm/llvm-project/commit/11ce3d99b7654a2211ce6ab56eb9d0667efe0939
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2023-09-05 (Tue, 05 Sep 2023)

  Changed paths:
    M llvm/include/llvm/MC/MCInstPrinter.h
    M llvm/include/llvm/Support/Compiler.h

  Log Message:
  -----------
  [llvm] Add LLVM_CTOR_NODISCARD (#65418)

[[nodiscard]] on constructors is a defect report against C++17. That
means that it should be applied retroactively, though older compilers
might not know about it and emit warnings. This adds a
back-compatibility macro.




More information about the All-commits mailing list