Always emit detailed type check diagnostics, update unit tests to reflect this.

Swift SVN r17334
This commit is contained in:
Joe Pamer
2014-05-03 23:03:47 +00:00
parent a155fc642a
commit 006158ff56
5 changed files with 45 additions and 58 deletions

View File

@@ -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;

View File

@@ -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">;

View File

@@ -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);

View File

@@ -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) {

View File

@@ -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)) {