summaryrefslogtreecommitdiff
path: root/unittests/AST/SourceLocationTest.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-01-18 16:23:48 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-01-18 16:23:48 +0000
commit06d4ba388873e6d1cfa9cd715a8935ecc8cd2097 (patch)
tree3eb853da77d46cc77c4b017525a422f9ddb1385b /unittests/AST/SourceLocationTest.cpp
parent30d791273d07fac9c0c1641a0731191bca6e8606 (diff)
Notes
Diffstat (limited to 'unittests/AST/SourceLocationTest.cpp')
-rw-r--r--unittests/AST/SourceLocationTest.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/unittests/AST/SourceLocationTest.cpp b/unittests/AST/SourceLocationTest.cpp
index 82bba64334b9..ca5a8892a586 100644
--- a/unittests/AST/SourceLocationTest.cpp
+++ b/unittests/AST/SourceLocationTest.cpp
@@ -486,5 +486,17 @@ TEST(FriendDecl, InstantiationSourceRange) {
friendDecl(hasParent(recordDecl(isTemplateInstantiation())))));
}
+TEST(ObjCMessageExpr, CXXConstructExprRange) {
+ RangeVerifier<CXXConstructExpr> Verifier;
+ Verifier.expectRange(5, 25, 5, 27);
+ EXPECT_TRUE(Verifier.match(
+ "struct A { int a; };\n"
+ "@interface B {}\n"
+ "+ (void) f1: (A)arg;\n"
+ "@end\n"
+ "void f2() { A a; [B f1: (a)]; }\n",
+ constructExpr(), Lang_OBJCXX));
+}
+
} // end namespace ast_matchers
} // end namespace clang