From: Aaron Ballman Date: Thu, 15 Jun 2017 00:00:08 +0000 (+0000) Subject: Handle -ast-dump-all when passed as the only option. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=785449800e4eb3d9e35f0dc6c6f1f20bd5306cfd;p=clang Handle -ast-dump-all when passed as the only option. Patch by Don Hinton git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305432 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/ASTConsumers.cpp b/lib/Frontend/ASTConsumers.cpp index 720baa5e0f..7dc475e26f 100644 --- a/lib/Frontend/ASTConsumers.cpp +++ b/lib/Frontend/ASTConsumers.cpp @@ -142,7 +142,7 @@ std::unique_ptr clang::CreateASTDumper(StringRef FilterString, bool DumpDecls, bool Deserialize, bool DumpLookups) { - assert((DumpDecls || DumpLookups) && "nothing to dump"); + assert((DumpDecls || Deserialize || DumpLookups) && "nothing to dump"); return llvm::make_unique(nullptr, Deserialize ? ASTPrinter::DumpFull : DumpDecls ? ASTPrinter::Dump : diff --git a/test/Coverage/ast-printing.c b/test/Coverage/ast-printing.c index eb22f92e66..dfda6c676f 100644 --- a/test/Coverage/ast-printing.c +++ b/test/Coverage/ast-printing.c @@ -3,6 +3,7 @@ // RUN: %clang_cc1 -ast-print %t.1.c -o %t.2.c // RUN: diff %t.1.c %t.2.c // RUN: %clang_cc1 -ast-dump %s +// RUN: %clang_cc1 -ast-dump-all %s // RUN: %clang_cc1 -print-decl-contexts %s #include "c-language-features.inc" diff --git a/test/Coverage/ast-printing.cpp b/test/Coverage/ast-printing.cpp index e03c517353..bcd78be7d0 100644 --- a/test/Coverage/ast-printing.cpp +++ b/test/Coverage/ast-printing.cpp @@ -3,6 +3,7 @@ // RUN: %clang_cc1 -std=c++14 -ast-print %t.1.cpp -o %t.2.cpp // RUN: diff %t.1.cpp %t.2.cpp // RUN: %clang_cc1 -std=c++14 -ast-dump %s +// RUN: %clang_cc1 -std=c++14 -ast-dump-all %s // RUN: %clang_cc1 -std=c++14 -print-decl-contexts %s // RUN: %clang_cc1 -std=c++14 -fdump-record-layouts %s