diff options
Diffstat (limited to 'unittests/AST/SourceLocationTest.cpp')
-rw-r--r-- | unittests/AST/SourceLocationTest.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/unittests/AST/SourceLocationTest.cpp b/unittests/AST/SourceLocationTest.cpp index 82bba64..ca5a889 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 |