[all-commits] [llvm/llvm-project] d2232e: [libc++] Initialize all member variables of `__sta...

Konstantin Varlamov via All-commits all-commits at lists.llvm.org
Thu Aug 31 22:14:30 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d2232e687317b749273d0658718cc1668f25472e
      https://github.com/llvm/llvm-project/commit/d2232e687317b749273d0658718cc1668f25472e
  Author: Konstantin Varlamov <varconsteq at gmail.com>
  Date:   2023-08-31 (Thu, 31 Aug 2023)

  Changed paths:
    M libcxx/include/regex

  Log Message:
  -----------
  [libc++] Initialize all member variables of `__state` in `<regex>`

This is to prevent a GCC warning (
https://github.com/llvm/llvm-project/issues/65132). It looks like
`__at_first` is always assigned before it's used, but all other member
variables of this struct are initialized in the constructor, so there is
no reason not to initialize `__at_first` as well.

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




More information about the All-commits mailing list