[llvm-branch-commits] [cfe-branch] r159552 - in /cfe/branches/tooling: lib/ASTMatchers/Dynamic/Registry.cpp unittests/ASTMatchers/Dynamic/ParserTest.cpp unittests/ASTMatchers/Dynamic/RegistryTest.cpp
Manuel Klimek
klimek at google.com
Mon Jul 2 12:26:55 PDT 2012
Author: klimek
Date: Mon Jul 2 14:26:55 2012
New Revision: 159552
URL: http://llvm.org/viewvc/llvm-project?rev=159552&view=rev
Log:
Changing the equals matcher in the dynamic matcher part.
Modified:
cfe/branches/tooling/lib/ASTMatchers/Dynamic/Registry.cpp
cfe/branches/tooling/unittests/ASTMatchers/Dynamic/ParserTest.cpp
cfe/branches/tooling/unittests/ASTMatchers/Dynamic/RegistryTest.cpp
Modified: cfe/branches/tooling/lib/ASTMatchers/Dynamic/Registry.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/lib/ASTMatchers/Dynamic/Registry.cpp?rev=159552&r1=159551&r2=159552&view=diff
==============================================================================
--- cfe/branches/tooling/lib/ASTMatchers/Dynamic/Registry.cpp (original)
+++ cfe/branches/tooling/lib/ASTMatchers/Dynamic/Registry.cpp Mon Jul 2 14:26:55 2012
@@ -266,13 +266,13 @@
REGISTER_POLY_MATCHER_AUTO(hasCondition, clang::ConditionalOperator);
// Equals. TODO: Needs more.
- REGISTER_POLY_NAMED_MATCHER_AUTO(Equals, equals<bool>,
+ REGISTER_POLY_NAMED_MATCHER_AUTO(equals, equals<bool>,
clang::CXXBoolLiteralExpr);
- REGISTER_POLY_NAMED_MATCHER_AUTO(Equals, equals<unsigned long long>,
+ REGISTER_POLY_NAMED_MATCHER_AUTO(equals, equals<unsigned long long>,
clang::IntegerLiteral);
- REGISTER_POLY_NAMED_MATCHER_AUTO(Equals, equals<long long>,
+ REGISTER_POLY_NAMED_MATCHER_AUTO(equals, equals<long long>,
clang::IntegerLiteral);
- REGISTER_POLY_NAMED_MATCHER_AUTO(Equals, equals<unsigned>,
+ REGISTER_POLY_NAMED_MATCHER_AUTO(equals, equals<unsigned>,
clang::CharacterLiteral);
// Has/hasDescendant/forEach/forEachDescendant for Decl and Stmt
Modified: cfe/branches/tooling/unittests/ASTMatchers/Dynamic/ParserTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/unittests/ASTMatchers/Dynamic/ParserTest.cpp?rev=159552&r1=159551&r2=159552&view=diff
==============================================================================
--- cfe/branches/tooling/unittests/ASTMatchers/Dynamic/ParserTest.cpp (original)
+++ cfe/branches/tooling/unittests/ASTMatchers/Dynamic/ParserTest.cpp Mon Jul 2 14:26:55 2012
@@ -196,13 +196,13 @@
RealProcessor Processor;
const GenericValue Value = Parser::parseMatcher(
"binaryOperator( hasOperatorName(\"+\"),\n"
- " hasLHS(integerLiteral(Equals(1))))", &Processor);
+ " hasLHS(integerLiteral(equals(1))))", &Processor);
EXPECT_TRUE(matchesGeneric("int x = 1 + 1;", Value));
EXPECT_FALSE(matchesGeneric("int x = 2 + 1;", Value));
const GenericValue Error = Parser::parseMatcher(
"binaryOperator( hasOperatorName(6),\n"
- " hasLHS(integerLiteral(Equals(1))))", &Processor);
+ " hasLHS(integerLiteral(equals(1))))", &Processor);
EXPECT_EQ("Error parsing argument 0 for matcher binaryOperator: "
"Error building matcher hasOperatorName: "
"Incorrect type on function hasOperatorName for arg 0",
Modified: cfe/branches/tooling/unittests/ASTMatchers/Dynamic/RegistryTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/unittests/ASTMatchers/Dynamic/RegistryTest.cpp?rev=159552&r1=159551&r2=159552&view=diff
==============================================================================
--- cfe/branches/tooling/unittests/ASTMatchers/Dynamic/RegistryTest.cpp (original)
+++ cfe/branches/tooling/unittests/ASTMatchers/Dynamic/RegistryTest.cpp Mon Jul 2 14:26:55 2012
@@ -86,7 +86,7 @@
const GenericValue OperatorMinus =
constructMatcher("hasOperatorName", std::string("-"));
const GenericValue One =
- constructMatcher("integerLiteral", constructMatcher("Equals", 1));
+ constructMatcher("integerLiteral", constructMatcher("equals", 1));
const GenericValue HasLHSOne = constructMatcher("hasLHS", One);
const GenericValue OnePlus =
More information about the llvm-branch-commits
mailing list