tbaeder added inline comments.
================
Comment at: clang/test/AST/Interp/loops.cpp:93
+ }
+ static_assert(f4() == 5, "");
+};
----------------
aaron.ballman wrote:
> Can you also add some tests that use nested loops with multiple levels of
> `break` and `continue` use?
>
> Also, I think it might be useful to show the jump statements causing code to
> be an invalid constant expression, as in:
> ```
> constexpr int foo() {
> int i;
>
> do {
> break;
> i = 12;
> } while (1);
>
> return i;
> }
>
> constexpr int f = foo();
> ```
I can add a commented-out test case for that, //but// it is currently being
rejected for the wrong reasons. I investigated that in another case already and
it will simply be rejected because the variable declaration does not have an
initializer. Not because we're reading an uninitialized variable.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135433/new/
https://reviews.llvm.org/D135433
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits