[clang] [HLSL] Add HLSL 202y language mode (PR #108437)
Justin Bogner via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 12 13:48:46 PDT 2024
================
@@ -1347,6 +1347,8 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer(
Diag(LambdaBeginLoc, getLangOpts().CPlusPlus11
? diag::warn_cxx98_compat_lambda
: diag::ext_lambda);
+ if (getLangOpts().HLSL)
+ Diag(LambdaBeginLoc, diag::ext_hlsl_lambda);
----------------
bogner wrote:
I think this will issue two warnings if someone specifies `-Wcxx98-compat` (for some reason...). Probably better to check the langopts for both c++11 and HLSL to figure out the right ID and then only call `Diag` once.
https://github.com/llvm/llvm-project/pull/108437
More information about the cfe-commits
mailing list