[all-commits] [llvm/llvm-project] 385e5f: Fix incorrect call to ExprResult::get()

Alexander Richardson via All-commits all-commits at lists.llvm.org
Thu Jun 11 14:24:51 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 385e5f7e147fcf792085b365cc48380850612025
      https://github.com/llvm/llvm-project/commit/385e5f7e147fcf792085b365cc48380850612025
  Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
  Date:   2020-06-11 (Thu, 11 Jun 2020)

  Changed paths:
    M clang/lib/Sema/SemaExpr.cpp

  Log Message:
  -----------
  Fix incorrect call to ExprResult::get()

Res is already a ExprResult, so if we call .get(), we will convert an
ExprError() result into an unset result. I discovered this in our downstream
CHERI target where this resulted in a crash due to a NULL-dereference.
It appears that this was introduced in SVN revision 201788 (8690a6860a45ba36e39b4ff0dbe434195e125d11)

Reviewed By: Anastasia
Differential Revision: https://reviews.llvm.org/D81608




More information about the All-commits mailing list