mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Always emit detailed type check diagnostics, update unit tests to reflect this.
Swift SVN r17334
This commit is contained in:
@@ -102,9 +102,6 @@ namespace swift {
|
||||
return TargetConfigOptions;
|
||||
}
|
||||
|
||||
/// Enables detailed type-check error reporting.
|
||||
bool detailedTypeCheckDiagnostics = false;
|
||||
|
||||
private:
|
||||
llvm::SmallVector<std::pair<std::string, std::string>, 2>
|
||||
TargetConfigOptions;
|
||||
|
||||
@@ -137,10 +137,6 @@ def serialize_diagnostics : Flag<["-"], "serialize-diagnostics">,
|
||||
Flags<[DriverOption, FrontendOption]>,
|
||||
HelpText<"Serialize diagnostics in a binary format">;
|
||||
|
||||
def detailed_diagnostics : Flag<["-"], "detailed-diagnostics">,
|
||||
Flags<[DriverOption, FrontendOption]>,
|
||||
HelpText<"Produce more detailed diagnostics for type-check errors">;
|
||||
|
||||
def module_cache_path : Separate<["-"], "module-cache-path">,
|
||||
Flags<[DriverOption, FrontendOption]>,
|
||||
HelpText<"Specifies the Clang module cache path">;
|
||||
|
||||
@@ -266,8 +266,6 @@ Job *Swift::constructJob(const JobAction &JA, std::unique_ptr<JobList> Inputs,
|
||||
Args.AddLastArg(Arguments, options::OPT_implicit_objc_with);
|
||||
Args.AddLastArg(Arguments, options::OPT_strict_keyword_arguments);
|
||||
|
||||
Args.AddLastArg(Arguments, options::OPT_detailed_diagnostics);
|
||||
|
||||
// Pass the optimization level down to the frontend.
|
||||
Args.AddLastArg(Arguments, options::OPT_O_Group);
|
||||
|
||||
|
||||
@@ -551,7 +551,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
Opts.EnableAppExtensionRestrictions = Args.hasArg(OPT_enable_app_extension);
|
||||
Opts.SplitPrepositions = Args.hasArg(OPT_split_objc_selectors);
|
||||
Opts.ImplicitObjCWith = Args.hasArg(OPT_implicit_objc_with);
|
||||
Opts.detailedTypeCheckDiagnostics = Args.hasArg(OPT_detailed_diagnostics);
|
||||
Opts.StrictKeywordArguments = Args.hasArg(OPT_strict_keyword_arguments);
|
||||
|
||||
if (Opts.SplitPrepositions) {
|
||||
|
||||
@@ -782,8 +782,6 @@ void ConstraintSystem::diagnoseFailureFromConstraints(Expr *expr) {
|
||||
Constraint *valueMemberConstraint = nullptr;
|
||||
Constraint *argumentConstraint = nullptr;
|
||||
|
||||
if (TC.Context.LangOpts.detailedTypeCheckDiagnostics) {
|
||||
|
||||
if(!ActiveConstraints.empty()) {
|
||||
// If any active conformance constraints are in the system, we know that
|
||||
// any inactive constraints are in its service. Capture the constraint and
|
||||
@@ -834,7 +832,6 @@ void ConstraintSystem::diagnoseFailureFromConstraints(Expr *expr) {
|
||||
|
||||
InactiveConstraints.pop_front();
|
||||
}
|
||||
}
|
||||
|
||||
// If no more descriptive constraint was found, use the fallback constraint.
|
||||
if (!(conversionConstraint || overloadConstraint)) {
|
||||
|
||||
Reference in New Issue
Block a user