================
@@ -1280,6 +1275,9 @@ EmbedResult Preprocessor::EvaluateHasEmbed(Token &Tok,
IdentifierInfo *II) {
return EmbedResult::Invalid;
}
+ if (Params->UnrecognizedParams > 0)
+ return EmbedResult::NotFound;
+
----------------
AaronBallman wrote:
> From what I understand, unknown parameters don’t trigger an error
They don't for `__has_embed` but they do for `#embed`. The idea is: you can use
`__has_embed` to determine whether the `#embed` directive will succeed or not;
so if the parameter is unknown, `__has_embed` should return false.
https://github.com/llvm/llvm-project/pull/163107
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits