forked from OSchip/llvm-project
Remove clang-cc -html-diags option, this doesn't fit in well and we get plenty
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. llvm-svn: 86109
This commit is contained in:
parent
5e86044ec4
commit
aef52f4c83
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue