[all-commits] [llvm/llvm-project] 199dfb: Silence a false positive about an unevaluated expr...

Aaron Ballman via All-commits all-commits at lists.llvm.org
Thu May 5 09:12:48 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 199dfb4d0cca0aaa217e79bd2371f96f6336bbc5
      https://github.com/llvm/llvm-project/commit/199dfb4d0cca0aaa217e79bd2371f96f6336bbc5
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2022-05-05 (Thu, 05 May 2022)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/Sema/warn-unused-value.c

  Log Message:
  -----------
  Silence a false positive about an unevaluated expr w/side effects

If the operand to `sizeof` is an expression of VLA type, the operand is
still evaluated, so we should not issue a diagnostic about ignoring the
side effects in this case, as they're not actually ignored.

Fixes #48010




More information about the All-commits mailing list