hazohelet added a comment.

I was rebasing D155064 <https://reviews.llvm.org/D155064> locally and saw test 
failures for the new interpreter in this file.
The cause seems to me that the new interpreter is not handling some cases of 
`SourceLocExpr` correctly when they appear inside constant-evaluated or 
immediate-function context.
e.g.

  struct A {
    int n = __builtin_LINE();
  };
  struct B {
    A a = {};
  };
  #line 100
  consteval void f() {
    constexpr B c = {};
    static_assert(c.a.n == 101, "");
  }

Live demo: https://godbolt.org/z/9Y7bzj56G

D155064 <https://reviews.llvm.org/D155064> pushes constant-evaluated context 
against initializers of `constexpr` variables, so this bug appears in the test 
file.
I'm not in any hurry to push D155064 <https://reviews.llvm.org/D155064> 
upstream, but if it might take several weeks for this bug to be fixed, I'd like 
this change to be reverted until it gets fixed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156045

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to