[PATCH] D111400: [Clang] Implement P2242R3

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 27 16:25:14 PDT 2021


hubert.reinterpretcast added a comment.

A different "ouch" (and, yes, this is a regression from this patch):

  auto f = [](bool b) {
    if (b) return 42;
    static int x = 0;
    return x;
  };
  constexpr int x = f(true);
  const int *p = &x;

Generates no diagnostics with this patch even with `-std=c++17 -Wall -Wextra -pedantic-errors`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111400/new/

https://reviews.llvm.org/D111400



More information about the cfe-commits mailing list