================
@@ -2189,8 +2222,9 @@ ExprResult Parser::ParseUnaryExprOrTypeTraitExpression() {
assert(Tok.isOneOf(tok::kw_sizeof, tok::kw___datasizeof, tok::kw___alignof,
tok::kw_alignof, tok::kw__Alignof, tok::kw_vec_step,
tok::kw___builtin_omp_required_simd_align,
- tok::kw___builtin_vectorelements, tok::kw__Countof) &&
- "Not a sizeof/alignof/vec_step expression!");
+ tok::kw___builtin_vectorelements, tok::kw__Countof) ||
+ (getLangOpts().Reflection && Tok.is(tok::caretcaret)) &&
+ "Not a sizeof/alignof/vec_step expression!");
----------------
Sirraide wrote:
```suggestion
tok::kw___builtin_vectorelements, tok::kw__Countof,
tok::caretcaret) &&
"Not a sizeof/alignof/vec_step expression!");
```
I feel like this is enough; we don’t need to assert we’re in reflexion mode
*everywhere* where we use `tok::caretcaret`.
https://github.com/llvm/llvm-project/pull/164692
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits