From: Chris Lattner Date: Fri, 6 Feb 2009 04:16:41 +0000 (+0000) Subject: default diag::err_pp_file_not_found to mapping to fatal, X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=db76684bcbc99d7532d1ec1a2b501cd0e2d7cf5f;p=clang default diag::err_pp_file_not_found to mapping to fatal, implementing PR3492: #include failures should be a fatal error git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63915 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Driver/clang.cpp b/Driver/clang.cpp index bf885ea464..fb8be31c27 100644 --- a/Driver/clang.cpp +++ b/Driver/clang.cpp @@ -38,6 +38,7 @@ #include "clang/AST/ASTConsumer.h" #include "clang/Parse/Parser.h" #include "clang/Lex/HeaderSearch.h" +#include "clang/Lex/LexDiagnostic.h" #include "clang/Basic/FileManager.h" #include "clang/Basic/SourceManager.h" #include "clang/Basic/TargetInfo.h" @@ -681,7 +682,7 @@ ErrorOnExtensions("pedantic-errors", static llvm::cl::opt SuppressSystemWarnings("suppress-system-warnings", - llvm::cl::desc("Suppress warnings issued in system headers"), + llvm::cl::desc("Suppress warnings issued in system headers"), llvm::cl::init(true)); static llvm::cl::opt @@ -710,7 +711,8 @@ WarnImplicitFunctionDeclaration("Wimplicit-function-declaration", static llvm::cl::opt WarnNoStrictSelectorMatch("Wno-strict-selector-match", - llvm::cl::desc("Do not warn about duplicate methods that have the same size and alignment"), + llvm::cl::desc("Do not warn about duplicate methods that have the same size" + " and alignment"), llvm::cl::init(true)); /// InitializeDiagnostics - Initialize the diagnostic object, based on the @@ -749,6 +751,9 @@ static void InitializeDiagnostics(Diagnostic &Diags) { else Diags.setDiagnosticMapping(diag::warn_implicit_function_decl, diag::MAP_IGNORE); + + + Diags.setDiagnosticMapping(diag::err_pp_file_not_found, diag::MAP_FATAL); } //===----------------------------------------------------------------------===//