[all-commits] [llvm/llvm-project] 2b5f68: [Clang][C++23] Implement P1774R8: Portable assumpt...
Sirraide via All-commits
all-commits at lists.llvm.org
Sat Mar 9 03:07:39 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2b5f68a5f63d2342a056bf9f86bd116c100fd81a
https://github.com/llvm/llvm-project/commit/2b5f68a5f63d2342a056bf9f86bd116c100fd81a
Author: Sirraide <aeternalmail at gmail.com>
Date: 2024-03-09 (Sat, 09 Mar 2024)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/Basic/Attr.td
M clang/include/clang/Basic/AttrDocs.td
M clang/include/clang/Basic/DiagnosticASTKinds.td
M clang/include/clang/Basic/DiagnosticGroups.td
M clang/include/clang/Basic/DiagnosticParseKinds.td
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/include/clang/Basic/LangOptions.def
M clang/include/clang/Driver/Options.td
M clang/include/clang/Parse/Parser.h
M clang/include/clang/Sema/Sema.h
M clang/lib/AST/ExprConstant.cpp
M clang/lib/CodeGen/CGCall.cpp
M clang/lib/CodeGen/CGStmt.cpp
M clang/lib/Driver/ToolChains/Clang.cpp
M clang/lib/Parse/ParseDeclCXX.cpp
M clang/lib/Parse/ParseExpr.cpp
M clang/lib/Sema/SemaDeclAttr.cpp
M clang/lib/Sema/SemaOpenMP.cpp
M clang/lib/Sema/SemaStmtAttr.cpp
M clang/lib/Sema/SemaTemplateInstantiate.cpp
A clang/test/CodeGenCXX/cxx23-assume.cpp
M clang/test/Misc/pragma-attribute-supported-attributes-list.test
A clang/test/Parser/cxx23-assume.cpp
A clang/test/SemaCXX/cxx23-assume-disabled.cpp
A clang/test/SemaCXX/cxx23-assume-print.cpp
A clang/test/SemaCXX/cxx23-assume.cpp
M clang/www/cxx_status.html
Log Message:
-----------
[Clang][C++23] Implement P1774R8: Portable assumptions (#81014)
This implements the C++23 `[[assume]]` attribute.
Assumption information is lowered to a call to `@llvm.assume`, unless the expression has side-effects, in which case it is discarded and a warning is issued to tell the user that the assumption doesn’t do anything. A failed assumption at compile time is an error (unless we are in `MSVCCompat` mode, in which case we don’t check assumptions at compile time).
Due to performance regressions in LLVM, assumptions can be disabled with the `-fno-assumptions` flag. With it, assumptions will still be parsed and checked, but no calls to `@llvm.assume` will be emitted and assumptions will not be checked at compile time.
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