diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-08-31 21:52:21 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-08-31 21:52:21 +0000 |
commit | e082af17d4b425a49f7f8bccc2a99810f0072828 (patch) | |
tree | 54abee613c0df6d17d2f4226fbff21876f965a9a | |
parent | 819e74544a326b90d13aa73e6497b187c6545ff5 (diff) |
Switch the "no module found" default-fatal warning to a default-fatal error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138909 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Basic/DiagnosticCommonKinds.td | 2 | ||||
-rw-r--r-- | lib/Frontend/CompilerInstance.cpp | 2 | ||||
-rw-r--r-- | test/Misc/warning-flags.c | 3 |
3 files changed, 3 insertions, 4 deletions
diff --git a/include/clang/Basic/DiagnosticCommonKinds.td b/include/clang/Basic/DiagnosticCommonKinds.td index 62d852572a..29bf270d11 100644 --- a/include/clang/Basic/DiagnosticCommonKinds.td +++ b/include/clang/Basic/DiagnosticCommonKinds.td @@ -59,7 +59,7 @@ def err_friends_define_only_namespace_scope : Error< "cannot define a function with non-namespace scope in a friend declaration">; def err_deleted_non_function : Error< "only functions can have deleted definitions">; -def warn_module_not_found : Warning<"module '%0' not found">, DefaultFatal; +def err_module_not_found : Error<"module '%0' not found">, DefaultFatal; // Sema && Lex def ext_longlong : Extension< diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index f53d0b064c..344e77b63b 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -645,7 +645,7 @@ ModuleKey CompilerInstance::loadModule(SourceLocation ImportLoc, /*SearchPath=*/0, /*RelativePath=*/0); if (!ModuleFile) { - getDiagnostics().Report(ModuleNameLoc, diag::warn_module_not_found) + getDiagnostics().Report(ModuleNameLoc, diag::err_module_not_found) << ModuleName.getName() << SourceRange(ImportLoc, ModuleNameLoc); return 0; diff --git a/test/Misc/warning-flags.c b/test/Misc/warning-flags.c index a911cbb27e..d24b02b27c 100644 --- a/test/Misc/warning-flags.c +++ b/test/Misc/warning-flags.c @@ -17,7 +17,7 @@ This test serves two purposes: The list of warnings below should NEVER grow. It should gradually shrink to 0. -CHECK: Warnings without flags (312): +CHECK: Warnings without flags (311): CHECK-NEXT: auto_storage_class CHECK-NEXT: backslash_newline_space CHECK-NEXT: charize_microsoft_ext @@ -230,7 +230,6 @@ CHECK-NEXT: warn_missing_case_for_condition CHECK-NEXT: warn_missing_dependent_template_keyword CHECK-NEXT: warn_missing_exception_specification CHECK-NEXT: warn_missing_whitespace_after_macro_name -CHECK-NEXT: warn_module_not_found CHECK-NEXT: warn_multiple_method_decl CHECK-NEXT: warn_no_constructor_for_refconst CHECK-NEXT: warn_nonnull_pointers_only |