[all-commits] [llvm/llvm-project] 2ec552: Disallow [[nodiscard]] on a function pointer decla...

AaronBallman via All-commits all-commits at lists.llvm.org
Thu Apr 16 06:29:12 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2ec5520a54ef9b359c6154adf857ba690bc117f1
      https://github.com/llvm/llvm-project/commit/2ec5520a54ef9b359c6154adf857ba690bc117f1
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2020-04-16 (Thu, 16 Apr 2020)

  Changed paths:
    M clang/lib/Sema/SemaDeclAttr.cpp
    M clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp
    M clang/test/SemaCXX/warn-unused-result.cpp

  Log Message:
  -----------
  Disallow [[nodiscard]] on a function pointer declaration.

This is not allowed by [dcl.attr.nodiscard]p1 for the standard attribute, but
is still supported for the [[clang::warn_unused_result]] spelling.




More information about the All-commits mailing list