Skip to content

Commit

Permalink
[clang] Fix build after 537344f
Browse files Browse the repository at this point in the history
This fixes the following build failure on lldb-x86_64-debian:

/llvm-project/clang/lib/Serialization/ASTReader.cpp:1453:12: error: call to deleted constructor of 'llvm::Error'
    return Err;
           ^~~
/llvm-project/llvm/include/llvm/Support/Error.h:189:3: note: 'Error' has been explicitly marked deleted here
  Error(const Error &Other) = delete;
  ^
/llvm-project/llvm/include/llvm/Support/Error.h:496:18: note: passing argument to parameter 'Err' here
  Expected(Error Err)
                 ^
  • Loading branch information
jansvoboda11 committed Oct 6, 2023
1 parent 7510f32 commit 28e8ade
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/Serialization/ASTReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,7 @@ ASTReader::readSLocOffset(ModuleFile *F, unsigned Index) {
SavedStreamPosition SavedPosition(Cursor);
if (llvm::Error Err = Cursor.JumpToBit(F->SLocEntryOffsetsBase +
F->SLocEntryOffsets[Index]))
return Err;
return std::move(Err);

Expected<llvm::BitstreamEntry> MaybeEntry = Cursor.advance();
if (!MaybeEntry)
Expand Down

0 comments on commit 28e8ade

Please sign in to comment.