mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Give an error if “@obj” is used without importing ObjectiveC.
The standard library is exemptmpt (-parse-stdlib) from this checking. Implements <rdar://problem/16559137>. Swift SVN r16155
This commit is contained in:
@@ -526,6 +526,12 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
Opts.DebuggerSupport = true;
|
||||
}
|
||||
|
||||
if (auto A = Args.getLastArg(OPT_enable_objc_attr_requires_objc_module,
|
||||
OPT_disable_objc_attr_requires_objc_module)) {
|
||||
Opts.EnableObjCAttrRequiresObjCModule
|
||||
= A->getOption().matches(OPT_enable_objc_attr_requires_objc_module);
|
||||
}
|
||||
|
||||
if (const Arg *A = Args.getLastArg(OPT_debug_constraints_attempt)) {
|
||||
unsigned attempt;
|
||||
if (StringRef(A->getValue()).getAsInteger(10, attempt)) {
|
||||
|
||||
Reference in New Issue
Block a user