Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 1 | //===- unittest/ASTMatchers/Dynamic/ParserTest.cpp - Parser unit tests -===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===-------------------------------------------------------------------===// |
| 9 | |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 10 | #include "../ASTMatchersTest.h" |
| 11 | #include "clang/ASTMatchers/Dynamic/Parser.h" |
| 12 | #include "clang/ASTMatchers/Dynamic/Registry.h" |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 13 | #include "llvm/ADT/Optional.h" |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 14 | #include "llvm/ADT/StringMap.h" |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 15 | #include "gtest/gtest.h" |
| 16 | #include <string> |
| 17 | #include <vector> |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 18 | |
| 19 | namespace clang { |
| 20 | namespace ast_matchers { |
| 21 | namespace dynamic { |
| 22 | namespace { |
| 23 | |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 24 | class MockSema : public Parser::Sema { |
| 25 | public: |
| 26 | virtual ~MockSema() {} |
| 27 | |
| 28 | uint64_t expectMatcher(StringRef MatcherName) { |
Samuel Benzaquen | b7488d7 | 2013-10-29 14:37:15 +0000 | [diff] [blame] | 29 | ast_matchers::internal::Matcher<Stmt> M = stmt(); |
| 30 | ExpectedMatchers.insert(std::make_pair(MatcherName, M)); |
| 31 | return M.getID(); |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | void parse(StringRef Code) { |
| 35 | Diagnostics Error; |
| 36 | VariantValue Value; |
| 37 | Parser::parseExpression(Code, this, &Value, &Error); |
| 38 | Values.push_back(Value); |
Samuel Benzaquen | 2f5a231 | 2013-07-19 20:02:35 +0000 | [diff] [blame] | 39 | Errors.push_back(Error.toStringFull()); |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 40 | } |
| 41 | |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame^] | 42 | llvm::Optional<MatcherCtor> lookupMatcherCtor(StringRef MatcherName) { |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 43 | const ExpectedMatchersTy::value_type *Matcher = |
| 44 | &*ExpectedMatchers.find(MatcherName); |
| 45 | return reinterpret_cast<MatcherCtor>(Matcher); |
| 46 | } |
| 47 | |
| 48 | VariantMatcher actOnMatcherExpression(MatcherCtor Ctor, |
Samuel Benzaquen | 9d02807 | 2013-08-13 14:54:51 +0000 | [diff] [blame] | 49 | const SourceRange &NameRange, |
| 50 | StringRef BindID, |
| 51 | ArrayRef<ParserValue> Args, |
| 52 | Diagnostics *Error) { |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 53 | const ExpectedMatchersTy::value_type *Matcher = |
| 54 | reinterpret_cast<const ExpectedMatchersTy::value_type *>(Ctor); |
| 55 | MatcherInfo ToStore = { Matcher->first, NameRange, Args, BindID }; |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 56 | Matchers.push_back(ToStore); |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 57 | return VariantMatcher::SingleMatcher(Matcher->second); |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 58 | } |
| 59 | |
| 60 | struct MatcherInfo { |
| 61 | StringRef MatcherName; |
| 62 | SourceRange NameRange; |
| 63 | std::vector<ParserValue> Args; |
Samuel Benzaquen | 4f37d92 | 2013-06-03 19:31:08 +0000 | [diff] [blame] | 64 | std::string BoundID; |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 65 | }; |
| 66 | |
| 67 | std::vector<std::string> Errors; |
| 68 | std::vector<VariantValue> Values; |
| 69 | std::vector<MatcherInfo> Matchers; |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 70 | typedef std::map<std::string, ast_matchers::internal::Matcher<Stmt> > |
| 71 | ExpectedMatchersTy; |
| 72 | ExpectedMatchersTy ExpectedMatchers; |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 73 | }; |
| 74 | |
Samuel Benzaquen | 7a337af | 2013-06-04 15:46:22 +0000 | [diff] [blame] | 75 | TEST(ParserTest, ParseUnsigned) { |
| 76 | MockSema Sema; |
| 77 | Sema.parse("0"); |
| 78 | Sema.parse("123"); |
| 79 | Sema.parse("0x1f"); |
| 80 | Sema.parse("12345678901"); |
| 81 | Sema.parse("1a1"); |
| 82 | EXPECT_EQ(5U, Sema.Values.size()); |
| 83 | EXPECT_EQ(0U, Sema.Values[0].getUnsigned()); |
| 84 | EXPECT_EQ(123U, Sema.Values[1].getUnsigned()); |
| 85 | EXPECT_EQ(31U, Sema.Values[2].getUnsigned()); |
| 86 | EXPECT_EQ("1:1: Error parsing unsigned token: <12345678901>", Sema.Errors[3]); |
| 87 | EXPECT_EQ("1:1: Error parsing unsigned token: <1a1>", Sema.Errors[4]); |
| 88 | } |
| 89 | |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 90 | TEST(ParserTest, ParseString) { |
| 91 | MockSema Sema; |
| 92 | Sema.parse("\"Foo\""); |
| 93 | Sema.parse("\"\""); |
| 94 | Sema.parse("\"Baz"); |
| 95 | EXPECT_EQ(3ULL, Sema.Values.size()); |
| 96 | EXPECT_EQ("Foo", Sema.Values[0].getString()); |
| 97 | EXPECT_EQ("", Sema.Values[1].getString()); |
| 98 | EXPECT_EQ("1:1: Error parsing string token: <\"Baz>", Sema.Errors[2]); |
| 99 | } |
| 100 | |
| 101 | bool matchesRange(const SourceRange &Range, unsigned StartLine, |
| 102 | unsigned EndLine, unsigned StartColumn, unsigned EndColumn) { |
| 103 | EXPECT_EQ(StartLine, Range.Start.Line); |
| 104 | EXPECT_EQ(EndLine, Range.End.Line); |
| 105 | EXPECT_EQ(StartColumn, Range.Start.Column); |
| 106 | EXPECT_EQ(EndColumn, Range.End.Column); |
| 107 | return Range.Start.Line == StartLine && Range.End.Line == EndLine && |
| 108 | Range.Start.Column == StartColumn && Range.End.Column == EndColumn; |
| 109 | } |
| 110 | |
Samuel Benzaquen | b7488d7 | 2013-10-29 14:37:15 +0000 | [diff] [blame] | 111 | llvm::Optional<DynTypedMatcher> getSingleMatcher(const VariantValue &Value) { |
| 112 | llvm::Optional<DynTypedMatcher> Result = |
| 113 | Value.getMatcher().getSingleMatcher(); |
| 114 | EXPECT_TRUE(Result.hasValue()); |
| 115 | return Result; |
Samuel Benzaquen | 9d02807 | 2013-08-13 14:54:51 +0000 | [diff] [blame] | 116 | } |
| 117 | |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 118 | TEST(ParserTest, ParseMatcher) { |
| 119 | MockSema Sema; |
| 120 | const uint64_t ExpectedFoo = Sema.expectMatcher("Foo"); |
| 121 | const uint64_t ExpectedBar = Sema.expectMatcher("Bar"); |
| 122 | const uint64_t ExpectedBaz = Sema.expectMatcher("Baz"); |
Samuel Benzaquen | 7a337af | 2013-06-04 15:46:22 +0000 | [diff] [blame] | 123 | Sema.parse(" Foo ( Bar ( 17), Baz( \n \"B A,Z\") ) .bind( \"Yo!\") "); |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 124 | for (size_t i = 0, e = Sema.Errors.size(); i != e; ++i) { |
| 125 | EXPECT_EQ("", Sema.Errors[i]); |
| 126 | } |
| 127 | |
| 128 | EXPECT_EQ(1ULL, Sema.Values.size()); |
Samuel Benzaquen | 9d02807 | 2013-08-13 14:54:51 +0000 | [diff] [blame] | 129 | EXPECT_EQ(ExpectedFoo, getSingleMatcher(Sema.Values[0])->getID()); |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 130 | |
| 131 | EXPECT_EQ(3ULL, Sema.Matchers.size()); |
| 132 | const MockSema::MatcherInfo Bar = Sema.Matchers[0]; |
| 133 | EXPECT_EQ("Bar", Bar.MatcherName); |
Samuel Benzaquen | 7a337af | 2013-06-04 15:46:22 +0000 | [diff] [blame] | 134 | EXPECT_TRUE(matchesRange(Bar.NameRange, 1, 1, 8, 17)); |
| 135 | EXPECT_EQ(1ULL, Bar.Args.size()); |
| 136 | EXPECT_EQ(17U, Bar.Args[0].Value.getUnsigned()); |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 137 | |
| 138 | const MockSema::MatcherInfo Baz = Sema.Matchers[1]; |
| 139 | EXPECT_EQ("Baz", Baz.MatcherName); |
Samuel Benzaquen | 7a337af | 2013-06-04 15:46:22 +0000 | [diff] [blame] | 140 | EXPECT_TRUE(matchesRange(Baz.NameRange, 1, 2, 19, 10)); |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 141 | EXPECT_EQ(1ULL, Baz.Args.size()); |
| 142 | EXPECT_EQ("B A,Z", Baz.Args[0].Value.getString()); |
| 143 | |
| 144 | const MockSema::MatcherInfo Foo = Sema.Matchers[2]; |
| 145 | EXPECT_EQ("Foo", Foo.MatcherName); |
| 146 | EXPECT_TRUE(matchesRange(Foo.NameRange, 1, 2, 2, 12)); |
| 147 | EXPECT_EQ(2ULL, Foo.Args.size()); |
Samuel Benzaquen | 9d02807 | 2013-08-13 14:54:51 +0000 | [diff] [blame] | 148 | EXPECT_EQ(ExpectedBar, getSingleMatcher(Foo.Args[0].Value)->getID()); |
| 149 | EXPECT_EQ(ExpectedBaz, getSingleMatcher(Foo.Args[1].Value)->getID()); |
Samuel Benzaquen | 4f37d92 | 2013-06-03 19:31:08 +0000 | [diff] [blame] | 150 | EXPECT_EQ("Yo!", Foo.BoundID); |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 151 | } |
| 152 | |
| 153 | using ast_matchers::internal::Matcher; |
| 154 | |
| 155 | TEST(ParserTest, FullParserTest) { |
Samuel Benzaquen | 3f84bb3 | 2013-07-15 19:25:06 +0000 | [diff] [blame] | 156 | Diagnostics Error; |
Samuel Benzaquen | b7488d7 | 2013-10-29 14:37:15 +0000 | [diff] [blame] | 157 | llvm::Optional<DynTypedMatcher> VarDecl(Parser::parseMatcherExpression( |
Samuel Benzaquen | ef7eb02 | 2013-06-21 15:51:31 +0000 | [diff] [blame] | 158 | "varDecl(hasInitializer(binaryOperator(hasLHS(integerLiteral())," |
| 159 | " hasOperatorName(\"+\"))))", |
Samuel Benzaquen | 3f84bb3 | 2013-07-15 19:25:06 +0000 | [diff] [blame] | 160 | &Error)); |
Samuel Benzaquen | 2f5a231 | 2013-07-19 20:02:35 +0000 | [diff] [blame] | 161 | EXPECT_EQ("", Error.toStringFull()); |
Samuel Benzaquen | b7488d7 | 2013-10-29 14:37:15 +0000 | [diff] [blame] | 162 | Matcher<Decl> M = VarDecl->unconditionalConvertTo<Decl>(); |
Samuel Benzaquen | 76c2f92 | 2013-06-20 14:28:32 +0000 | [diff] [blame] | 163 | EXPECT_TRUE(matches("int x = 1 + false;", M)); |
| 164 | EXPECT_FALSE(matches("int x = true + 1;", M)); |
Samuel Benzaquen | ef7eb02 | 2013-06-21 15:51:31 +0000 | [diff] [blame] | 165 | EXPECT_FALSE(matches("int x = 1 - false;", M)); |
| 166 | EXPECT_FALSE(matches("int x = true - 1;", M)); |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 167 | |
Samuel Benzaquen | b7488d7 | 2013-10-29 14:37:15 +0000 | [diff] [blame] | 168 | llvm::Optional<DynTypedMatcher> HasParameter(Parser::parseMatcherExpression( |
Samuel Benzaquen | 3f84bb3 | 2013-07-15 19:25:06 +0000 | [diff] [blame] | 169 | "functionDecl(hasParameter(1, hasName(\"x\")))", &Error)); |
Samuel Benzaquen | 2f5a231 | 2013-07-19 20:02:35 +0000 | [diff] [blame] | 170 | EXPECT_EQ("", Error.toStringFull()); |
Samuel Benzaquen | b7488d7 | 2013-10-29 14:37:15 +0000 | [diff] [blame] | 171 | M = HasParameter->unconditionalConvertTo<Decl>(); |
Samuel Benzaquen | 76c2f92 | 2013-06-20 14:28:32 +0000 | [diff] [blame] | 172 | |
| 173 | EXPECT_TRUE(matches("void f(int a, int x);", M)); |
| 174 | EXPECT_FALSE(matches("void f(int x, int a);", M)); |
Samuel Benzaquen | 7a337af | 2013-06-04 15:46:22 +0000 | [diff] [blame] | 175 | |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame^] | 176 | // Test named values. |
| 177 | struct NamedSema : public Parser::RegistrySema { |
| 178 | public: |
| 179 | virtual VariantValue getNamedValue(StringRef Name) { |
| 180 | if (Name == "nameX") |
| 181 | return std::string("x"); |
| 182 | if (Name == "param0") |
| 183 | return VariantMatcher::SingleMatcher(hasParameter(0, hasName("a"))); |
| 184 | return VariantValue(); |
| 185 | } |
| 186 | }; |
| 187 | NamedSema Sema; |
| 188 | llvm::Optional<DynTypedMatcher> HasParameterWithNamedValues( |
| 189 | Parser::parseMatcherExpression( |
| 190 | "functionDecl(param0, hasParameter(1, hasName(nameX)))", &Sema, |
| 191 | &Error)); |
| 192 | EXPECT_EQ("", Error.toStringFull()); |
| 193 | M = HasParameterWithNamedValues->unconditionalConvertTo<Decl>(); |
| 194 | |
| 195 | EXPECT_TRUE(matches("void f(int a, int x);", M)); |
| 196 | EXPECT_FALSE(matches("void f(int x, int a);", M)); |
| 197 | |
| 198 | |
Samuel Benzaquen | b7488d7 | 2013-10-29 14:37:15 +0000 | [diff] [blame] | 199 | EXPECT_TRUE(!Parser::parseMatcherExpression( |
| 200 | "hasInitializer(\n binaryOperator(hasLHS(\"A\")))", |
| 201 | &Error).hasValue()); |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 202 | EXPECT_EQ("1:1: Error parsing argument 1 for matcher hasInitializer.\n" |
| 203 | "2:5: Error parsing argument 1 for matcher binaryOperator.\n" |
| 204 | "2:20: Error building matcher hasLHS.\n" |
Samuel Benzaquen | 76c2f92 | 2013-06-20 14:28:32 +0000 | [diff] [blame] | 205 | "2:27: Incorrect type for arg 1. " |
| 206 | "(Expected = Matcher<Expr>) != (Actual = String)", |
Samuel Benzaquen | 2f5a231 | 2013-07-19 20:02:35 +0000 | [diff] [blame] | 207 | Error.toStringFull()); |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 208 | } |
| 209 | |
| 210 | std::string ParseWithError(StringRef Code) { |
| 211 | Diagnostics Error; |
| 212 | VariantValue Value; |
| 213 | Parser::parseExpression(Code, &Value, &Error); |
Samuel Benzaquen | 2f5a231 | 2013-07-19 20:02:35 +0000 | [diff] [blame] | 214 | return Error.toStringFull(); |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 215 | } |
| 216 | |
| 217 | std::string ParseMatcherWithError(StringRef Code) { |
| 218 | Diagnostics Error; |
| 219 | Parser::parseMatcherExpression(Code, &Error); |
Samuel Benzaquen | 2f5a231 | 2013-07-19 20:02:35 +0000 | [diff] [blame] | 220 | return Error.toStringFull(); |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 221 | } |
| 222 | |
| 223 | TEST(ParserTest, Errors) { |
| 224 | EXPECT_EQ( |
| 225 | "1:5: Error parsing matcher. Found token <123> while looking for '('.", |
| 226 | ParseWithError("Foo 123")); |
| 227 | EXPECT_EQ( |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 228 | "1:1: Matcher not found: Foo\n" |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 229 | "1:9: Error parsing matcher. Found token <123> while looking for ','.", |
| 230 | ParseWithError("Foo(\"A\" 123)")); |
| 231 | EXPECT_EQ( |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame^] | 232 | "1:1: Error parsing argument 1 for matcher stmt.\n" |
| 233 | "1:6: Value not found: someValue", |
| 234 | ParseWithError("stmt(someValue)")); |
| 235 | EXPECT_EQ( |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 236 | "1:1: Matcher not found: Foo\n" |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 237 | "1:4: Error parsing matcher. Found end-of-code while looking for ')'.", |
| 238 | ParseWithError("Foo(")); |
| 239 | EXPECT_EQ("1:1: End of code found while looking for token.", |
| 240 | ParseWithError("")); |
| 241 | EXPECT_EQ("Input value is not a matcher expression.", |
| 242 | ParseMatcherWithError("\"A\"")); |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 243 | EXPECT_EQ("1:1: Matcher not found: Foo\n" |
| 244 | "1:1: Error parsing argument 1 for matcher Foo.\n" |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 245 | "1:5: Invalid token <(> found when looking for a value.", |
| 246 | ParseWithError("Foo((")); |
Samuel Benzaquen | 4f37d92 | 2013-06-03 19:31:08 +0000 | [diff] [blame] | 247 | EXPECT_EQ("1:7: Expected end of code.", ParseWithError("expr()a")); |
| 248 | EXPECT_EQ("1:11: Malformed bind() expression.", |
| 249 | ParseWithError("isArrow().biind")); |
| 250 | EXPECT_EQ("1:15: Malformed bind() expression.", |
| 251 | ParseWithError("isArrow().bind")); |
| 252 | EXPECT_EQ("1:16: Malformed bind() expression.", |
| 253 | ParseWithError("isArrow().bind(foo")); |
| 254 | EXPECT_EQ("1:21: Malformed bind() expression.", |
| 255 | ParseWithError("isArrow().bind(\"foo\"")); |
| 256 | EXPECT_EQ("1:1: Error building matcher isArrow.\n" |
| 257 | "1:1: Matcher does not support binding.", |
| 258 | ParseWithError("isArrow().bind(\"foo\")")); |
Samuel Benzaquen | ef7eb02 | 2013-06-21 15:51:31 +0000 | [diff] [blame] | 259 | EXPECT_EQ("Input value has unresolved overloaded type: " |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame^] | 260 | "Matcher<DoStmt|ForStmt|WhileStmt|CXXForRangeStmt>", |
Samuel Benzaquen | ef7eb02 | 2013-06-21 15:51:31 +0000 | [diff] [blame] | 261 | ParseMatcherWithError("hasBody(stmt())")); |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 262 | } |
| 263 | |
Samuel Benzaquen | 0e1896a | 2013-07-22 16:13:57 +0000 | [diff] [blame] | 264 | TEST(ParserTest, OverloadErrors) { |
| 265 | EXPECT_EQ("1:1: Error building matcher callee.\n" |
| 266 | "1:8: Candidate 1: Incorrect type for arg 1. " |
| 267 | "(Expected = Matcher<Stmt>) != (Actual = String)\n" |
| 268 | "1:8: Candidate 2: Incorrect type for arg 1. " |
| 269 | "(Expected = Matcher<Decl>) != (Actual = String)", |
| 270 | ParseWithError("callee(\"A\")")); |
| 271 | } |
| 272 | |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 273 | TEST(ParserTest, Completion) { |
| 274 | std::vector<MatcherCompletion> Comps = |
| 275 | Parser::completeExpression("while", 5); |
| 276 | ASSERT_EQ(1u, Comps.size()); |
| 277 | EXPECT_EQ("Stmt(", Comps[0].TypedText); |
| 278 | EXPECT_EQ("Matcher<Stmt> whileStmt(Matcher<WhileStmt>...)", |
| 279 | Comps[0].MatcherDecl); |
| 280 | |
| 281 | Comps = Parser::completeExpression("whileStmt().", 12); |
| 282 | ASSERT_EQ(1u, Comps.size()); |
| 283 | EXPECT_EQ("bind(\"", Comps[0].TypedText); |
| 284 | EXPECT_EQ("bind", Comps[0].MatcherDecl); |
| 285 | } |
| 286 | |
Manuel Klimek | f7f295f | 2013-05-14 09:13:00 +0000 | [diff] [blame] | 287 | } // end anonymous namespace |
| 288 | } // end namespace dynamic |
| 289 | } // end namespace ast_matchers |
| 290 | } // end namespace clang |