mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Exposes the global warning suppression and treatment as errors functionality to the Swift driver. Introduces the flags "-suppress-warnings" and "-warnings-as-errors". Test case include.
130 lines
4.5 KiB
C++
130 lines
4.5 KiB
C++
//===--- DiagnosticsDriver.def - Diagnostics Text ---------------*- C++ -*-===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See http://swift.org/LICENSE.txt for license information
|
|
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file defines driver-only diagnostics emitted in processing
|
|
// command-line arguments and setting up compilation.
|
|
// Each diagnostic is described using one of three kinds (error, warning, or
|
|
// note) along with a unique identifier, category, options, and text, and is
|
|
// followed by a signature describing the diagnostic argument kinds.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#if !(defined(DIAG) || (defined(ERROR) && defined(WARNING) && defined(NOTE)))
|
|
# error Must define either DIAG or the set {ERROR,WARNING,NOTE}
|
|
#endif
|
|
|
|
#ifndef ERROR
|
|
# define ERROR(ID,Options,Text,Signature) \
|
|
DIAG(ERROR,ID,Options,Text,Signature)
|
|
#endif
|
|
|
|
#ifndef WARNING
|
|
# define WARNING(ID,Options,Text,Signature) \
|
|
DIAG(WARNING,ID,Options,Text,Signature)
|
|
#endif
|
|
|
|
#ifndef NOTE
|
|
# define NOTE(ID,Options,Text,Signature) \
|
|
DIAG(NOTE,ID,Options,Text,Signature)
|
|
#endif
|
|
|
|
|
|
WARNING(warning_parallel_execution_not_supported,none,
|
|
"parallel execution not supported; falling back to serial execution",
|
|
())
|
|
|
|
ERROR(error_unable_to_execute_command,none,
|
|
"unable to execute command: %0", (StringRef))
|
|
ERROR(error_command_signalled,none,
|
|
"%0 command failed due to signal (use -v to see invocation)", (StringRef))
|
|
ERROR(error_command_failed,none,
|
|
"%0 command failed with exit code %1 (use -v to see invocation)",
|
|
(StringRef, int))
|
|
|
|
ERROR(error_expected_one_frontend_job,none,
|
|
"unable to handle compilation, expected exactly one frontend job", ())
|
|
ERROR(error_expected_frontend_command,none,
|
|
"expected a swift frontend command", ())
|
|
|
|
ERROR(error_cannot_specify__o_for_multiple_outputs,none,
|
|
"cannot specify -o when generating multiple output files", ())
|
|
|
|
ERROR(error_unable_to_load_output_file_map, none,
|
|
"unable to load output file map", ())
|
|
|
|
ERROR(error_no_output_file_map_specified,none,
|
|
"no output file map specified", ())
|
|
|
|
ERROR(error_unable_to_make_temporary_file,none,
|
|
"unable to make temporary file: %0", (StringRef))
|
|
|
|
ERROR(error_no_input_files,none,
|
|
"no input files", ())
|
|
|
|
ERROR(error_unexpected_input_file,none,
|
|
"unexpected input file: %0", (StringRef))
|
|
|
|
ERROR(error_unknown_target,none,
|
|
"unknown target '%0'", (StringRef))
|
|
|
|
ERROR(error_framework_bridging_header,none,
|
|
"using bridging headers with framework targets is unsupported", ())
|
|
|
|
ERROR(error_i_mode,none,
|
|
"the flag '-i' is no longer required and has been removed; "
|
|
"use '%0 input-filename'", (StringRef))
|
|
WARNING(warning_unnecessary_repl_mode,none,
|
|
"unnecessary option '%0'; this is the default for '%1' "
|
|
"with no input files", (StringRef, StringRef))
|
|
ERROR(error_unsupported_option,none,
|
|
"unsupported option '%0' for '%1'; did you mean '%2 %0'?",
|
|
(StringRef, StringRef, StringRef))
|
|
|
|
WARNING(incremental_requires_output_file_map,none,
|
|
"ignoring -incremental (currently requires an output file map)", ())
|
|
WARNING(incremental_requires_build_record_entry,none,
|
|
"ignoring -incremental; output file map has no master dependencies "
|
|
"entry (\"%0\" under \"\")", (StringRef))
|
|
|
|
ERROR(error_os_minimum_deployment,none,
|
|
"Swift requires a minimum deployment target of %0", (StringRef))
|
|
ERROR(error_sdk_too_old,none,
|
|
"Swift does not support the SDK '%0'", (StringRef))
|
|
|
|
ERROR(error_two_files_same_name,none,
|
|
"filename \"%0\" used twice: '%1' and '%2'",
|
|
(StringRef, StringRef, StringRef))
|
|
NOTE(note_explain_two_files_same_name,none,
|
|
"filenames are used to distinguish private declarations with the same "
|
|
"name", ())
|
|
|
|
WARNING(warn_cannot_stat_input,none,
|
|
"unable to determine when '%0' was last modified: %1",
|
|
(StringRef, StringRef))
|
|
|
|
ERROR(error_input_changed_during_build,none,
|
|
"input file '%0' was modified during the build",
|
|
(StringRef))
|
|
|
|
ERROR(error_conflicting_options, none,
|
|
"conflicting options '%0' and '%1'",
|
|
(StringRef, StringRef))
|
|
|
|
#ifndef DIAG_NO_UNDEF
|
|
# if defined(DIAG)
|
|
# undef DIAG
|
|
# endif
|
|
# undef NOTE
|
|
# undef WARNING
|
|
# undef ERROR
|
|
#endif
|