<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Some AST matcher tests fail to compile on Visual Studio 2015."
   href="https://llvm.org/bugs/show_bug.cgi?id=26088">26088</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Some AST matcher tests fail to compile on Visual Studio 2015.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>libclang
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jujjyl@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>klimek@google.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Building trunk LLVM+Clang, in file
tools\clang\unittests\ASTMatchers\ASTMatchersTest.cpp, the following three
tests fail to compile:

TEST(HasDeclaration, HasDeclarationOfTypeWithDecl) {
  EXPECT_TRUE(matches("typedef int X; X a;",
                      varDecl(hasName("a"),
                              hasType(typedefType(hasDeclaration(decl()))))));

  // FIXME: Add tests for other types with getDecl() (e.g. RecordType)
}

which results in <a href="http://pastebin.com/iqMexcy1">http://pastebin.com/iqMexcy1</a>, and

TEST(TypeMatching, MatchesRecordType) {
  EXPECT_TRUE(matches("class C{}; C c;", recordType()));
  EXPECT_TRUE(matches("struct S{}; S s;",
                      recordType(hasDeclaration(recordDecl(hasName("S"))))));
  EXPECT_TRUE(notMatches("int i;",
                        
recordType(hasDeclaration(recordDecl(hasName("S"))))));
}

which results in <a href="http://pastebin.com/7S83kTCT">http://pastebin.com/7S83kTCT</a>, and

TEST(ElaboratedTypeNarrowing, namesType) {
  EXPECT_TRUE(matches(
    "namespace N {"
    "  namespace M {"
    "    class D {};"
    "  }"
    "}"
    "N::M::D d;",
    elaboratedType(elaboratedType(namesType(recordType(
        hasDeclaration(namedDecl(hasName("D")))))))));
  EXPECT_TRUE(notMatches(
    "namespace M {"
    "  class D {};"
    "}"
    "M::D d;",
    elaboratedType(elaboratedType(namesType(typedefType())))));
}

which results in <a href="http://pastebin.com/TnSHB6Ep">http://pastebin.com/TnSHB6Ep</a>.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>