diff options
author | dim <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
commit | 3176e97f130184ece0e1a21352c8124cc83ff24a (patch) | |
tree | 0a5b74c0b9ca73aded34df95c91fcaf3815230d8 /unittests/ASTMatchers/Dynamic/ParserTest.cpp | |
parent | 1e9b8d38881c3213d1e67b0c47ab9b2c00721a5c (diff) | |
download | FreeBSD-src-3176e97f130184ece0e1a21352c8124cc83ff24a.zip FreeBSD-src-3176e97f130184ece0e1a21352c8124cc83ff24a.tar.gz |
Vendor import of clang trunk r256633:
https://llvm.org/svn/llvm-project/cfe/trunk@256633
Diffstat (limited to 'unittests/ASTMatchers/Dynamic/ParserTest.cpp')
-rw-r--r-- | unittests/ASTMatchers/Dynamic/ParserTest.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/unittests/ASTMatchers/Dynamic/ParserTest.cpp b/unittests/ASTMatchers/Dynamic/ParserTest.cpp index 45b0910..0de6242 100644 --- a/unittests/ASTMatchers/Dynamic/ParserTest.cpp +++ b/unittests/ASTMatchers/Dynamic/ParserTest.cpp @@ -50,7 +50,7 @@ public: } VariantMatcher actOnMatcherExpression(MatcherCtor Ctor, - const SourceRange &NameRange, + SourceRange NameRange, StringRef BindID, ArrayRef<ParserValue> Args, Diagnostics *Error) override { @@ -102,7 +102,7 @@ TEST(ParserTest, ParseString) { EXPECT_EQ("1:1: Error parsing string token: <\"Baz>", Sema.Errors[2]); } -bool matchesRange(const SourceRange &Range, unsigned StartLine, +bool matchesRange(SourceRange Range, unsigned StartLine, unsigned EndLine, unsigned StartColumn, unsigned EndColumn) { EXPECT_EQ(StartLine, Range.Start.Line); EXPECT_EQ(EndLine, Range.End.Line); @@ -301,12 +301,12 @@ TEST(ParserTest, CompletionNamedValues) { EXPECT_EQ("String nameX", Comps[0].MatcherDecl); // Can complete if there are names in the expression. - Code = "methodDecl(hasName(nameX), "; + Code = "cxxMethodDecl(hasName(nameX), "; Comps = Parser::completeExpression(Code, Code.size(), nullptr, &NamedValues); EXPECT_LT(0u, Comps.size()); // Can complete names and registry together. - Code = "methodDecl(hasP"; + Code = "cxxMethodDecl(hasP"; Comps = Parser::completeExpression(Code, Code.size(), nullptr, &NamedValues); ASSERT_EQ(3u, Comps.size()); EXPECT_EQ("aramA", Comps[0].TypedText); @@ -318,8 +318,10 @@ TEST(ParserTest, CompletionNamedValues) { Comps[1].MatcherDecl); EXPECT_EQ("arent(", Comps[2].TypedText); - EXPECT_EQ("Matcher<Decl> hasParent(Matcher<Decl|Stmt>)", - Comps[2].MatcherDecl); + EXPECT_EQ( + "Matcher<Decl> " + "hasParent(Matcher<TemplateArgument|NestedNameSpecifierLoc|Decl|...>)", + Comps[2].MatcherDecl); } } // end anonymous namespace |