]> granicus.if.org Git - clang/commitdiff
Remove clang-cc -html-diags option, this doesn't fit in well and we get plenty
authorDaniel Dunbar <daniel@zuster.org>
Thu, 5 Nov 2009 02:11:37 +0000 (02:11 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 5 Nov 2009 02:11:37 +0000 (02:11 +0000)
of coverage of this from the analyzer.

If this bothers you, I can add it back in a mode where non-source diagnostics go
to stderr and only source diagnostics use -html-diags, but I don't think anyone
uses this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86109 91177308-0d34-0410-b5e6-96231b3b80d8

test/Coverage/html-diagnostics.c
tools/clang-cc/clang-cc.cpp

index e3db1668d83631447fe09e799aa655bdbffe5867..55376d0e440e0e7626b78acac290669b839d1b3c 100644 (file)
@@ -1,5 +1,9 @@
 // RUN: rm -rf %t &&
-// RUN: clang-cc --html-diags=%t -checker-cfref %s
+// RUN: clang-cc -analyze -analyzer-output=html -checker-cfref -o %t %s &&
+// RUN: cat %t/*.html | FileCheck %s
+
+// CHECK: <h3>Annotated Source Code</h3>
+// CHECK: Dereference of null pointer
 
 void f0(int x) {
   int *p = &x;
index 724f060eddacf275767e7b0ee9a9d74389031801..2244e918f51b0aff008339defa23edb2e3567ad1 100644 (file)
@@ -244,11 +244,6 @@ static llvm::cl::opt<bool>
 VerifyDiagnostics("verify",
                   llvm::cl::desc("Verify emitted diagnostics and warnings"));
 
-static llvm::cl::opt<std::string>
-HTMLDiag("html-diags",
-         llvm::cl::desc("Generate HTML to report diagnostics"),
-         llvm::cl::value_desc("HTML directory"));
-
 static llvm::cl::opt<bool>
 NoShowColumn("fno-show-column",
              llvm::cl::desc("Do not include column number on diagnostics"));
@@ -2163,27 +2158,12 @@ int main(int argc, char **argv) {
       fprintf(stderr, "-verify only works on single input files for now.\n");
       return 1;
     }
-    if (!HTMLDiag.empty()) {
-      fprintf(stderr, "-verify and -html-diags don't work together\n");
-      return 1;
-    }
-  } else if (HTMLDiag.empty()) {
-    // Print diagnostics to stderr by default.
-    DiagClient.reset(new TextDiagnosticPrinter(llvm::errs(), DiagOpts));
   } else {
-    DiagClient.reset(CreateHTMLDiagnosticClient(HTMLDiag));
+    DiagClient.reset(new TextDiagnosticPrinter(llvm::errs(), DiagOpts));
   }
 
-  if (!DumpBuildInformation.empty()) {
-    if (!HTMLDiag.empty()) {
-      fprintf(stderr,
-              "-dump-build-information and -html-diags don't work together\n");
-      return 1;
-    }
-
+  if (!DumpBuildInformation.empty())
     SetUpBuildDumpLog(argc, argv, DiagClient);
-  }
-
 
   // Configure our handling of diagnostics.
   Diagnostic Diags(DiagClient.get());
@@ -2296,9 +2276,6 @@ int main(int argc, char **argv) {
                                               PP->getLangOptions().NoBuiltin);
     }
 
-    if (!HTMLDiag.empty())
-      ((PathDiagnosticClient*)DiagClient.get())->SetPreprocessor(PP.get());
-
     // Process the source file.
     ProcessInputFile(*PP, InFile, ProgAction, Features, Context);