hintonda created this revision.

Handle -ast-dump-all when passed as the only option.


https://reviews.llvm.org/D34179

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


Index: test/Coverage/ast-printing.cpp
===================================================================
--- test/Coverage/ast-printing.cpp
+++ 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
 
Index: test/Coverage/ast-printing.c
===================================================================
--- test/Coverage/ast-printing.c
+++ 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"
Index: lib/Frontend/ASTConsumers.cpp
===================================================================
--- lib/Frontend/ASTConsumers.cpp
+++ lib/Frontend/ASTConsumers.cpp
@@ -142,7 +142,7 @@
                                                     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: test/Coverage/ast-printing.cpp
===================================================================
--- test/Coverage/ast-printing.cpp
+++ 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
 
Index: test/Coverage/ast-printing.c
===================================================================
--- test/Coverage/ast-printing.c
+++ 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"
Index: lib/Frontend/ASTConsumers.cpp
===================================================================
--- lib/Frontend/ASTConsumers.cpp
+++ lib/Frontend/ASTConsumers.cpp
@@ -142,7 +142,7 @@
                                                     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 :
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to