diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2014-07-31 17:39:50 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-07-31 17:39:50 +0000 |
commit | a1db7df243610bd5433c2147ecad9de76a1f7da4 (patch) | |
tree | 304c2409b7dd48c8d59fc52020c5368b0287fe6f /clang/unittests/AST/SourceLocationTest.cpp | |
parent | be39a87e1126c229ed69985881d8fb8fc53ce4ff (diff) | |
download | llvm-a1db7df243610bd5433c2147ecad9de76a1f7da4.zip llvm-a1db7df243610bd5433c2147ecad9de76a1f7da4.tar.gz llvm-a1db7df243610bd5433c2147ecad9de76a1f7da4.tar.bz2 |
Obective-C. Patch to fix the incorrect ObjcMessageExpr argument source ranges,
when arguments are structures or classes. PR16392.
patch by Karlis Senko
llvm-svn: 214409
Diffstat (limited to 'clang/unittests/AST/SourceLocationTest.cpp')
-rw-r--r-- | clang/unittests/AST/SourceLocationTest.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/unittests/AST/SourceLocationTest.cpp b/clang/unittests/AST/SourceLocationTest.cpp index 82bba64..ca5a889 100644 --- a/clang/unittests/AST/SourceLocationTest.cpp +++ b/clang/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 |