]> granicus.if.org Git - clang/commitdiff
Handle -ast-dump-all when passed as the only option.
authorAaron Ballman <aaron@aaronballman.com>
Thu, 15 Jun 2017 00:00:08 +0000 (00:00 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Thu, 15 Jun 2017 00:00:08 +0000 (00:00 +0000)
Patch by Don Hinton

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

lib/Frontend/ASTConsumers.cpp
test/Coverage/ast-printing.c
test/Coverage/ast-printing.cpp

index 720baa5e0f7a416803f41e5ccb7029c80539e053..7dc475e26f76969429a80789f66c34af47cee27a 100644 (file)
@@ -142,7 +142,7 @@ std::unique_ptr<ASTConsumer> 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<ASTPrinter>(nullptr,
                                        Deserialize ? ASTPrinter::DumpFull :
                                        DumpDecls ? ASTPrinter::Dump :
index eb22f92e66d72e247fb84ef7b9367a435d9be036..dfda6c676f6fd065575b1734a2905f6711509b4a 100644 (file)
@@ -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"
index e03c5173533598b76f9e73a3e476d27a2c755718..bcd78be7d05beaedf425ef4f2979e13e857e7712 100644 (file)
@@ -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