mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-15 12:39:19 +00:00
[ASTImporter] Add test for ExprWithCleanups
Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: a_sidorin, martong, cfe-commits Differential Revision: https://reviews.llvm.org/D50731 llvm-svn: 339830
This commit is contained in:
parent
9ff2d7d56a
commit
380e372b13
8
clang/test/Import/expr-with-cleanups/Inputs/S.cpp
Normal file
8
clang/test/Import/expr-with-cleanups/Inputs/S.cpp
Normal file
@ -0,0 +1,8 @@
|
||||
struct RAII {
|
||||
int i = 0;
|
||||
RAII() { i++; }
|
||||
~RAII() { i--; }
|
||||
};
|
||||
void f() {
|
||||
RAII();
|
||||
}
|
8
clang/test/Import/expr-with-cleanups/test.cpp
Normal file
8
clang/test/Import/expr-with-cleanups/test.cpp
Normal file
@ -0,0 +1,8 @@
|
||||
// RUN: clang-import-test -dump-ast -import %S/Inputs/S.cpp -expression %s | FileCheck %s
|
||||
// CHECK: ExprWithCleanups
|
||||
// CHECK-SAME: 'RAII'
|
||||
// CHECK-NEXT: CXXBindTemporaryExpr
|
||||
|
||||
void expr() {
|
||||
f();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user