[clang] [clang][bytecode] Fix contains check using llvm::find (PR #149050)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 16 03:21:51 PDT 2025
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/149050 at github.com>
================
@@ -575,7 +575,8 @@ bool CheckConst(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {
// The This pointer is writable in constructors and destructors,
// even if isConst() returns true.
- if (llvm::find(S.InitializingBlocks, Ptr.block()))
+ if (llvm::find(S.InitializingBlocks, Ptr.block()) !=
+ S.InitializingBlocks.end())
----------------
tbaederr wrote:
Ah, _that_ was what it's called. :man_facepalming:
https://github.com/llvm/llvm-project/pull/149050
More information about the cfe-commits
mailing list