[PATCH] D13546: [ATTR] Automatic line feed after pragma-like attribute.

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 8 07:19:27 PDT 2015


aaron.ballman added a comment.

Wow, good catch on the fact that this didn't work at all! Thank you for tackling it.


================
Comment at: lib/AST/DeclPrinter.cpp:197
@@ -196,3 +196,3 @@
 
-void DeclPrinter::prettyPrintAttributes(Decl *D) {
+void DeclPrinter::prettyPrintAttributes(Decl *D, bool PrintPragmas) {
   if (Policy.PolishForDeclaration)
----------------
Would it make more sense to add a prettyPrintPragmas(Decl *D) function instead?

================
Comment at: test/SemaCXX/pragma-init_seg.cpp:1
@@ -1,2 +1,2 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s -triple x86_64-pc-win32
+// RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s -triple x86_64-pc-win32 -ast-print | FileCheck %s
 // RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s -triple i386-apple-darwin13.3.0
----------------
I think this should be a new test under Misc\. We have ast-print-pragmas.cpp that looks like a good place for it to go.


http://reviews.llvm.org/D13546





More information about the cfe-commits mailing list