[PATCH] D57452: [ASTDumper][OpenMP] CapturedDecl has a 'nothrow' bit

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 30 07:42:42 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL352631: [ASTDumper][OpenMP] CapturedDecl has a 'nothrow' bit (authored by lebedevri, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D57452?vs=184298&id=184299#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57452/new/

https://reviews.llvm.org/D57452

Files:
  cfe/trunk/lib/AST/ASTDumper.cpp
  cfe/trunk/test/AST/dump.cpp


Index: cfe/trunk/lib/AST/ASTDumper.cpp
===================================================================
--- cfe/trunk/lib/AST/ASTDumper.cpp
+++ cfe/trunk/lib/AST/ASTDumper.cpp
@@ -727,6 +727,8 @@
 }
 
 void ASTDumper::VisitCapturedDecl(const CapturedDecl *D) {
+  if (D->isNothrow())
+    OS << " nothrow";
   dumpStmt(D->getBody());
 }
 
Index: cfe/trunk/test/AST/dump.cpp
===================================================================
--- cfe/trunk/test/AST/dump.cpp
+++ cfe/trunk/test/AST/dump.cpp
@@ -61,7 +61,7 @@
 // CHECK-NEXT: |       | `-ImplicitCastExpr {{.+}} <col:78> 'int' <LValueToRValue>
 // CHECK-NEXT: |       |   `-DeclRefExpr {{.+}} <col:78> 'int' lvalue OMPCapturedExpr {{.+}} '.capture_expr.' 'int'
 // CHECK-NEXT: |       `-CapturedStmt {{.+}} <line:[[@LINE-15]]:5, line:[[@LINE-14]]:9>
-// CHECK-NEXT: |         |-CapturedDecl {{.+}} <<invalid sloc>> <invalid sloc>
+// CHECK-NEXT: |         |-CapturedDecl {{.+}} <<invalid sloc>> <invalid sloc> nothrow
 // CHECK-NEXT: |         | |-ForStmt {{.+}} <line:[[@LINE-17]]:5, line:[[@LINE-16]]:9>
 // CHECK:      |         | | `-UnaryOperator {{.+}} <line:[[@LINE-17]]:7, col:9> 'int' lvalue prefix '++'
 // CHECK-NEXT: |         | |   `-DeclRefExpr {{.+}} <col:9> 'int' lvalue OMPCapturedExpr {{.+}} 'a' 'int &'


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57452.184299.patch
Type: text/x-patch
Size: 1289 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190130/e92c7d47/attachment.bin>


More information about the llvm-commits mailing list