Fix spelling of anyOf matcher and add missing test.

Patch by Sam Panzer!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160233 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/ASTMatchers/ASTMatchers.h b/include/clang/ASTMatchers/ASTMatchers.h
index 195225d..fceea21 100644
--- a/include/clang/ASTMatchers/ASTMatchers.h
+++ b/include/clang/ASTMatchers/ASTMatchers.h
@@ -702,7 +702,7 @@
         internal::PolymorphicMatcherWithParam2<internal::AnyOfMatcher,
                                                C3, C4> > >
 anyOf(const C1 &P1, const C2 &P2, const C3 &P3, const C4 &P4) {
-  return AnyOf(P1, AnyOf(P2, AnyOf(P3, P4)));
+  return anyOf(P1, anyOf(P2, anyOf(P3, P4)));
 }
 template<typename C1, typename C2, typename C3, typename C4, typename C5>
 internal::PolymorphicMatcherWithParam2<internal::AnyOfMatcher, C1,
diff --git a/unittests/ASTMatchers/ASTMatchersTest.cpp b/unittests/ASTMatchers/ASTMatchersTest.cpp
index 6024f0c..597cf6f 100644
--- a/unittests/ASTMatchers/ASTMatchersTest.cpp
+++ b/unittests/ASTMatchers/ASTMatchersTest.cpp
@@ -291,7 +291,6 @@
 TEST(DeclarationMatcher, MatchAnyOf) {
   DeclarationMatcher YOrZDerivedFromX =
       record(anyOf(hasName("Y"), allOf(isDerivedFrom("X"), hasName("Z"))));
-
   EXPECT_TRUE(
       matches("class X {}; class Z : public X {};", YOrZDerivedFromX));
   EXPECT_TRUE(matches("class Y {};", YOrZDerivedFromX));
@@ -299,10 +298,14 @@
       notMatches("class X {}; class W : public X {};", YOrZDerivedFromX));
   EXPECT_TRUE(notMatches("class Z {};", YOrZDerivedFromX));
 
+  DeclarationMatcher XOrYOrZOrU =
+      record(anyOf(hasName("X"), hasName("Y"), hasName("Z"), hasName("U")));
+  EXPECT_TRUE(matches("class X {};", XOrYOrZOrU));
+  EXPECT_TRUE(notMatches("class V {};", XOrYOrZOrU));
+
   DeclarationMatcher XOrYOrZOrUOrV =
       record(anyOf(hasName("X"), hasName("Y"), hasName("Z"), hasName("U"),
-                  hasName("V")));
-
+                   hasName("V")));
   EXPECT_TRUE(matches("class X {};", XOrYOrZOrUOrV));
   EXPECT_TRUE(matches("class Y {};", XOrYOrZOrUOrV));
   EXPECT_TRUE(matches("class Z {};", XOrYOrZOrUOrV));