Disallow [[nodiscard]] on a function pointer declaration.
authorAaron Ballman <aaron@aaronballman.com>
Thu, 16 Apr 2020 13:27:37 +0000 (09:27 -0400)
committerAaron Ballman <aaron@aaronballman.com>
Thu, 16 Apr 2020 13:28:49 +0000 (09:28 -0400)
commit2ec5520a54ef9b359c6154adf857ba690bc117f1
tree9817953596c5c0b575b6010fde49be6e6a6147ea
parentfdf9bad573c11760a4c83586bb48dbc3cd9d96c7
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.
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp
clang/test/SemaCXX/warn-unused-result.cpp