summaryrefslogtreecommitdiffstats
path: root/clang/unittests/AST/SourceLocationTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/AST/SourceLocationTest.cpp')
-rw-r--r--clang/unittests/AST/SourceLocationTest.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/unittests/AST/SourceLocationTest.cpp b/clang/unittests/AST/SourceLocationTest.cpp
index d45c6448c79..29156bc96ba 100644
--- a/clang/unittests/AST/SourceLocationTest.cpp
+++ b/clang/unittests/AST/SourceLocationTest.cpp
@@ -211,6 +211,15 @@ TEST(CXXFunctionalCastExpr, SourceRange) {
functionalCastExpr(), Lang_CXX11));
}
+TEST(CXXTemporaryObjectExpr, SourceRange) {
+ RangeVerifier<CXXTemporaryObjectExpr> Verifier;
+ Verifier.expectRange(2, 6, 2, 12);
+ EXPECT_TRUE(Verifier.match(
+ "struct A { A(int, int); };\n"
+ "A a( A{0, 0} );",
+ temporaryObjectExpr(), Lang_CXX11));
+}
+
TEST(CXXUnresolvedConstructExpr, SourceRange) {
RangeVerifier<CXXUnresolvedConstructExpr> Verifier;
Verifier.expectRange(3, 10, 3, 12);
OpenPOWER on IntegriCloud