[all-commits] [llvm/llvm-project] 968be0: [clang] Fix crash for sizeof on VLAs

Paulo Matos via All-commits all-commits at lists.llvm.org
Wed Jan 12 07:11:17 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 968be05b8fdc1d23c055cc4963230a89efbc5967
      https://github.com/llvm/llvm-project/commit/968be05b8fdc1d23c055cc4963230a89efbc5967
  Author: Paulo Matos <pmatos at igalia.com>
  Date:   2022-01-12 (Wed, 12 Jan 2022)

  Changed paths:
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Sema/SemaExpr.cpp
    A clang/test/SemaCXX/pr31042.cpp

  Log Message:
  -----------
  [clang] Fix crash for sizeof on VLAs

Adds overload of TransformToPotentiallyEvaluated for TypeSourceInfo to
properly deal with VLAs in nested calls of sizeof and typeof. Fixes
PR31042 (https://github.com/llvm/llvm-project/issues/30390).

Reviewed By: efriedma

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




More information about the All-commits mailing list