[PATCH] D123436: [Clang] Pass llvm::BitstreamCursor by reference. NFC
Simon Pilgrim via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 9 02:58:05 PDT 2022
RKSimon added inline comments.
================
Comment at: clang/lib/Serialization/GlobalModuleIndex.cpp:130
std::unique_ptr<llvm::MemoryBuffer> IndexBuffer,
- llvm::BitstreamCursor Cursor)
+ llvm::BitstreamCursor &Cursor)
: Buffer(std::move(IndexBuffer)), IdentifierIndex(), NumIdentifierLookups(),
----------------
You're not passing this as a const, so the calling function's Cursor will be updated - this doesn't sound generally safe to me - what about a move?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123436/new/
https://reviews.llvm.org/D123436
More information about the cfe-commits
mailing list