================
@@ -1553,6 +1553,13 @@ StmtResult Parser::ParseIfStatement(SourceLocation 
*TrailingElseLoc) {
       IsConsteval = true;
       ConstevalLoc = ConsumeToken();
     }
+
+    if (Tok.is(tok::code_completion)) {
----------------
HighCommander4 wrote:

This needs to go in an `else` after the `Tok.is(tok::kw_consteval)`. Otherwise, 
if you invoke completion **after** `consteval`, e.g.:

`if consteval ^` <-- here

then you incorrectly get `constexpr` and `consteval` suggested.

https://github.com/llvm/llvm-project/pull/124315
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to