[all-commits] [llvm/llvm-project] d703dc: [AST] Fix crash in evaluation of OpaqueExpr in Clangd

Ilya Biryukov via All-commits all-commits at lists.llvm.org
Mon Aug 28 08:11:42 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d703dcdfb08dbd591589a12e0ca0852c5fd30a72
  Author: Ilya Biryukov <ibiryukov at google.com>
  Date:   2023-08-28 (Mon, 28 Aug 2023)

  Changed paths:
    M clang-tools-extra/clangd/unittests/HoverTests.cpp
    M clang/lib/AST/ExprConstant.cpp

  Log Message:
  [AST] Fix crash in evaluation of OpaqueExpr in Clangd

The code mistakenly returns the value as evaluated whenever the
temporary is allocated, but not yet evaluated.

I could only reproduce in Clangd and could not come up with an example
that would crash the compiler. Clangd runs more evaluations for hover
than the language would allow.

Reviewed By: kadircet

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

More information about the All-commits mailing list