summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/test/Coverage/html-diagnostics.c6
-rw-r--r--clang/tools/clang-cc/clang-cc.cpp27
2 files changed, 7 insertions, 26 deletions
diff --git a/clang/test/Coverage/html-diagnostics.c b/clang/test/Coverage/html-diagnostics.c
index e3db1668d83..55376d0e440 100644
--- a/clang/test/Coverage/html-diagnostics.c
+++ b/clang/test/Coverage/html-diagnostics.c
@@ -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;
diff --git a/clang/tools/clang-cc/clang-cc.cpp b/clang/tools/clang-cc/clang-cc.cpp
index 724f060edda..2244e918f51 100644
--- a/clang/tools/clang-cc/clang-cc.cpp
+++ b/clang/tools/clang-cc/clang-cc.cpp
@@ -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);
OpenPOWER on IntegriCloud