r253475 - Reverting r253473 while I investigate build bot failures.
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 18 09:16:01 PST 2015
Author: aaronballman
Date: Wed Nov 18 11:16:01 2015
New Revision: 253475
URL: http://llvm.org/viewvc/llvm-project?rev=253475&view=rev
Log:
Reverting r253473 while I investigate build bot failures.
Modified:
cfe/trunk/docs/LibASTMatchersReference.html
cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h
cfe/trunk/lib/ASTMatchers/Dynamic/Registry.cpp
cfe/trunk/unittests/ASTMatchers/ASTMatchersTest.cpp
Modified: cfe/trunk/docs/LibASTMatchersReference.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/LibASTMatchersReference.html?rev=253475&r1=253474&r2=253475&view=diff
==============================================================================
--- cfe/trunk/docs/LibASTMatchersReference.html (original)
+++ cfe/trunk/docs/LibASTMatchersReference.html Wed Nov 18 11:16:01 2015
@@ -1774,21 +1774,6 @@ cxxMethodDecl(isConst()) matches A::foo(
</pre></td></tr>
-<tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1CXXMethodDecl.html">CXXMethodDecl</a>></td><td class="name" onclick="toggle('isCopyAssignmentOperator0')"><a name="isCopyAssignmentOperator0Anchor">isCopyAssignmentOperator</a></td><td></td></tr>
-<tr><td colspan="4" class="doc" id="isCopyAssignmentOperator0"><pre>Matches if the given method declaration declares a copy assignment
-operator.
-
-Given
-struct A {
- A &operator=(const A &);
- A &operator=(A &&);
-};
-
-cxxMethodDecl(isCopyAssignmentOperator()) matches the first method but not
-the second one.
-</pre></td></tr>
-
-
<tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1CXXMethodDecl.html">CXXMethodDecl</a>></td><td class="name" onclick="toggle('isFinal1')"><a name="isFinal1Anchor">isFinal</a></td><td></td></tr>
<tr><td colspan="4" class="doc" id="isFinal1"><pre>Matches if the given method or class declaration is final.
@@ -2764,20 +2749,6 @@ Example matches a || b (matcher = binary
</pre></td></tr>
-<tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1VarDecl.html">VarDecl</a>></td><td class="name" onclick="toggle('hasAutomaticStorageDuration0')"><a name="hasAutomaticStorageDuration0Anchor">hasAutomaticStorageDuration</a></td><td></td></tr>
-<tr><td colspan="4" class="doc" id="hasAutomaticStorageDuration0"><pre>Matches a variable declaration that has automatic storage duration.
-
-Example matches x, but not y, z, or a.
-(matcher = varDecl(hasAutomaticStorageDuration())
-void f() {
- int x;
- static int y;
- thread_local int z;
-}
-int a;
-</pre></td></tr>
-
-
<tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1VarDecl.html">VarDecl</a>></td><td class="name" onclick="toggle('hasGlobalStorage0')"><a name="hasGlobalStorage0Anchor">hasGlobalStorage</a></td><td></td></tr>
<tr><td colspan="4" class="doc" id="hasGlobalStorage0"><pre>Matches a variable declaration that does not have local storage.
@@ -2803,34 +2774,6 @@ int z;
</pre></td></tr>
-<tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1VarDecl.html">VarDecl</a>></td><td class="name" onclick="toggle('hasStaticStorageDuration0')"><a name="hasStaticStorageDuration0Anchor">hasStaticStorageDuration</a></td><td></td></tr>
-<tr><td colspan="4" class="doc" id="hasStaticStorageDuration0"><pre>Matches a variable declaration that has static storage duration.
-
-Example matches y and a, but not x or z.
-(matcher = varDecl(hasStaticStorageDuration())
-void f() {
- int x;
- static int y;
- thread_local int z;
-}
-int a;
-</pre></td></tr>
-
-
-<tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1VarDecl.html">VarDecl</a>></td><td class="name" onclick="toggle('hasThreadStorageDuration0')"><a name="hasThreadStorageDuration0Anchor">hasThreadStorageDuration</a></td><td></td></tr>
-<tr><td colspan="4" class="doc" id="hasThreadStorageDuration0"><pre>Matches a variable declaration that has thread storage duration.
-
-Example matches z, but not x, z, or a.
-(matcher = varDecl(hasThreadStorageDuration())
-void f() {
- int x;
- static int y;
- thread_local int z;
-}
-int a;
-</pre></td></tr>
-
-
<tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1VarDecl.html">VarDecl</a>></td><td class="name" onclick="toggle('isConstexpr0')"><a name="isConstexpr0Anchor">isConstexpr</a></td><td></td></tr>
<tr><td colspan="4" class="doc" id="isConstexpr0"><pre>Matches constexpr variable and function declarations.
@@ -3097,22 +3040,6 @@ arraySubscriptExpression(hasIndex(intege
</pre></td></tr>
-<tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1ArraySubscriptExpr.html">ArraySubscriptExpr</a>></td><td class="name" onclick="toggle('hasLHS1')"><a name="hasLHS1Anchor">hasLHS</a></td><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1Expr.html">Expr</a>> InnerMatcher</td></tr>
-<tr><td colspan="4" class="doc" id="hasLHS1"><pre>Matches the left hand side of binary operator expressions.
-
-Example matches a (matcher = binaryOperator(hasLHS()))
- a || b
-</pre></td></tr>
-
-
-<tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1ArraySubscriptExpr.html">ArraySubscriptExpr</a>></td><td class="name" onclick="toggle('hasRHS1')"><a name="hasRHS1Anchor">hasRHS</a></td><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1Expr.html">Expr</a>> InnerMatcher</td></tr>
-<tr><td colspan="4" class="doc" id="hasRHS1"><pre>Matches the right hand side of binary operator expressions.
-
-Example matches b (matcher = binaryOperator(hasRHS()))
- a || b
-</pre></td></tr>
-
-
<tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1ArrayTypeLoc.html">ArrayTypeLoc</a>></td><td class="name" onclick="toggle('hasElementTypeLoc0')"><a name="hasElementTypeLoc0Anchor">hasElementTypeLoc</a></td><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1TypeLoc.html">TypeLoc</a>></td></tr>
<tr><td colspan="4" class="doc" id="hasElementTypeLoc0"><pre>Matches arrays and C99 complex types that have a specific element
type.
Modified: cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h?rev=253475&r1=253474&r2=253475&view=diff
==============================================================================
--- cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h (original)
+++ cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h Wed Nov 18 11:16:01 2015
@@ -2544,54 +2544,6 @@ AST_MATCHER(VarDecl, hasGlobalStorage) {
return Node.hasGlobalStorage();
}
-/// \brief Matches a variable declaration that has automatic storage duration.
-///
-/// Example matches x, but not y, z, or a.
-/// (matcher = varDecl(hasAutomaticStorageDuration())
-/// \code
-/// void f() {
-/// int x;
-/// static int y;
-/// thread_local int z;
-/// }
-/// int a;
-/// \endcode
-AST_MATCHER(VarDecl, hasAutomaticStorageDuration) {
- return Node.getStorageDuration() == SD_Automatic;
-}
-
-/// \brief Matches a variable declaration that has static storage duration.
-///
-/// Example matches y and a, but not x or z.
-/// (matcher = varDecl(hasStaticStorageDuration())
-/// \code
-/// void f() {
-/// int x;
-/// static int y;
-/// thread_local int z;
-/// }
-/// int a;
-/// \endcode
-AST_MATCHER(VarDecl, hasStaticStorageDuration) {
- return Node.getStorageDuration() == SD_Static;
-}
-
-/// \brief Matches a variable declaration that has thread storage duration.
-///
-/// Example matches z, but not x, z, or a.
-/// (matcher = varDecl(hasThreadStorageDuration())
-/// \code
-/// void f() {
-/// int x;
-/// static int y;
-/// thread_local int z;
-/// }
-/// int a;
-/// \endcode
-AST_MATCHER(VarDecl, hasThreadStorageDuration) {
- return Node.getStorageDuration() == SD_Thread;
-}
-
/// \brief Matches a variable declaration that is an exception variable from
/// a C++ catch block, or an Objective-C \@catch statement.
///
Modified: cfe/trunk/lib/ASTMatchers/Dynamic/Registry.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ASTMatchers/Dynamic/Registry.cpp?rev=253475&r1=253474&r2=253475&view=diff
==============================================================================
--- cfe/trunk/lib/ASTMatchers/Dynamic/Registry.cpp (original)
+++ cfe/trunk/lib/ASTMatchers/Dynamic/Registry.cpp Wed Nov 18 11:16:01 2015
@@ -194,7 +194,6 @@ RegistryMaps::RegistryMaps() {
REGISTER_MATCHER(hasArgument);
REGISTER_MATCHER(hasArgumentOfType);
REGISTER_MATCHER(hasAttr);
- REGISTER_MATCHER(hasAutomaticStorageDuration);
REGISTER_MATCHER(hasBase);
REGISTER_MATCHER(hasBody);
REGISTER_MATCHER(hasCanonicalType);
@@ -239,11 +238,9 @@ RegistryMaps::RegistryMaps() {
REGISTER_MATCHER(hasSize);
REGISTER_MATCHER(hasSizeExpr);
REGISTER_MATCHER(hasSourceExpression);
- REGISTER_MATCHER(hasThreadStorageDuration);
REGISTER_MATCHER(hasTargetDecl);
REGISTER_MATCHER(hasTemplateArgument);
REGISTER_MATCHER(hasThen);
- REGISTER_MATCHER(hasThreadStorageDuration);
REGISTER_MATCHER(hasTrueExpression);
REGISTER_MATCHER(hasTypeLoc);
REGISTER_MATCHER(hasUnaryOperand);
Modified: cfe/trunk/unittests/ASTMatchers/ASTMatchersTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/ASTMatchers/ASTMatchersTest.cpp?rev=253475&r1=253474&r2=253475&view=diff
==============================================================================
--- cfe/trunk/unittests/ASTMatchers/ASTMatchersTest.cpp (original)
+++ cfe/trunk/unittests/ASTMatchers/ASTMatchersTest.cpp Wed Nov 18 11:16:01 2015
@@ -1355,29 +1355,6 @@ TEST(Matcher, VarDecl_Storage) {
EXPECT_TRUE(matches("void f() { static int X; }", M));
}
-TEST(Matcher, VarDecl_StorageDuration) {
- std::string T =
- "void f() { int x; static int y; thread_local int z; } int a;";
-
- EXPECT_TRUE(matches(T, varDecl(hasName("x"), hasAutomaticStorageDuration())));
- EXPECT_TRUE(
- notMatches(T, varDecl(hasName("y"), hasAutomaticStorageDuration())));
- EXPECT_TRUE(
- notMatches(T, varDecl(hasName("z"), hasAutomaticStorageDuration())));
- EXPECT_TRUE(
- notMatches(T, varDecl(hasName("a"), hasAutomaticStorageDuration())));
-
- EXPECT_TRUE(matches(T, varDecl(hasName("y"), hasStaticStorageDuration())));
- EXPECT_TRUE(matches(T, varDecl(hasName("a"), hasStaticStorageDuration())));
- EXPECT_TRUE(notMatches(T, varDecl(hasName("x"), hasStaticStorageDuration())));
- EXPECT_TRUE(notMatches(T, varDecl(hasName("z"), hasStaticStorageDuration())));
-
- EXPECT_TRUE(matches(T, varDecl(hasName("z"), hasThreadStorageDuration())));
- EXPECT_TRUE(notMatches(T, varDecl(hasName("x"), hasThreadStorageDuration())));
- EXPECT_TRUE(notMatches(T, varDecl(hasName("y"), hasThreadStorageDuration())));
- EXPECT_TRUE(notMatches(T, varDecl(hasName("a"), hasThreadStorageDuration())));
-}
-
TEST(Matcher, FindsVarDeclInFunctionParameter) {
EXPECT_TRUE(matches(
"void f(int i) {}",
More information about the cfe-commits
mailing list