//===- DiagnosticsFrontend.def - Diagnostics Text ---------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2015 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 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,Category,Options,Text,Signature) \ DIAG(ERROR,ID,Category,Options,Text,Signature) #endif #ifndef WARNING # define WARNING(ID,Category,Options,Text,Signature) \ DIAG(WARNING,ID,Category,Options,Text,Signature) #endif #ifndef NOTE # define NOTE(ID,Category,Options,Text,Signature) \ DIAG(NOTE,ID,Category,Options,Text,Signature) #endif WARNING(warning_no_such_sdk,frontend,none, "no such SDK: '%0'", (StringRef)) ERROR(error_no_such_file_or_directory,frontend,none, "no such file or directory: '%0'", (StringRef)) ERROR(cannot_open_serialized_file,frontend,none, "cannot open file '%0' for diagnostics emission (%1)", (StringRef, StringRef)) ERROR(error_open_input_file,frontend,none, "error opening input file '%0' (%1)", (StringRef, StringRef)) ERROR(error_clang_importer_not_linked_in,frontend,none, "clang importer not available", ()) ERROR(error_clang_importer_create_fail,frontend,none, "clang importer creation failed", ()) ERROR(error_missing_arg_value,frontend,none, "missing argument value for '%0', expected %1 argument(s)", (StringRef, unsigned)) ERROR(error_unknown_arg,frontend,none, "unknown argument: '%0'", (StringRef)) ERROR(error_invalid_arg_value,frontend,none, "invalid value '%1' in '%0'", (StringRef, StringRef)) ERROR(error_immediate_mode_missing_stdlib,frontend,none, "could not load the swift standard library", ()) ERROR(error_immediate_mode_missing_library,frontend,none, "could not load %select{shared library|framework}0 '%1'", (unsigned, StringRef)) ERROR(error_immediate_mode_primary_file,frontend,none, "immediate mode is incompatible with -primary-file", ()) ERROR(error_mode_cannot_emit_header,frontend,none, "this mode does not support emitting Objective-C headers", ()) ERROR(error_mode_cannot_emit_module,frontend,none, "this mode does not support emitting modules", ()) ERROR(error_mode_cannot_emit_module_doc,frontend,none, "this mode does not support emitting module documentation files", ()) ERROR(error_bad_module_name,frontend,none, "module name \"%0\" is not a valid identifier" "%select{|; use -module-name flag to specify an alternate name}1", (StringRef, bool)) ERROR(error_stdlib_module_name,frontend,none, "module name \"%0\" is reserved for the standard library" "%select{|; use -module-name flag to specify an alternate name}1", (StringRef, bool)) ERROR(error_repl_requires_no_input_files,frontend,none, "REPL mode requires no input files", ()) ERROR(error_mode_requires_one_input_file,frontend,none, "this mode requires a single input file", ()) ERROR(error_mode_requires_an_input_file,frontend,none, "this mode requires at least one input file", ()) ERROR(error_no_output_filename_specified,frontend,none, "an output filename was not specified for a mode which requires an output " "filename", ()) ERROR(error_implicit_output_file_is_directory,frontend,none, "the implicit output file '%0' is a directory; explicitly specify a filename " "using -o", (StringRef)) ERROR(repl_must_be_initialized,sema,none, "variables currently must have an initial value when entered at the " "top level of the REPL", ()) ERROR(error_doing_code_completion,frontend,none, "compiler is in code completion mode (benign diagnostic)", ()) #ifndef DIAG_NO_UNDEF # if defined(DIAG) # undef DIAG # endif # undef NOTE # undef WARNING # undef ERROR #endif