[PATCH] D34179: [SEMA] PR32318 Handle -ast-dump-all properly.
    don hinton via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Tue Jun 13 15:23:57 PDT 2017
    
    
  
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 :
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34179.102439.patch
Type: text/x-patch
Size: 1644 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170613/1a343747/attachment.bin>
    
    
More information about the cfe-commits
mailing list