[cfe-commits] r63915 - /cfe/trunk/Driver/clang.cpp

Chris Lattner sabre at nondot.org
Thu Feb 5 20:16:41 PST 2009


Author: lattner
Date: Thu Feb  5 22:16:41 2009
New Revision: 63915

URL: http://llvm.org/viewvc/llvm-project?rev=63915&view=rev
Log:
default diag::err_pp_file_not_found to mapping to fatal,
implementing PR3492: #include failures should be a fatal error

Modified:
    cfe/trunk/Driver/clang.cpp

Modified: cfe/trunk/Driver/clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/clang.cpp?rev=63915&r1=63914&r2=63915&view=diff

==============================================================================
--- cfe/trunk/Driver/clang.cpp (original)
+++ cfe/trunk/Driver/clang.cpp Thu Feb  5 22:16:41 2009
@@ -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 @@
 
 static llvm::cl::opt<bool>
 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<bool>
@@ -710,7 +711,8 @@
 
 static llvm::cl::opt<bool>
 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 @@
   else
     Diags.setDiagnosticMapping(diag::warn_implicit_function_decl,
                                diag::MAP_IGNORE);
+  
+  
+  Diags.setDiagnosticMapping(diag::err_pp_file_not_found, diag::MAP_FATAL);
 }
 
 //===----------------------------------------------------------------------===//





More information about the cfe-commits mailing list