================
@@ -3771,6 +3771,10 @@ void Preprocessor::HandleElifFamilyDirective(Token 
&ElifToken,
 std::optional<LexEmbedParametersResult>
 Preprocessor::LexEmbedParameters(Token &CurTok, bool ForHasEmbed) {
   LexEmbedParametersResult Result{};
+  if (ForHasEmbed)
+    assert(isParsingIfOrElifDirective() &&
+           "__has_embed outside of #if or #elif directive?");
----------------
Fznamznon wrote:

That If that is just for an assert feels weird, can we
```suggestion
    assert(!ForHasEmbed || isParsingIfOrElifDirective() &&
           "__has_embed outside of #if or #elif directive?");
```

https://github.com/llvm/llvm-project/pull/224769
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to