[PATCH] D123119: [clang][NFC] Add specificity to compatibility hack
Nathan Sidwell via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 6 03:58:42 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGba4482f48199: [clang][NFC] Add specificity to compatibility hack (authored by urnathan).
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123119/new/
https://reviews.llvm.org/D123119
Files:
clang/lib/AST/ExprConstant.cpp
Index: clang/lib/AST/ExprConstant.cpp
===================================================================
--- clang/lib/AST/ExprConstant.cpp
+++ clang/lib/AST/ExprConstant.cpp
@@ -8838,10 +8838,11 @@
E->getType()->getPointeeType());
// 1. We'll allow it in std::allocator::allocate, and anything which that
// calls.
- // 2. We'll allow it in the body of std::source_location:current. This is
- // necessary for libstdc++'s <source_location>, which gave its
- // parameter the type void*, and cast from that back to `const __impl*`
- // in the body. (Fixed for new versions in gcc.gnu.org/PR104602).
+ // 2. HACK 2022-03-28: Work around an issue with libstdc++'s
+ // <source_location> header. Fixed in GCC 12 and later (2022-04-??).
+ // We'll allow it in the body of std::source_location::current. GCC's
+ // implementation had a parameter of type `void*`, and casts from
+ // that back to `const __impl*` in its body.
if (VoidPtrCastMaybeOK &&
(Info.getStdAllocatorCaller("allocate") ||
IsDeclSourceLocationCurrent(Info.CurrentCall->Callee))) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123119.420776.patch
Type: text/x-patch
Size: 1206 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220406/e0dcee51/attachment.bin>
More information about the cfe-commits
mailing list