[all-commits] [llvm/llvm-project] 5029dc: Implement WG14 N2764 the [[noreturn]] attribute
Aaron Ballman via All-commits
all-commits at lists.llvm.org
Mon Feb 14 06:38:44 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5029dce492b3cf3ac191eda0b5bf268c3acac2e0
https://github.com/llvm/llvm-project/commit/5029dce492b3cf3ac191eda0b5bf268c3acac2e0
Author: Aaron Ballman <aaron at aaronballman.com>
Date: 2022-02-14 (Mon, 14 Feb 2022)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/Basic/Attr.td
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/lib/Headers/stdnoreturn.h
M clang/lib/Sema/SemaDeclAttr.cpp
M clang/test/AST/ast-dump-lambda.cpp
A clang/test/Sema/c2x-noreturn.c
Log Message:
-----------
Implement WG14 N2764 the [[noreturn]] attribute
This adds support for http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2764.pdf,
which was adopted at the Feb 2022 WG14 meeting. That paper adds
[[noreturn]] and [[_Noreturn]] to the list of supported attributes in
C2x. These attributes have the same semantics as the [[noreturn]]
attribute in C++.
The [[_Noreturn]] attribute was added as a deprecated feature so that
translation units which include <stdnoreturn.h> do not get an error on
use of [[noreturn]] because the macro expands to _Noreturn. Users can
use -Wno-deprecated-attributes to silence the diagnostic.
Use of <stdnotreturn.h> or the noreturn macro were both deprecated.
Users can define the _CLANG_DISABLE_CRT_DEPRECATION_WARNINGS macro to
suppress the deprecation diagnostics coming from the header file.
More information about the All-commits
mailing list