We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
$FeatureName
1 parent a844f4f commit d686a3eCopy full SHA for d686a3e
lib/AST/ASTBridging.cpp
@@ -123,8 +123,12 @@ unsigned BridgedASTContext_majorLanguageVersion(BridgedASTContext cContext) {
123
124
bool BridgedASTContext_langOptsCustomConditionSet(BridgedASTContext cContext,
125
BridgedStringRef cName) {
126
- return cContext.unbridged().LangOpts
127
- .isCustomConditionalCompilationFlagSet(cName.unbridged());
+ ASTContext &ctx = cContext.unbridged();
+ auto name = cName.unbridged();
128
+ if (name.starts_with("$") && ctx.LangOpts.hasFeature(name.drop_front()))
129
+ return true;
130
+
131
+ return ctx.LangOpts.isCustomConditionalCompilationFlagSet(name);
132
}
133
134
bool BridgedASTContext_langOptsHasFeatureNamed(BridgedASTContext cContext,
0 commit comments