[PATCH] D129488: [Sema] Fix evaluation context of immediate functions in default arguments

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 21 10:00:37 PDT 2022


ilya-biryukov added a comment.

another example that actually breaks:

  constexpr int foo(int i) {
      if (i == 1) return i/0;
  }
  
  consteval int bar(int i) {
      if (i == 1) return i/0;
        return i;
  }
  
  void baz(int i = foo(1), int j = bar(1)) {
  }
  
  void xxx() {
    baz();
  }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129488



More information about the cfe-commits mailing list