Unverified Commit 45132b50 authored by Yingwei Zheng's avatar Yingwei Zheng Committed by GitHub
Browse files

[llubi] Fix evaluation order of logic operators (#195304)

`&&` is evaluated first, though it doesn't affect the result.
parent 3983bf64
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -67,8 +67,8 @@ std::optional<std::string> Library::readStringFromMemory(const Pointer &Ptr) {
AnyValue Library::executeMalloc(StringRef Name, Type *Type,
                                ArrayRef<AnyValue> Args,
                                MemAllocKind AllocKind) {
  assert(AllocKind == MemAllocKind::Malloc || AllocKind == MemAllocKind::New ||
         AllocKind == MemAllocKind::NewArray &&
  assert((AllocKind == MemAllocKind::Malloc || AllocKind == MemAllocKind::New ||
          AllocKind == MemAllocKind::NewArray) &&
         "Unexpected MemAllocKind for malloc()/new/new[]");

  const auto &SizeVal = Args[0];