Sorry - feel free to roll back for now.<br><br><div class="gmail_quote">On Mon Nov 24 2014 at 6:26:26 PM Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This also appears to have broken the build.<br>
<br>
<a href="http://bb.pgr.jp/builders/ninja-clang-i686-msc17-R/builds/11716/steps/build_clang/logs/stdio" target="_blank">http://bb.pgr.jp/builders/<u></u>ninja-clang-i686-msc17-R/<u></u>builds/11716/steps/build_<u></u>clang/logs/stdio</a><br>
<br>
I've made a fix in r222664 to get the build unbroken, however, the<br>
tests still fail for me on Windows.<br>
<br>
~Aaron<br>
<br>
On Mon, Nov 24, 2014 at 10:51 AM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>> wrote:<br>
> On Mon, Nov 24, 2014 at 4:10 AM, Manuel Klimek <<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>> wrote:<br>
>> Author: klimek<br>
>> Date: Mon Nov 24 03:10:56 2014<br>
>> New Revision: 222646<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=222646&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project?rev=222646&view=rev</a><br>
>> Log:<br>
>> Adding 4 ASTMatchers: typedefDecl, isInMainFile, isInSystemFile, isInFileMatchingName<br>
>><br>
>> Summary:<br>
>> Often one is only interested in matches within the main-file or matches<br>
>> that are not within a system-header, for which this patch adds<br>
>> isInMainFile and isInSystemFile. They take no arguments and narrow down<br>
>> the matches.<br>
>><br>
>> The isInFileMatchingName is mainly thought for interactive<br>
>> clang-query-sessions, to make a matcher more specific without restarting<br>
>> the session with the files you are interested in for that moment. It<br>
>> takes a string that will be used as regular-expression to match the<br>
>> filename of where the matched node is expanded.<br>
>><br>
>> Patch by Hendrik von Prince.<br>
>><br>
>> Modified:<br>
>> cfe/trunk/docs/<u></u>LibASTMatchersReference.html<br>
>> cfe/trunk/include/clang/<u></u>ASTMatchers/ASTMatchers.h<br>
>> cfe/trunk/include/clang/<u></u>Tooling/Tooling.h<br>
>> cfe/trunk/lib/ASTMatchers/<u></u>Dynamic/Registry.cpp<br>
>> cfe/trunk/lib/Tooling/Tooling.<u></u>cpp<br>
>> cfe/trunk/unittests/<u></u>ASTMatchers/ASTMatchersTest.<u></u>cpp<br>
>> cfe/trunk/unittests/<u></u>ASTMatchers/ASTMatchersTest.h<br>
>><br>
>> Modified: cfe/trunk/docs/<u></u>LibASTMatchersReference.html<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/LibASTMatchersReference.html?rev=222646&r1=222645&r2=222646&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/docs/<u></u>LibASTMatchersReference.html?<u></u>rev=222646&r1=222645&r2=<u></u>222646&view=diff</a><br>
>> ==============================<u></u>==============================<u></u>==================<br>
>> --- cfe/trunk/docs/<u></u>LibASTMatchersReference.html (original)<br>
>> +++ cfe/trunk/docs/<u></u>LibASTMatchersReference.html Mon Nov 24 03:10:56 2014<br>
>> @@ -307,6 +307,16 @@ Example matches X, Z<br>
>> </pre></td></tr><br>
>><br>
>><br>
>> +<tr><td>Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Decl.<u></u>html</a>">Decl</a>></td><td class="name" onclick="toggle('typedefDecl0'<u></u>)"><a name="typedefDecl0Anchor"><u></u>typedefDecl</a></td><td><u></u>Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1TypedefDecl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_<u></u>1TypedefDecl.html</a>"><u></u>TypedefDecl</a>>...</td></<u></u>tr><br>
>> +<tr><td colspan="4" class="doc" id="typedefDecl0"><pre>Matches typedef declarations.<br>
>> +<br>
>> +Given<br>
>> + typedef int X;<br>
>> +typedefDecl()<br>
>> + matches "typedef int X"<br>
>> +</pre></td></tr><br>
>> +<br>
>> +<br>
>> <tr><td>Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Decl.<u></u>html</a>">Decl</a>></td><td class="name" onclick="toggle('<u></u>unresolvedUsingValueDecl0')"><<u></u>a name="<u></u>unresolvedUsingValueDecl0Ancho<u></u>r">unresolvedUsingValueDecl</<u></u>a></td><td>Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1UnresolvedUsingValueDecl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_<u></u>1UnresolvedUsingValueDecl.html</a><u></u>">UnresolvedUsingValueDecl</a><u></u>>...</td></tr><br>
>> <tr><td colspan="4" class="doc" id="unresolvedUsingValueDecl0"<u></u>><pre>Matches unresolved using value declarations.<br>
>><br>
>> @@ -339,6 +349,15 @@ usingDirectiveDecl()<br>
>> matches using namespace X </pre></td></tr><br>
>><br>
>><br>
>> +<tr><td>Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Decl.<u></u>html</a>">Decl</a>></td><td class="name" onclick="toggle('valueDecl0')"<u></u>><a name="valueDecl0Anchor"><u></u>valueDecl</a></td><td>Matcher&<u></u>lt<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1ValueDecl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_<u></u>1ValueDecl.html</a>">ValueDecl</a><u></u>>...</td></tr><br>
>> +<tr><td colspan="4" class="doc" id="valueDecl0"><pre>Matches any value declaration.<br>
>> +<br>
>> +Example matches A, B, C and F<br>
>> + enum X { A, B, C };<br>
>> + void F();<br>
>> +</pre></td></tr><br>
>> +<br>
>> +<br>
>> <tr><td>Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Decl.<u></u>html</a>">Decl</a>></td><td class="name" onclick="toggle('varDecl0')"><<u></u>a name="varDecl0Anchor">varDecl<<u></u>/a></td><td>Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1VarDecl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1VarDecl.<u></u>html</a>">VarDecl</a>>...</td><<u></u>/tr><br>
>> <tr><td colspan="4" class="doc" id="varDecl0"><pre>Matches variable declarations.<br>
>><br>
>> @@ -1654,6 +1673,48 @@ f.<br>
>> </pre></td></tr><br>
>><br>
>><br>
>> +<tr><td>Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Decl.<u></u>html</a>">Decl</a>></td><td class="name" onclick="toggle('<u></u>isExpansionInFileMatching0')"><u></u><a name="<u></u>isExpansionInFileMatching0Anch<u></u>or">isExpansionInFileMatching<<u></u>/a></td><td>std::string RegExp</td></tr><br>
>> +<tr><td colspan="4" class="doc" id="<u></u>isExpansionInFileMatching0"><<u></u>pre>Matches AST nodes that were expanded within files whose name is<br>
>> +partially matching a given regex.<br>
>> +<br>
>> +Example matches Y but not X<br>
>> + (matcher = recordDecl(<u></u>isExpansionInFileMatching("<u></u>AST.*"))<br>
>> + #include "ASTMatcher.h"<br>
>> + class X {};<br>
>> +ASTMatcher.h:<br>
>> + class Y {};<br>
>> +<br>
>> +Usable as: Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Decl.<u></u>html</a>">Decl</a>>, Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Stmt.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Stmt.<u></u>html</a>">Stmt</a>>, Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1TypeLoc.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1TypeLoc.<u></u>html</a>">TypeLoc</a>><br>
>> +</pre></td></tr><br>
>> +<br>
>> +<br>
>> +<tr><td>Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Decl.<u></u>html</a>">Decl</a>></td><td class="name" onclick="toggle('<u></u>isExpansionInMainFile0')"><a name="<u></u>isExpansionInMainFile0Anchor"><u></u>isExpansionInMainFile</a></td><u></u><td></td></tr><br>
>> +<tr><td colspan="4" class="doc" id="isExpansionInMainFile0"><<u></u>pre>Matches AST nodes that were expanded within the main-file.<br>
>> +<br>
>> +Example matches X but not Y (matcher = recordDecl(<u></u>isExpansionInMainFile())<br>
>> + #include <Y.h><br>
>> + class X {};<br>
>> +Y.h:<br>
>> + class Y {};<br>
>> +<br>
>> +Usable as: Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Decl.<u></u>html</a>">Decl</a>>, Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Stmt.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Stmt.<u></u>html</a>">Stmt</a>>, Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1TypeLoc.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1TypeLoc.<u></u>html</a>">TypeLoc</a>><br>
>> +</pre></td></tr><br>
>> +<br>
>> +<br>
>> +<tr><td>Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Decl.<u></u>html</a>">Decl</a>></td><td class="name" onclick="toggle('<u></u>isExpansionInSystemHeader0')"><u></u><a name="<u></u>isExpansionInSystemHeader0Anch<u></u>or">isExpansionInSystemHeader<<u></u>/a></td><td></td></tr><br>
>> +<tr><td colspan="4" class="doc" id="<u></u>isExpansionInSystemHeader0"><<u></u>pre>Matches AST nodes that were expanded within system-header-files.<br>
>> +<br>
>> +Example matches Y but not X<br>
>> + (matcher = recordDecl(<u></u>isExpansionInSystemHeader())<br>
>> + #include <SystemHeader.h><br>
>> + class X {};<br>
>> +SystemHeader.h:<br>
>> + class Y {};<br>
>> +<br>
>> +Usable as: Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Decl.<u></u>html</a>">Decl</a>>, Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Stmt.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Stmt.<u></u>html</a>">Stmt</a>>, Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1TypeLoc.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1TypeLoc.<u></u>html</a>">TypeLoc</a>><br>
>> +</pre></td></tr><br>
>> +<br>
>> +<br>
>> <tr><td>Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Decl.<u></u>html</a>">Decl</a>></td><td class="name" onclick="toggle('isImplicit0')<u></u>"><a name="isImplicit0Anchor"><u></u>isImplicit</a></td><td></td></<u></u>tr><br>
>> <tr><td colspan="4" class="doc" id="isImplicit0"><pre>Matches a declaration that has been implicitly added<br>
>> by the compiler (eg. implicit defaultcopy constructors).<br>
>> @@ -1858,7 +1919,7 @@ memberExpr(isArrow())<br>
>> </pre></td></tr><br>
>><br>
>><br>
>> -<tr><td>Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1NamedDecl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_<u></u>1NamedDecl.html</a>">NamedDecl</a><u></u>></td><td class="name" onclick="toggle('hasName0')"><<u></u>a name="hasName0Anchor">hasName<<u></u>/a></td><td>std::string Name</td></tr><br>
>> +<tr><td>Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1NamedDecl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_<u></u>1NamedDecl.html</a>">NamedDecl</a><u></u>></td><td class="name" onclick="toggle('hasName0')"><<u></u>a name="hasName0Anchor">hasName<<u></u>/a></td><td>std::string Name</td></tr><br>
>> <tr><td colspan="4" class="doc" id="hasName0"><pre>Matches NamedDecl nodes that have the specified name.<br>
>><br>
>> Supports specifying enclosing namespaces or classes by prefixing the name<br>
>> @@ -1990,6 +2051,48 @@ and reference to that variable declarati<br>
>> </pre></td></tr><br>
>><br>
>><br>
>> +<tr><td>Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Stmt.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Stmt.<u></u>html</a>">Stmt</a>></td><td class="name" onclick="toggle('<u></u>isExpansionInFileMatching1')"><u></u><a name="<u></u>isExpansionInFileMatching1Anch<u></u>or">isExpansionInFileMatching<<u></u>/a></td><td>std::string RegExp</td></tr><br>
>> +<tr><td colspan="4" class="doc" id="<u></u>isExpansionInFileMatching1"><<u></u>pre>Matches AST nodes that were expanded within files whose name is<br>
>> +partially matching a given regex.<br>
>> +<br>
>> +Example matches Y but not X<br>
>> + (matcher = recordDecl(<u></u>isExpansionInFileMatching("<u></u>AST.*"))<br>
>> + #include "ASTMatcher.h"<br>
>> + class X {};<br>
>> +ASTMatcher.h:<br>
>> + class Y {};<br>
>> +<br>
>> +Usable as: Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Decl.<u></u>html</a>">Decl</a>>, Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Stmt.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Stmt.<u></u>html</a>">Stmt</a>>, Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1TypeLoc.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1TypeLoc.<u></u>html</a>">TypeLoc</a>><br>
>> +</pre></td></tr><br>
>> +<br>
>> +<br>
>> +<tr><td>Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Stmt.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Stmt.<u></u>html</a>">Stmt</a>></td><td class="name" onclick="toggle('<u></u>isExpansionInMainFile1')"><a name="<u></u>isExpansionInMainFile1Anchor"><u></u>isExpansionInMainFile</a></td><u></u><td></td></tr><br>
>> +<tr><td colspan="4" class="doc" id="isExpansionInMainFile1"><<u></u>pre>Matches AST nodes that were expanded within the main-file.<br>
>> +<br>
>> +Example matches X but not Y (matcher = recordDecl(<u></u>isExpansionInMainFile())<br>
>> + #include <Y.h><br>
>> + class X {};<br>
>> +Y.h:<br>
>> + class Y {};<br>
>> +<br>
>> +Usable as: Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Decl.<u></u>html</a>">Decl</a>>, Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Stmt.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Stmt.<u></u>html</a>">Stmt</a>>, Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1TypeLoc.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1TypeLoc.<u></u>html</a>">TypeLoc</a>><br>
>> +</pre></td></tr><br>
>> +<br>
>> +<br>
>> +<tr><td>Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Stmt.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Stmt.<u></u>html</a>">Stmt</a>></td><td class="name" onclick="toggle('<u></u>isExpansionInSystemHeader1')"><u></u><a name="<u></u>isExpansionInSystemHeader1Anch<u></u>or">isExpansionInSystemHeader<<u></u>/a></td><td></td></tr><br>
>> +<tr><td colspan="4" class="doc" id="<u></u>isExpansionInSystemHeader1"><<u></u>pre>Matches AST nodes that were expanded within system-header-files.<br>
>> +<br>
>> +Example matches Y but not X<br>
>> + (matcher = recordDecl(<u></u>isExpansionInSystemHeader())<br>
>> + #include <SystemHeader.h><br>
>> + class X {};<br>
>> +SystemHeader.h:<br>
>> + class Y {};<br>
>> +<br>
>> +Usable as: Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Decl.<u></u>html</a>">Decl</a>>, Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Stmt.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Stmt.<u></u>html</a>">Stmt</a>>, Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1TypeLoc.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1TypeLoc.<u></u>html</a>">TypeLoc</a>><br>
>> +</pre></td></tr><br>
>> +<br>
>> +<br>
>> <tr><td>Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Stmt.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Stmt.<u></u>html</a>">Stmt</a>></td><td class="name" onclick="toggle('<u></u>isInTemplateInstantiation0')"><u></u><a name="<u></u>isInTemplateInstantiation0Anch<u></u>or">isInTemplateInstantiation<<u></u>/a></td><td></td></tr><br>
>> <tr><td colspan="4" class="doc" id="<u></u>isInTemplateInstantiation0"><<u></u>pre>Matches statements inside of a template instantiation.<br>
>><br>
>> @@ -2061,6 +2164,48 @@ classTemplateSpecializationDec<u></u>l(template<br>
>> </pre></td></tr><br>
>><br>
>><br>
>> +<tr><td>Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1TypeLoc.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1TypeLoc.<u></u>html</a>">TypeLoc</a>></td><td class="name" onclick="toggle('<u></u>isExpansionInFileMatching2')"><u></u><a name="<u></u>isExpansionInFileMatching2Anch<u></u>or">isExpansionInFileMatching<<u></u>/a></td><td>std::string RegExp</td></tr><br>
>> +<tr><td colspan="4" class="doc" id="<u></u>isExpansionInFileMatching2"><<u></u>pre>Matches AST nodes that were expanded within files whose name is<br>
>> +partially matching a given regex.<br>
>> +<br>
>> +Example matches Y but not X<br>
>> + (matcher = recordDecl(<u></u>isExpansionInFileMatching("<u></u>AST.*"))<br>
>> + #include "ASTMatcher.h"<br>
>> + class X {};<br>
>> +ASTMatcher.h:<br>
>> + class Y {};<br>
>> +<br>
>> +Usable as: Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Decl.<u></u>html</a>">Decl</a>>, Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Stmt.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Stmt.<u></u>html</a>">Stmt</a>>, Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1TypeLoc.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1TypeLoc.<u></u>html</a>">TypeLoc</a>><br>
>> +</pre></td></tr><br>
>> +<br>
>> +<br>
>> +<tr><td>Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1TypeLoc.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1TypeLoc.<u></u>html</a>">TypeLoc</a>></td><td class="name" onclick="toggle('<u></u>isExpansionInMainFile2')"><a name="<u></u>isExpansionInMainFile2Anchor"><u></u>isExpansionInMainFile</a></td><u></u><td></td></tr><br>
>> +<tr><td colspan="4" class="doc" id="isExpansionInMainFile2"><<u></u>pre>Matches AST nodes that were expanded within the main-file.<br>
>> +<br>
>> +Example matches X but not Y (matcher = recordDecl(<u></u>isExpansionInMainFile())<br>
>> + #include <Y.h><br>
>> + class X {};<br>
>> +Y.h:<br>
>> + class Y {};<br>
>> +<br>
>> +Usable as: Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Decl.<u></u>html</a>">Decl</a>>, Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Stmt.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Stmt.<u></u>html</a>">Stmt</a>>, Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1TypeLoc.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1TypeLoc.<u></u>html</a>">TypeLoc</a>><br>
>> +</pre></td></tr><br>
>> +<br>
>> +<br>
>> +<tr><td>Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1TypeLoc.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1TypeLoc.<u></u>html</a>">TypeLoc</a>></td><td class="name" onclick="toggle('<u></u>isExpansionInSystemHeader2')"><u></u><a name="<u></u>isExpansionInSystemHeader2Anch<u></u>or">isExpansionInSystemHeader<<u></u>/a></td><td></td></tr><br>
>> +<tr><td colspan="4" class="doc" id="<u></u>isExpansionInSystemHeader2"><<u></u>pre>Matches AST nodes that were expanded within system-header-files.<br>
>> +<br>
>> +Example matches Y but not X<br>
>> + (matcher = recordDecl(<u></u>isExpansionInSystemHeader())<br>
>> + #include <SystemHeader.h><br>
>> + class X {};<br>
>> +SystemHeader.h:<br>
>> + class Y {};<br>
>> +<br>
>> +Usable as: Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Decl.<u></u>html</a>">Decl</a>>, Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Stmt.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Stmt.<u></u>html</a>">Stmt</a>>, Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1TypeLoc.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1TypeLoc.<u></u>html</a>">TypeLoc</a>><br>
>> +</pre></td></tr><br>
>> +<br>
>> +<br>
>> <tr><td>Matcher<<a href="<a href="http://clang.llvm.org/doxygen/classclang_1_1Type.html" target="_blank">http://clang.llvm.org/<u></u>doxygen/classclang_1_1Type.<u></u>html</a>">Type</a>></td><td class="name" onclick="toggle('<u></u>equalsBoundNode2')"><a name="equalsBoundNode2Anchor"><u></u>equalsBoundNode</a></td><td><u></u>std::string ID</td></tr><br>
>> <tr><td colspan="4" class="doc" id="equalsBoundNode2"><pre><u></u>Matches if a node equals a previously bound node.<br>
>><br>
>><br>
>> Modified: cfe/trunk/include/clang/<u></u>ASTMatchers/ASTMatchers.h<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h?rev=222646&r1=222645&r2=222646&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/include/<u></u>clang/ASTMatchers/ASTMatchers.<u></u>h?rev=222646&r1=222645&r2=<u></u>222646&view=diff</a><br>
>> ==============================<u></u>==============================<u></u>==================<br>
>> --- cfe/trunk/include/clang/<u></u>ASTMatchers/ASTMatchers.h (original)<br>
>> +++ cfe/trunk/include/clang/<u></u>ASTMatchers/ASTMatchers.h Mon Nov 24 03:10:56 2014<br>
>> @@ -47,6 +47,7 @@<br>
>><br>
>> #include "clang/AST/DeclFriend.h"<br>
>> #include "clang/AST/DeclTemplate.h"<br>
>> +#include "clang/AST/ASTContext.h"<br>
>> #include "clang/ASTMatchers/<u></u>ASTMatchersInternal.h"<br>
>> #include "clang/ASTMatchers/<u></u>ASTMatchersMacros.h"<br>
>> #include "llvm/ADT/Twine.h"<br>
>> @@ -142,6 +143,97 @@ typedef internal::Matcher<<u></u>NestedNameSpec<br>
>> /// Usable as: Any Matcher<br>
>> inline internal::TrueMatcher anything() { return internal::TrueMatcher(); }<br>
>><br>
>> +/// \brief Matches typedef declarations.<br>
>> +///<br>
>> +/// Given<br>
>> +/// \code<br>
>> +/// typedef int X;<br>
>> +/// \endcode<br>
>> +/// typedefDecl()<br>
>> +/// matches "typedef int X"<br>
>> +const internal::<u></u>VariadicDynCastAllOfMatcher<<u></u>Decl, TypedefDecl> typedefDecl;<br>
>> +<br>
>> +/// \brief Matches AST nodes that were expanded within the main-file.<br>
>> +///<br>
>> +/// Example matches X but not Y (matcher = recordDecl(<u></u>isExpansionInMainFile())<br>
>> +/// \code<br>
>> +/// #include <Y.h><br>
>> +/// class X {};<br>
>> +/// \endcode<br>
>> +/// Y.h:<br>
>> +/// \code<br>
>> +/// class Y {};<br>
>> +/// \endcode<br>
>> +///<br>
>> +/// Usable as: Matcher<Decl>, Matcher<Stmt>, Matcher<TypeLoc><br>
>> +AST_POLYMORPHIC_MATCHER(<u></u>isExpansionInMainFile,<br>
>> + AST_POLYMORPHIC_SUPPORTED_<u></u>TYPES_3(Decl, Stmt,<br>
>> + TypeLoc)) {<br>
>> + auto &SourceManager = Finder->getASTContext().<u></u>getSourceManager();<br>
>> + return SourceManager.isInMainFile(<br>
>> + SourceManager.getExpansionLoc(<u></u>Node.getLocStart()));<br>
>> +}<br>
>> +<br>
>> +/// \brief Matches AST nodes that were expanded within system-header-files.<br>
>> +///<br>
>> +/// Example matches Y but not X<br>
>> +/// (matcher = recordDecl(<u></u>isExpansionInSystemHeader())<br>
>> +/// \code<br>
>> +/// #include <SystemHeader.h><br>
>> +/// class X {};<br>
>> +/// \endcode<br>
>> +/// SystemHeader.h:<br>
>> +/// \code<br>
>> +/// class Y {};<br>
>> +/// \endcode<br>
>> +///<br>
>> +/// Usable as: Matcher<Decl>, Matcher<Stmt>, Matcher<TypeLoc><br>
>> +AST_POLYMORPHIC_MATCHER(<u></u>isExpansionInSystemHeader,<br>
>> + AST_POLYMORPHIC_SUPPORTED_<u></u>TYPES_3(Decl, Stmt,<br>
>> + TypeLoc)) {<br>
>> + auto &SourceManager = Finder->getASTContext().<u></u>getSourceManager();<br>
>> + auto ExpansionLoc = SourceManager.getExpansionLoc(<u></u>Node.getLocStart());<br>
>> + if (ExpansionLoc.isInvalid()) {<br>
>> + return false;<br>
>> + }<br>
>> + return SourceManager.<u></u>isInSystemHeader(ExpansionLoc)<u></u>;<br>
>> +}<br>
>> +<br>
>> +/// \brief Matches AST nodes that were expanded within files whose name is<br>
>> +/// partially matching a given regex.<br>
>> +///<br>
>> +/// Example matches Y but not X<br>
>> +/// (matcher = recordDecl(<u></u>isExpansionInFileMatching("<u></u>AST.*"))<br>
>> +/// \code<br>
>> +/// #include "ASTMatcher.h"<br>
>> +/// class X {};<br>
>> +/// \endcode<br>
>> +/// ASTMatcher.h:<br>
>> +/// \code<br>
>> +/// class Y {};<br>
>> +/// \endcode<br>
>> +///<br>
>> +/// Usable as: Matcher<Decl>, Matcher<Stmt>, Matcher<TypeLoc><br>
>> +AST_POLYMORPHIC_MATCHER_P(<u></u>isExpansionInFileMatching,<br>
>> + AST_POLYMORPHIC_SUPPORTED_<u></u>TYPES_3(Decl, Stmt,<br>
>> + TypeLoc),<br>
>> + std::string, RegExp) {<br>
>> + auto &SourceManager = Finder->getASTContext().<u></u>getSourceManager();<br>
>> + auto ExpansionLoc = SourceManager.getExpansionLoc(<u></u>Node.getLocStart());<br>
>> + if (ExpansionLoc.isInvalid()) {<br>
>> + return false;<br>
>> + }<br>
>> + auto FileEntry =<br>
>> + SourceManager.<u></u>getFileEntryForID(<u></u>SourceManager.getFileID(<u></u>ExpansionLoc));<br>
>> + if (!FileEntry) {<br>
>> + return false;<br>
>> + }<br>
>> +<br>
>> + auto Filename = FileEntry->getName();<br>
>> + llvm::Regex RE(RegExp);<br>
>> + return RE.match(Filename);<br>
>> +}<br>
>> +<br>
>> /// \brief Matches declarations.<br>
>> ///<br>
>> /// Examples matches \c X, \c C, and the friend declaration inside \c C;<br>
>><br>
>> Modified: cfe/trunk/include/clang/<u></u>Tooling/Tooling.h<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Tooling/Tooling.h?rev=222646&r1=222645&r2=222646&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/include/<u></u>clang/Tooling/Tooling.h?rev=<u></u>222646&r1=222645&r2=222646&<u></u>view=diff</a><br>
>> ==============================<u></u>==============================<u></u>==================<br>
>> --- cfe/trunk/include/clang/<u></u>Tooling/Tooling.h (original)<br>
>> +++ cfe/trunk/include/clang/<u></u>Tooling/Tooling.h Mon Nov 24 03:10:56 2014<br>
>> @@ -143,6 +143,10 @@ inline std::unique_ptr<<u></u>FrontendActionFac<br>
>> bool runToolOnCode(clang::<u></u>FrontendAction *ToolAction, const Twine &Code,<br>
>> const Twine &FileName = "input.cc");<br>
>><br>
>> +/// The first part of the pair is the filename, the second part the<br>
>> +/// file-content.<br>
>> +typedef std::vector<std::pair<std::<u></u>string, std::string>> FileContentMappings;<br>
>> +<br>
>> /// \brief Runs (and deletes) the tool on 'Code' with the -fsyntax-only flag and<br>
>> /// with additional other flags.<br>
>> ///<br>
>> @@ -152,9 +156,10 @@ bool runToolOnCode(clang::<u></u>FrontendAction<br>
>> /// \param FileName The file name which 'Code' will be mapped as.<br>
>> ///<br>
>> /// \return - True if 'ToolAction' was successfully executed.<br>
>> -bool runToolOnCodeWithArgs(clang::<u></u>FrontendAction *ToolAction, const Twine &Code,<br>
>> - const std::vector<std::string> &Args,<br>
>> - const Twine &FileName = "input.cc");<br>
>> +bool runToolOnCodeWithArgs(<br>
>> + clang::FrontendAction *ToolAction, const Twine &Code,<br>
>> + const std::vector<std::string> &Args, const Twine &FileName = "input.cc",<br>
>> + const FileContentMappings &VirtualMappedFiles = FileContentMappings());<br>
>><br>
>> /// \brief Builds an AST for 'Code'.<br>
>> ///<br>
>><br>
>> Modified: cfe/trunk/lib/ASTMatchers/<u></u>Dynamic/Registry.cpp<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ASTMatchers/Dynamic/Registry.cpp?rev=222646&r1=222645&r2=222646&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/lib/<u></u>ASTMatchers/Dynamic/Registry.<u></u>cpp?rev=222646&r1=222645&r2=<u></u>222646&view=diff</a><br>
>> ==============================<u></u>==============================<u></u>==================<br>
>> --- cfe/trunk/lib/ASTMatchers/<u></u>Dynamic/Registry.cpp (original)<br>
>> +++ cfe/trunk/lib/ASTMatchers/<u></u>Dynamic/Registry.cpp Mon Nov 24 03:10:56 2014<br>
>> @@ -242,7 +242,10 @@ RegistryMaps::RegistryMaps() {<br>
>> REGISTER_MATCHER(isExpr);<br>
>> REGISTER_MATCHER(isExternC);<br>
>> REGISTER_MATCHER(isImplicit);<br>
>> + REGISTER_MATCHER(<u></u>isExpansionInFileMatching);<br>
>> + REGISTER_MATCHER(<u></u>isExpansionInMainFile);<br>
>> REGISTER_MATCHER(<u></u>isInstantiated);<br>
>> + REGISTER_MATCHER(<u></u>isExpansionInSystemHeader);<br>
>> REGISTER_MATCHER(isInteger);<br>
>> REGISTER_MATCHER(isIntegral);<br>
>> REGISTER_MATCHER(<u></u>isInTemplateInstantiation);<br>
>> @@ -314,6 +317,7 @@ RegistryMaps::RegistryMaps() {<br>
>> REGISTER_MATCHER(to);<br>
>> REGISTER_MATCHER(tryStmt);<br>
>> REGISTER_MATCHER(type);<br>
>> + REGISTER_MATCHER(typedefDecl);<br>
>> REGISTER_MATCHER(typedefType);<br>
>> REGISTER_MATCHER(typeLoc);<br>
>> REGISTER_MATCHER(<u></u>unaryExprOrTypeTraitExpr);<br>
>><br>
>> Modified: cfe/trunk/lib/Tooling/Tooling.<u></u>cpp<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Tooling.cpp?rev=222646&r1=222645&r2=222646&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/lib/Tooling/<u></u>Tooling.cpp?rev=222646&r1=<u></u>222645&r2=222646&view=diff</a><br>
>> ==============================<u></u>==============================<u></u>==================<br>
>> --- cfe/trunk/lib/Tooling/Tooling.<u></u>cpp (original)<br>
>> +++ cfe/trunk/lib/Tooling/Tooling.<u></u>cpp Mon Nov 24 03:10:56 2014<br>
>> @@ -123,17 +123,25 @@ getSyntaxOnlyToolArgs(const std::vector<<br>
>><br>
>> bool runToolOnCodeWithArgs(clang::<u></u>FrontendAction *ToolAction, const Twine &Code,<br>
>> const std::vector<std::string> &Args,<br>
>> - const Twine &FileName) {<br>
>> + const Twine &FileName,<br>
>> + const FileContentMappings &VirtualMappedFiles) {<br>
>> +<br>
>> SmallString<16> FileNameStorage;<br>
>> StringRef FileNameRef = FileName.<u></u>toNullTerminatedStringRef(<u></u>FileNameStorage);<br>
>> llvm::IntrusiveRefCntPtr<<u></u>FileManager> Files(<br>
>> new FileManager(FileSystemOptions(<u></u>)));<br>
>> - ToolInvocation Invocation(<u></u>getSyntaxOnlyToolArgs(Args, FileNameRef), ToolAction,<br>
>> - Files.get());<br>
>> + ToolInvocation Invocation(<u></u>getSyntaxOnlyToolArgs(Args, FileNameRef),<br>
>> + ToolAction, Files.get());<br>
>><br>
>> SmallString<1024> CodeStorage;<br>
>> Invocation.mapVirtualFile(<u></u>FileNameRef,<br>
>> Code.<u></u>toNullTerminatedStringRef(<u></u>CodeStorage));<br>
>> +<br>
>> + for (auto &FilenameWithContent : VirtualMappedFiles) {<br>
>> + Invocation.mapVirtualFile(<u></u>FilenameWithContent.first,<br>
>> + FilenameWithContent.second);<br>
>> + }<br>
>> +<br>
>> return Invocation.run();<br>
>> }<br>
>><br>
>><br>
>> Modified: cfe/trunk/unittests/<u></u>ASTMatchers/ASTMatchersTest.<u></u>cpp<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/ASTMatchers/ASTMatchersTest.cpp?rev=222646&r1=222645&r2=222646&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/unittests/<u></u>ASTMatchers/ASTMatchersTest.<u></u>cpp?rev=222646&r1=222645&r2=<u></u>222646&view=diff</a><br>
>> ==============================<u></u>==============================<u></u>==================<br>
>> --- cfe/trunk/unittests/<u></u>ASTMatchers/ASTMatchersTest.<u></u>cpp (original)<br>
>> +++ cfe/trunk/unittests/<u></u>ASTMatchers/ASTMatchersTest.<u></u>cpp Mon Nov 24 03:10:56 2014<br>
>> @@ -4625,5 +4625,46 @@ TEST(EqualsBoundNodeMatcher, UnlessDesce<br>
>> .bind("data")));<br>
>> }<br>
>><br>
>> +TEST(TypeDefDeclMatcher, Match) {<br>
>> + EXPECT_TRUE(matches("typedef int typedefDeclTest;",<br>
>> + typedefDecl(hasName("<u></u>typedefDeclTest"))));<br>
>> +}<br>
>> +<br>
>> +TEST(Matcher, IsExpansionInMainFileMatcher) {<br>
>> + EXPECT_TRUE(matches("class X {};",<br>
>> + recordDecl(hasName("X"), isExpansionInMainFile())));<br>
>> + EXPECT_TRUE(notMatches("", recordDecl(<u></u>isExpansionInMainFile())));<br>
>> + EXPECT_TRUE(<u></u>matchesConditionally("#include <other>\n",<br>
>> + recordDecl(<u></u>isExpansionInMainFile()), false,<br>
>> + "-isystem/", {{"/other", "class X {};"}}));<br>
>> +}<br>
>> +<br>
>> +TEST(Matcher, IsExpansionInSystemHeader) {<br>
>> + EXPECT_TRUE(<u></u>matchesConditionally(<br>
>> + "#include \"other\"\n", recordDecl(<u></u>isExpansionInSystemHeader()), true,<br>
>> + "-isystem/", {{"/other", "class X {};"}}));<br>
>> + EXPECT_TRUE(<u></u>matchesConditionally("#include \"other\"\n",<br>
>> + recordDecl(<u></u>isExpansionInSystemHeader()),<br>
>> + false, "-I/", {{"/other", "class X {};"}}));<br>
>> + EXPECT_TRUE(notMatches("class X {};",<br>
>> + recordDecl(<u></u>isExpansionInSystemHeader())))<u></u>;<br>
>> + EXPECT_TRUE(notMatches("", recordDecl(<u></u>isExpansionInSystemHeader())))<u></u>;<br>
>> +}<br>
>> +<br>
>> +TEST(Matcher, IsExpansionInFileMatching) {<br>
>> + EXPECT_TRUE(<u></u>matchesConditionally(<br>
>> + "#include <foo>\n"<br>
>> + "#include <bar>\n"<br>
>> + "class X {};",<br>
>> + recordDecl(<u></u>isExpansionInFileMatching("b.*<u></u>"), hasName("B")), true,<br>
>> + "-isystem/", {{"/foo", "class A {};"}, {"/bar", "class B {};"}}));<br>
>> + EXPECT_TRUE(<u></u>matchesConditionally(<br>
>> + "#include <foo>\n"<br>
>> + "#include <bar>\n"<br>
>> + "class X {};",<br>
>> + recordDecl(<u></u>isExpansionInFileMatching("f.*<u></u>"), hasName("X")), false,<br>
>> + "-isystem/", {{"/foo", "class A {};"}, {"/bar", "class B {};"}}));<br>
>> +}<br>
>> +<br>
>> } // end namespace ast_matchers<br>
>> } // end namespace clang<br>
>><br>
>> Modified: cfe/trunk/unittests/<u></u>ASTMatchers/ASTMatchersTest.h<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/ASTMatchers/ASTMatchersTest.h?rev=222646&r1=222645&r2=222646&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/unittests/<u></u>ASTMatchers/ASTMatchersTest.h?<u></u>rev=222646&r1=222645&r2=<u></u>222646&view=diff</a><br>
>> ==============================<u></u>==============================<u></u>==================<br>
>> --- cfe/trunk/unittests/<u></u>ASTMatchers/ASTMatchersTest.h (original)<br>
>> +++ cfe/trunk/unittests/<u></u>ASTMatchers/ASTMatchersTest.h Mon Nov 24 03:10:56 2014<br>
>> @@ -22,6 +22,7 @@ using clang::tooling::<u></u>buildASTFromCodeWi<br>
>> using clang::tooling::<u></u>newFrontendActionFactory;<br>
>> using clang::tooling::<u></u>runToolOnCodeWithArgs;<br>
>> using clang::tooling::<u></u>FrontendActionFactory;<br>
>> +using clang::tooling::<u></u>FileContentMappings;<br>
>><br>
>> class BoundNodesCallback {<br>
>> public:<br>
>> @@ -58,10 +59,10 @@ private:<br>
>> };<br>
>><br>
>> template <typename T><br>
>> -testing::AssertionResult matchesConditionally(const std::string &Code,<br>
>> - const T &AMatcher,<br>
>> - bool ExpectMatch,<br>
>> - llvm::StringRef CompileArg) {<br>
>> +testing::AssertionResult matchesConditionally(<br>
>> + const std::string &Code, const T &AMatcher, bool ExpectMatch,<br>
>> + llvm::StringRef CompileArg,<br>
>> + const FileContentMappings &VirtualMappedFiles = FileContentMappings()) {<br>
>> bool Found = false, DynamicFound = false;<br>
>> MatchFinder Finder;<br>
>> VerifyMatch VerifyFound(nullptr, &Found);<br>
>> @@ -73,7 +74,8 @@ testing::AssertionResult matchesConditio<br>
>> newFrontendActionFactory(&<u></u>Finder));<br>
>> // Some tests use typeof, which is a gnu extension.<br>
>> std::vector<std::string> Args(1, CompileArg);<br>
>> - if (!runToolOnCodeWithArgs(<u></u>Factory->create(), Code, Args)) {<br>
>> + if (!runToolOnCodeWithArgs(<u></u>Factory->create(), Code, Args, "input.cc",<br>
>> + VirtualMappedFiles)) {<br>
>> return testing::AssertionFailure() << "Parsing error in \"" << Code << "\"";<br>
>> }<br>
>> if (Found != DynamicFound) {<br>
>><br>
><br>
> I am getting failed unit tests from this on Windows, built with MSVC:<br>
><br>
> 61> Running the Clang regression tests<br>
> 61> -- Testing: 7831 tests, 32 threads --<br>
> 61> FAIL: Clang-Unit ::<br>
> ASTMatchers/Debug/<u></u>ASTMatchersTests.exe/Matcher.<u></u>IsExpansionInFileMatching<br>
> (7145 of 7831)<br>
> 61> ******************** TEST 'Clang-Unit ::<br>
> ASTMatchers/Debug/<u></u>ASTMatchersTests.exe/Matcher.<u></u>IsExpansionInFileMatching'<br>
> FAILED ********************<br>
> 61> Note: Google Test filter = Matcher.<u></u>IsExpansionInFileMatching<br>
> 61><br>
> 61> [==========] Running 1 test from 1 test case.<br>
> 61><br>
> 61> [----------] Global test environment set-up.<br>
> 61><br>
> 61> [----------] 1 test from Matcher<br>
> 61><br>
> 61> [ RUN ] Matcher.<u></u>IsExpansionInFileMatching<br>
> 61><br>
> 61>E:\llvm\llvm\tools\clang\<u></u>unittests\ASTMatchers\<u></u>ASTMatchersTest.cpp(4660):<br>
> error : Value of: matchesConditionally( "#include <foo>\n" "#include<br>
> <bar>\n" "class X {};", recordDecl(<u></u>isExpansionInFileMatching("b.*<u></u>"),<br>
> hasName("B")), true, "-isystem/", {{"/foo", "class A {};"}, {"/bar",<br>
> "class B {};"}})<br>
> 61><br>
> 61> Actual: false (Parsing error in "#include <foo><br>
> 61><br>
> 61> #include <bar><br>
> 61><br>
> 61> class X {};")<br>
> 61><br>
> 61> Expected: true<br>
> 61><br>
> 61>E:\llvm\llvm\tools\clang\<u></u>unittests\ASTMatchers\<u></u>ASTMatchersTest.cpp(4666):<br>
> error : Value of: matchesConditionally( "#include <foo>\n" "#include<br>
> <bar>\n" "class X {};", recordDecl(<u></u>isExpansionInFileMatching("f.*<u></u>"),<br>
> hasName("X")), false, "-isystem/", {{"/foo", "class A {};"}, {"/bar",<br>
> "class B {};"}})<br>
> 61><br>
> 61> Actual: false (Parsing error in "#include <foo><br>
> 61><br>
> 61> #include <bar><br>
> 61><br>
> 61> class X {};")<br>
> 61><br>
> 61> Expected: true<br>
> 61><br>
> 61> [ FAILED ] Matcher.<u></u>IsExpansionInFileMatching (36 ms)<br>
> 61><br>
> 61> [----------] 1 test from Matcher (36 ms total)<br>
> 61><br>
> 61><br>
> 61><br>
> 61> [----------] Global test environment tear-down<br>
> 61><br>
> 61> [==========] 1 test from 1 test case ran. (36 ms total)<br>
> 61><br>
> 61> [ PASSED ] 0 tests.<br>
> 61><br>
> 61> [ FAILED ] 1 test, listed below:<br>
> 61><br>
> 61> [ FAILED ] Matcher.<u></u>IsExpansionInFileMatching<br>
> 61><br>
> 61><br>
> 61><br>
> 61> 1 FAILED TEST<br>
> 61><br>
> 61> input.cc:1:10: fatal error: 'foo' file not found<br>
> 61><br>
> 61> #include <foo><br>
> 61><br>
> 61> ^<br>
> 61><br>
> 61> 1 error generated.<br>
> 61><br>
> 61> input.cc:1:10: fatal error: 'foo' file not found<br>
> 61><br>
> 61> #include <foo><br>
> 61><br>
> 61> ^<br>
> 61><br>
> 61> 1 error generated.<br>
> 61><br>
> 61><br>
> 61> ********************<br>
> 61> FAIL: Clang-Unit ::<br>
> ASTMatchers/Debug/<u></u>ASTMatchersTests.exe/Matcher.<u></u>IsExpansionInMainFileMatcher<br>
> (7146 of 7831)<br>
> 61> ******************** TEST 'Clang-Unit ::<br>
> ASTMatchers/Debug/<u></u>ASTMatchersTests.exe/Matcher.<u></u>IsExpansionInMainFileMatcher'<br>
> FAILED ********************<br>
> 61> Note: Google Test filter = Matcher.<u></u>IsExpansionInMainFileMatcher<br>
> 61><br>
> 61> [==========] Running 1 test from 1 test case.<br>
> 61><br>
> 61> [----------] Global test environment set-up.<br>
> 61><br>
> 61> [----------] 1 test from Matcher<br>
> 61><br>
> 61> [ RUN ] Matcher.<u></u>IsExpansionInMainFileMatcher<br>
> 61><br>
> 61>E:\llvm\llvm\tools\clang\<u></u>unittests\ASTMatchers\<u></u>ASTMatchersTest.cpp(4639):<br>
> error : Value of: matchesConditionally("#include <other>\n",<br>
> recordDecl(<u></u>isExpansionInMainFile()), false, "-isystem/", {{"/other",<br>
> "class X {};"}})<br>
> 61><br>
> 61> Actual: false (Parsing error in "#include <other><br>
> 61><br>
> 61> ")<br>
> 61><br>
> 61> Expected: true<br>
> 61><br>
> 61> [ FAILED ] Matcher.<u></u>IsExpansionInMainFileMatcher (64 ms)<br>
> 61><br>
> 61> [----------] 1 test from Matcher (64 ms total)<br>
> 61><br>
> 61><br>
> 61><br>
> 61> [----------] Global test environment tear-down<br>
> 61><br>
> 61> [==========] 1 test from 1 test case ran. (65 ms total)<br>
> 61><br>
> 61> [ PASSED ] 0 tests.<br>
> 61><br>
> 61> [ FAILED ] 1 test, listed below:<br>
> 61><br>
> 61> [ FAILED ] Matcher.<u></u>IsExpansionInMainFileMatcher<br>
> 61><br>
> 61><br>
> 61><br>
> 61> 1 FAILED TEST<br>
> 61><br>
> 61> input.cc:1:10: fatal error: 'other' file not found<br>
> 61><br>
> 61> #include <other><br>
> 61><br>
> 61> ^<br>
> 61><br>
> 61> 1 error generated.<br>
> 61><br>
> 61><br>
> 61> ********************<br>
> 61> FAIL: Clang-Unit ::<br>
> ASTMatchers/Debug/<u></u>ASTMatchersTests.exe/Matcher.<u></u>IsExpansionInSystemHeader<br>
> (7152 of 7831)<br>
> 61> ******************** TEST 'Clang-Unit ::<br>
> ASTMatchers/Debug/<u></u>ASTMatchersTests.exe/Matcher.<u></u>IsExpansionInSystemHeader'<br>
> FAILED ********************<br>
> 61> Note: Google Test filter = Matcher.<u></u>IsExpansionInSystemHeader<br>
> 61><br>
> 61> [==========] Running 1 test from 1 test case.<br>
> 61><br>
> 61> [----------] Global test environment set-up.<br>
> 61><br>
> 61> [----------] 1 test from Matcher<br>
> 61><br>
> 61> [ RUN ] Matcher.<u></u>IsExpansionInSystemHeader<br>
> 61><br>
> 61>E:\llvm\llvm\tools\clang\<u></u>unittests\ASTMatchers\<u></u>ASTMatchersTest.cpp(4645):<br>
> error : Value of: matchesConditionally( "#include \"other\"\n",<br>
> recordDecl(<u></u>isExpansionInSystemHeader()), true, "-isystem/",<br>
> {{"/other", "class X {};"}})<br>
> 61><br>
> 61> Actual: false (Parsing error in "#include "other"<br>
> 61><br>
> 61> ")<br>
> 61><br>
> 61> Expected: true<br>
> 61><br>
> 61>E:\llvm\llvm\tools\clang\<u></u>unittests\ASTMatchers\<u></u>ASTMatchersTest.cpp(4648):<br>
> error : Value of: matchesConditionally("#include \"other\"\n",<br>
> recordDecl(<u></u>isExpansionInSystemHeader()), false, "-I/", {{"/other",<br>
> "class X {};"}})<br>
> 61><br>
> 61> Actual: false (Parsing error in "#include "other"<br>
> 61><br>
> 61> ")<br>
> 61><br>
> 61> Expected: true<br>
> 61><br>
> 61> [ FAILED ] Matcher.<u></u>IsExpansionInSystemHeader (91 ms)<br>
> 61><br>
> 61> [----------] 1 test from Matcher (91 ms total)<br>
> 61><br>
> 61><br>
> 61><br>
> 61> [----------] Global test environment tear-down<br>
> 61><br>
> 61> [==========] 1 test from 1 test case ran. (91 ms total)<br>
> 61><br>
> 61> [ PASSED ] 0 tests.<br>
> 61><br>
> 61> [ FAILED ] 1 test, listed below:<br>
> 61><br>
> 61> [ FAILED ] Matcher.<u></u>IsExpansionInSystemHeader<br>
> 61><br>
> 61><br>
> 61><br>
> 61> 1 FAILED TEST<br>
> 61><br>
> 61> input.cc:1:10: fatal error: 'other' file not found<br>
> 61><br>
> 61> #include "other"<br>
> 61><br>
> 61> ^<br>
> 61><br>
> 61> 1 error generated.<br>
> 61><br>
> 61> input.cc:1:10: fatal error: 'other' file not found<br>
> 61><br>
> 61> #include "other"<br>
> 61><br>
> 61> ^<br>
> 61><br>
> 61> 1 error generated.<br>
> 61><br>
> 61><br>
> 61> ********************<br>
> 61><br>
> 61> Testing Time: 111.19s<br>
> 61> ********************<br>
> 61> Failing Tests (3):<br>
> 61> Clang-Unit ::<br>
> ASTMatchers/Debug/<u></u>ASTMatchersTests.exe/Matcher.<u></u>IsExpansionInFileMatching<br>
> 61> Clang-Unit ::<br>
> ASTMatchers/Debug/<u></u>ASTMatchersTests.exe/Matcher.<u></u>IsExpansionInMainFileMatcher<br>
> 61> Clang-Unit ::<br>
> ASTMatchers/Debug/<u></u>ASTMatchersTests.exe/Matcher.<u></u>IsExpansionInSystemHeader<br>
> 61><br>
> 61> Expected Passes : 7745<br>
> 61> Expected Failures : 19<br>
> 61> Unsupported Tests : 64<br>
> 61> Unexpected Failures: 3<br>
><br>
> ~Aaron<br>
</blockquote></div>