| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 274015
|
|
|
|
| |
llvm-svn: 273659
|
|
|
|
|
|
|
| |
This reverts commit r272386. It doesn't compile with MSVC and those bots
have been red the entire day as a consequence.
llvm-svn: 272453
|
|
|
|
|
|
| |
Matches methods overridden by the given method.
llvm-svn: 272386
|
|
|
|
|
|
|
|
| |
with both functionDecl and functionPrototype matchers.
Patch by Don Hinton.
llvm-svn: 272028
|
|
|
|
|
|
| |
expressions). This is required for traversing certain types (like function pointer types).
llvm-svn: 271927
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The switch statement could be added to the hasCondition matcher.
Example:
```
clang-query> match switchStmt(hasCondition(ignoringImpCasts(declRefExpr())))
```
Output:
```
Match #1:
Binding for "root":
SwitchStmt 0x2f9b528 </usr/local/google/home/etienneb/examples/enum.cc:35:3, line:38:3>
|-<<<NULL>>>
|-ImplicitCastExpr 0x2f9b510 <line:35:11> 'int' <IntegralCast>
| `-ImplicitCastExpr 0x2f9b4f8 <col:11> 'enum Color' <LValueToRValue>
| `-DeclRefExpr 0x2f9b4d0 <col:11> 'enum Color' lvalue Var 0x2f9a118 'C' 'enum Color'
`-CompoundStmt 0x2f9b610 <col:14, line:38:3>
|-CaseStmt 0x2f9b578 <line:36:3, col:22>
| |-ImplicitCastExpr 0x2f9b638 <col:8> 'int' <IntegralCast>
| | `-DeclRefExpr 0x2f9b550 <col:8> 'enum Size' EnumConstant 0x2f99e40 'Small' 'enum Size'
| |-<<<NULL>>>
| `-ReturnStmt 0x2f9b5d0 <col:15, col:22>
| `-IntegerLiteral 0x2f9b5b0 <col:22> 'int' 1
`-DefaultStmt 0x2f9b5f0 <line:37:3, col:12>
`-BreakStmt 0x2f9b5e8 <col:12>
1 match.
```
Reviewers: aaron.ballman, sbenza, klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D20767
llvm-svn: 271208
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: alexfh, aaron.ballman
Subscribers: aaron.ballman, klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D20360
llvm-svn: 269916
|
|
|
|
|
|
|
|
| |
that have a dynamic exception specification.
Patch by Don Hinton.
llvm-svn: 269662
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This AST matcher will match a given CastExpr kind.
It's an narrowing matcher on CastExpr.
Reviewers: klimek, alexfh, sbenza, aaron.ballman
Subscribers: Prazek, jroelofs, aaron.ballman, klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D19871
llvm-svn: 269460
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch is adding support for a matcher to check string literal length.
This matcher is used in clang-tidy checkers and is part of this refactoring:
see: http://reviews.llvm.org/D19841
Reviewers: sbenza, klimek, aaron.ballman
Subscribers: alexfh, klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D19876
llvm-svn: 269274
|
|
|
|
|
|
|
|
|
| |
The change from llvm::VariadicFunction to internal::VariadicFunction
broke the extraction of hasAnyName().
equalsNode was broken because the argument type is 'const XXXX*' and
the internal space caused a failure on the regex.
llvm-svn: 268548
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Matcher proposed in the review of checker misc-assign-operator (name pending). Its goal is to find the direct enclosing function declaration of a statement and run the inner matcher on it. Two version is attached in this patch (thus it will not compile), to be decided which approach to take. The second one always chooses one single parent while the first one does a depth-first search upwards (thus a height-first search) and returns the first positive match of the inner matcher (thus it always returns zero or one matches, not more). Further questions: is it enough to implement it in-place, or ASTMatchersInternals or maybe ASTMatchFinder should be involved?
Reviewers: sbenza
Subscribers: aaron.ballman, klimek, o.gyorgy, xazax.hun, cfe-commits
Differential Revision: http://reviews.llvm.org/D19357
llvm-svn: 268490
|
|
|
|
|
|
|
|
| |
hasType() to match on TypedefNameDecl nodes.
Patch by Clement Courbet.
llvm-svn: 266331
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CXXMethodDecl::isUserProvided.
Summary: Added two AST matchers: isDelegatingConstructor for CXXConstructorDecl::IsDelegatingConstructor; and isUserProvided corresponding to CXXMethodDecl::isUserProvided.
Reviewers: aaron.ballman, alexfh
Subscribers: klimek, cfe-commits
Patch by Michael Miller!
Differential Revision: http://reviews.llvm.org/D19038
llvm-svn: 266189
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: A checker (will be uploaded after this patch) needs to check implicit casts. The checker needs matcher hasAnyArgument but it ignores implicit casts and parenthesized expressions which disables checking of implicit casts for arguments in the checker. However the documentation of the matcher contains a FIXME that this should be removed once separate matchers for ignoring implicit casts and parenthesized expressions are ready. Since these matchers were already there the fix could be executed. Only one Clang checker was affected which was also fixed (ignoreParenImpCasts added) and is separately uploaded. Third party checkers (not in the Clang repository) may be affected by this fix so the fix must be emphasized in the release notes.
Reviewers: klimek, sbenza, alexfh
Subscribers: alexfh, klimek, xazax.hun, cfe-commits
Differential Revision: http://reviews.llvm.org/D18243
llvm-svn: 264855
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: A checker (will be uploaded after this patch) needs to check implicit casts. Existing generic matcher "has" ignores implicit casts and parenthesized expressions and no specific matcher for matching return value expression preexisted. The patch adds such a matcher (hasReturnValue).
Reviewers: klimek, sbenza
Subscribers: xazax.hun, klimek, cfe-commits
Patch by Ádám Balogh!
Differential Revision: http://reviews.llvm.org/D17986
llvm-svn: 264037
|
|
|
|
|
|
|
|
| |
binaryConditionalOperator, designatedInitExpr, designatorCountIs, hasSyntacticForm, implicitValueInitExpr, labelDecl, opaqueValueExpr, parenListExpr, predefinedExpr, requiresZeroInitialization, and stmtExpr.
Patch by Aleksei Sidorin.
llvm-svn: 263027
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Add matcher hasAnyName as an optimization over anyOf(hasName(),...)
Reviewers: alexfh
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D17163
llvm-svn: 261574
|
|
|
|
|
|
| |
double, but not complex.
llvm-svn: 261221
|
|
|
|
|
|
| |
constants in one matcher.
llvm-svn: 261008
|
|
|
|
|
|
| |
Patch by Richard Thomson.
llvm-svn: 259359
|
|
|
|
|
|
|
|
| |
functionProtoType matcher for FunctionProtoType nodes, extend parameterCountIs to FunctionProtoType nodes."
It didn't pass check-clang.
llvm-svn: 259218
|
|
|
|
|
|
|
|
| |
matcher for FunctionProtoType nodes, extend parameterCountIs to FunctionProtoType nodes.
Patch by Richard Thomson
llvm-svn: 259210
|
|
|
|
|
|
| |
Patch by Jonathan Coe.
llvm-svn: 258628
|
|
|
|
|
|
| |
the AST matcher reference after fixing the issue. Thanks to Richard for noticing the issue and bringing it to my attention!
llvm-svn: 258579
|
|
|
|
|
|
| |
Patch by Jonathan Coe.
llvm-svn: 258573
|
|
|
|
|
|
| |
http://reviews.llvm.org/D16394
llvm-svn: 258415
|
|
|
|
|
|
|
|
| |
\see doxygen commands. Ideally this would link to the target of \see, but for now it translates \see into "See also: "
Regenerate the AST documentation for this new functionality.
llvm-svn: 258401
|
|
|
|
|
|
| |
Patch by Aleksei Sidorin.
llvm-svn: 258322
|
|
|
|
|
|
| |
Patch by Adrian Zgorzałek.
llvm-svn: 258321
|
|
|
|
|
|
| |
Patch by Jonathan Coe.
llvm-svn: 258072
|
|
|
|
|
|
| |
EXPECT_TRUE instead of EXPECT_FALSE. Adds a matcher test to ensure that static member functions are properly handled. Generates the documentation from the matcher.
llvm-svn: 258070
|
|
|
|
|
|
|
| |
Fix typo in booleanType() doc and recreate the
LibASTMatchersReference.html reference document.
llvm-svn: 256284
|
|
|
|
|
|
| |
non-throwing exception specification.
llvm-svn: 254516
|
|
|
|
| |
llvm-svn: 253882
|
|
|
|
| |
llvm-svn: 253654
|
|
|
|
| |
llvm-svn: 253653
|
|
|
|
|
|
| |
copy-pasta issue that my local testing did not catch.
llvm-svn: 253481
|
|
|
|
| |
llvm-svn: 253475
|
|
|
|
|
|
| |
a VarDecl has automatic, static, or thread storage duration. This also updates the documentation for matchers, which appear to be missing some previous additions.
llvm-svn: 253473
|
|
|
|
| |
llvm-svn: 250602
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Add decayedType and hasDecayedType AST matchers
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D13639
llvm-svn: 250114
|
|
|
|
| |
llvm-svn: 249341
|
|
|
|
|
|
| |
and documentation.
llvm-svn: 249321
|
|
|
|
|
|
| |
rename also splits recordDecl() (which used to match CXXRecordDecl) into recordDecl() (that matches RecordDecl) and cxxRecordDecl (that matches CXXRecordDecl). Also adds isStruct(), isUnion(), and isClass() narrowing matchers for RecordDecl objects.
llvm-svn: 247885
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
possible. Added objcObjectPointerType(), objcInterfaceDecl(), templateTypeParmType(), injectedClassNameType(), and unresolvedUsingTypenameDecl(). Updated documentation for pointerType() to call out that it does not match ObjCObjectPointerType types. Changed pointsTo() to handle ObjCObjectPointerType as well as PointerType.
While this may seem like a lot of unrelated changes, they all relate back to fixing HasDeclarationMatcher.
This now allows us to write a matcher like:
varDecl(hasType(namedDecl(hasName("Foo"))))
that matches code using typedefs, objc interfaces, template type parameters, injected class names, or unresolved using typenames.
llvm-svn: 247404
|
|
|
|
| |
llvm-svn: 246324
|
|
|
|
| |
llvm-svn: 246322
|
|
|
|
|
|
| |
inline keyword can also be specified on a FunctionDecl, this is a polymorphic matcher.
llvm-svn: 245337
|