]> granicus.if.org Git - clang/commitdiff
[ASTImporter] Add test for CXXNoexceptExpr
authorRaphael Isemann <teemperor@gmail.com>
Tue, 21 Aug 2018 17:15:57 +0000 (17:15 +0000)
committerRaphael Isemann <teemperor@gmail.com>
Tue, 21 Aug 2018 17:15:57 +0000 (17:15 +0000)
Reviewers: a.sidorin, a_sidorin

Reviewed By: a_sidorin

Subscribers: a_sidorin, hiraditya, martong, cfe-commits

Differential Revision: https://reviews.llvm.org/D50737

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340304 91177308-0d34-0410-b5e6-96231b3b80d8

test/Import/cxx-noexcept-expr/Inputs/F.cpp [new file with mode: 0644]
test/Import/cxx-noexcept-expr/test.cpp [new file with mode: 0644]

diff --git a/test/Import/cxx-noexcept-expr/Inputs/F.cpp b/test/Import/cxx-noexcept-expr/Inputs/F.cpp
new file mode 100644 (file)
index 0000000..2c48ad6
--- /dev/null
@@ -0,0 +1 @@
+bool f() { return noexcept(1); }
diff --git a/test/Import/cxx-noexcept-expr/test.cpp b/test/Import/cxx-noexcept-expr/test.cpp
new file mode 100644 (file)
index 0000000..090a4eb
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: clang-import-test -dump-ast -import %S/Inputs/F.cpp -expression %s | FileCheck %s
+
+// CHECK: CXXNoexceptExpr
+// CHECK-NEXT: IntegerLiteral
+
+void expr() {
+  f();
+}