[all-commits] [llvm/llvm-project] aed964: [clang][Interp] Fix discarding void-typed comma ex...

Timm Baeder via All-commits all-commits at lists.llvm.org
Tue Jul 25 22:45:27 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: aed9646d8e29c1c5c86be65a2fd97029edf628d9
      https://github.com/llvm/llvm-project/commit/aed9646d8e29c1c5c86be65a2fd97029edf628d9
  Author: Timm Bäder <tbaeder at redhat.com>
  Date:   2023-07-26 (Wed, 26 Jul 2023)

  Changed paths:
    M clang/lib/AST/Interp/ByteCodeExprGen.cpp
    M clang/test/AST/Interp/literals.cpp

  Log Message:
  -----------
  [clang][Interp] Fix discarding void-typed comma expressions

First, we need to handle void types in visitExpr, so we don't run into
an assertion there when we try to pop a return value from the stack
that isn't there.

Secondly, we need to handle it when visiting comma expressions so we
don't do the same thing there.

Differential Revision: https://reviews.llvm.org/D148925




More information about the All-commits mailing list