Changeset View
Changeset View
Standalone View
Standalone View
docs/LibASTMatchersReference.html
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 4,117 Lines • ▼ Show 20 Lines | Given: | ||||
int z = 3; | int z = 3; | ||||
functionDecl(isExternC()) | functionDecl(isExternC()) | ||||
matches the declaration of f and g, but not the declaration of h. | matches the declaration of f and g, but not the declaration of h. | ||||
varDecl(isExternC()) | varDecl(isExternC()) | ||||
matches the declaration of x and y, but not the declaration of z. | matches the declaration of x and y, but not the declaration of z. | ||||
</pre></td></tr> | </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('isStaticLocal0')"><a name="isStaticLocal0Anchor">isStaticLocal</a></td><td></td></tr> | |||||
<tr><td colspan="4" class="doc" id="isStaticLocal0"><pre>Matches a static variable with local scope. | |||||
Example matches y (matcher = varDecl(isStaticLocal())) | |||||
void f() { | |||||
int x; | |||||
static int y; | |||||
} | |||||
static 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('isStaticStorageClass1')"><a name="isStaticStorageClass1Anchor">isStaticStorageClass</a></td><td></td></tr> | <tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1VarDecl.html">VarDecl</a>></td><td class="name" onclick="toggle('isStaticStorageClass1')"><a name="isStaticStorageClass1Anchor">isStaticStorageClass</a></td><td></td></tr> | ||||
<tr><td colspan="4" class="doc" id="isStaticStorageClass1"><pre>Matches variablefunction declarations that have "static" storage | <tr><td colspan="4" class="doc" id="isStaticStorageClass1"><pre>Matches variablefunction declarations that have "static" storage | ||||
class specifier ("static" keyword) written in the source. | class specifier ("static" keyword) written in the source. | ||||
Given: | Given: | ||||
static void f() {} | static void f() {} | ||||
static int i = 0; | static int i = 0; | ||||
extern int j; | extern int j; | ||||
▲ Show 20 Lines • Show All 2,762 Lines • Show Last 20 Lines |