[all-commits] [llvm/llvm-project] 3fa0a0: [clang] Check `expr` inside `InitListChecker::Upda...

Aleksandr Platonov via All-commits all-commits at lists.llvm.org
Wed Aug 12 12:14:14 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 3fa0a039ab6f856e39dab973df56831b63ed51c5
      https://github.com/llvm/llvm-project/commit/3fa0a039ab6f856e39dab973df56831b63ed51c5
  Author: Aleksandr Platonov <platonov.aleksandr at huawei.com>
  Date:   2020-08-12 (Wed, 12 Aug 2020)

  Changed paths:
    M clang/lib/Sema/SemaInit.cpp
    A clang/test/Sema/init-invalid-struct-array.c

  Log Message:
  -----------
  [clang] Check `expr` inside `InitListChecker::UpdateStructuredListElement()`

- Prevent nullptr-deference at try to emit warning for invalid `expr`
- Simplify `InitListChecker::UpdateStructuredListElement()` usages. We do not need to check `expr` and increment `StructuredIndex` (for invalid `expr`) before the call anymore.

Reviewed By: aaron.ballman

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




More information about the All-commits mailing list