Skip to content

Commit

Permalink
[clang] Fix -Wunused-variable in InterpBuiltin.cpp (NFC)
Browse files Browse the repository at this point in the history
llvm-project/clang/lib/AST/Interp/InterpBuiltin.cpp:1332:21:
error: unused variable 'SrcDesc' [-Werror,-Wunused-variable]
  const Descriptor *SrcDesc = Src.getFieldDesc();
                    ^
1 error generated.
  • Loading branch information
DamonFool committed Mar 14, 2024
1 parent a99b912 commit 611d5ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/AST/Interp/InterpBuiltin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,7 @@ bool SetThreeWayComparisonField(InterpState &S, CodePtr OpPC,
bool DoMemcpy(InterpState &S, CodePtr OpPC, const Pointer &Src, Pointer &Dest) {
assert(Src.isLive() && Dest.isLive());

const Descriptor *SrcDesc = Src.getFieldDesc();
[[maybe_unused]] const Descriptor *SrcDesc = Src.getFieldDesc();
const Descriptor *DestDesc = Dest.getFieldDesc();

assert(!DestDesc->isPrimitive() && !SrcDesc->isPrimitive());
Expand Down

1 comment on commit 611d5ae

@tbaederr
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, thanks!

Please sign in to comment.