| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Older (but still supported) versions of GCC don't handle C++11 raw
string literals in macro parameters correctly.
|
|
|
|
|
|
|
|
| |
patch"
This reverts commit 4c48ea68e491cb42f1b5d43ffba89f6a7f0dadc4.
The powerpc buildbots had an internal compiler error after this patch.
This requires some inspection.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The analysis for const-ness of local variables required a view generally useful
matchers that are extracted into its own patch.
They are `decompositionDecl` and `forEachArgumentWithParamType`, that works
for calls through function pointers as well.
Reviewers: aaron.ballman
Reviewed By: aaron.ballman
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D72505
|
|
|
|
| |
Accepts child matchers cxxThisExpr to match on capture of this and also on varDecl.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
These overloads make it possible to wrap unless(), anyOf(), has() etc
with the traverse matcher.
Reviewers: aaron.ballman
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71977
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: aaron.ballman
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71976
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: aaron.ballman
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71680
|
|
|
|
| |
This reverts commit 494b1318ca77927e919bbf9a61749a58553d738c.
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: aaron.ballman
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71680
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: aaron.ballman
Subscribers: mgorny, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70613
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This will eventually allow traversal of an AST while ignoring invisible
AST nodes. Currently it depends on the available enum values for
TraversalKinds. That can be extended to ignore all invisible nodes in
the future.
Reviewers: klimek, aaron.ballman
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61837
|
|
|
|
|
|
|
|
|
|
| |
Now that we've moved to C++14, we no longer need the llvm::make_unique
implementation from STLExtras.h. This patch is a mechanical replacement
of (hopefully) all the llvm::make_unique instances across the monorepo.
Differential revision: https://reviews.llvm.org/D66259
llvm-svn: 368942
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
appropriate file.
Summary:
`ignoringElidableConstructorCall` is a traversal matcher, but its tests are
grouped with narrowing-matcher tests. This revision moves them to the correct
file.
Reviewers: gribozavr
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D65963
llvm-svn: 368326
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Changes:
- add an ast matcher for deductiong guide.
- allow isExplicit matcher for deductiong guide.
- add hasExplicitSpecifier matcher which give access to the expression of the explicit specifier if present.
Reviewers: klimek, rsmith, aaron.ballman
Reviewed By: aaron.ballman
Subscribers: aaron.ballman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61552
llvm-svn: 363855
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`isClassMethod`, and `isInstanceMethod`
Summary:
isClassMessage is an equivalent to isInstanceMessage for ObjCMessageExpr, but matches message expressions to classes.
isClassMethod and isInstanceMethod check whether a method declaration (or definition) is for a class method or instance method (respectively).
Contributed by @mywman!
Reviewers: benhamilton, klimek, mwyman
Reviewed By: benhamilton, mwyman
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D60920
llvm-svn: 358904
|
|
|
|
|
|
|
|
| |
Certain combinations of gcc and ccache fail when the raw
string literal is preprocessed. This just moves the string
out as is done elsewhere in the same file.
llvm-svn: 354201
|
|
|
|
| |
llvm-svn: 354136
|
|
|
|
| |
llvm-svn: 354135
|
|
|
|
| |
llvm-svn: 354134
|
|
|
|
|
|
|
|
|
|
| |
Summary: Add tests for matchers `on`, `onImplicitObjectArgument` and `hasObjectExpression`.
Reviewers: alexfh, steveire, aaron.ballman
Differential Revision: https://reviews.llvm.org/D56850
llvm-svn: 354133
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to reflect the new license.
We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.
llvm-svn: 351636
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Compound literals, enums, file-scoped arrays, etc. require their
initializers and size specifiers to be constant. Wrap the initializer
expressions in a ConstantExpr so that we can easily check for this later
on.
Reviewers: rsmith, shafik
Reviewed By: rsmith
Subscribers: cfe-commits, jyknight, nickdesaulniers
Differential Revision: https://reviews.llvm.org/D53921
llvm-svn: 346455
|
|
|
|
|
|
|
|
| |
Some versions of gcc, especially when invoked through ccache (-E), can have
trouble with raw string literals inside macros. This moves the string out of
the macro.
llvm-svn: 339759
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
A CXXBindTemporaryExpr can appear inside an ImplicitCastExpr, and was
not ignored previously.
Fixes the case reported in PR37327.
Reviewers: rsmith, dblaikie, klimek
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D50666
llvm-svn: 339730
|
|
|
|
|
|
|
|
| |
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D50605
llvm-svn: 339530
|
|
|
|
| |
llvm-svn: 337214
|
|
|
|
|
|
|
|
| |
`isInstanceMessage` for ObjCMessageExpr
Differential Revision: https://reviews.llvm.org/D49333
llvm-svn: 337209
|
|
|
|
|
|
|
|
| |
Blocks can be matched just as well as functions or Objective-C methods.
Differential Revision: https://reviews.llvm.org/D46980
llvm-svn: 332545
|
|
|
|
|
|
|
|
| |
Objective-C methods
Differential Revision: https://reviews.llvm.org/D44707
llvm-svn: 328746
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently hasArgument works with both ObjC messages and function calls,
but not hasAnyArgument.
This patch fixes that discrepancy, as it's often more convenient to use
hasAnyArgument.
On a more general note, it would be great to have a common superclass
for objc-call and function call, and a matcher matching that, but that's
probably a job for another commit.
Differential Revision: https://reviews.llvm.org/D44169
llvm-svn: 326865
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Originally, we weren't able to match on Type nodes themselves (only QualType),
so the hasDeclaration matcher was initially written to give what we thought are
reasonable results for QualType matches.
When we chagned the matchers to allow matching on Type nodes, it turned out
that the hasDeclaration matcher was by chance written templated enough to now
allow hasDeclaration to also match on (some) Type nodes.
This patch change the hasDeclaration matcher to:
a) work the same on Type and QualType nodes,
b) be completely explicit about what nodes we can match instead of just allowing
anything with a getDecl() to match,
c) explicitly control desugaring only one level in very specific instances.
d) adds hasSpecializedTemplate and tagType matchers to allow migrating
existing use cases that now need more explicit matchers
Note: This patch breaks clang-tools-extra. The corresponding patch there
is approved and will land in a subsequent patch.
Differential Revision: https://reviews.llvm.org/D27104
llvm-svn: 309809
|
|
|
|
|
|
|
|
| |
This is needed for PR32966.
Reviewed by alexfh.
llvm-svn: 309667
|
|
|
|
|
|
|
|
| |
ODR use. These traits don't have a definition as they're intended to be
used strictly at compile time. Change the tests to use static_assert to
move the entire thing into compile-time.
llvm-svn: 291036
|
|
|
|
|
|
|
|
|
|
| |
to make reference to template parameters. This is only a partial
implementation; we retain the restriction that the argument must not be
type-dependent, since it's unclear how that would work given the existence of
other language rules requiring an exact type match in this context, even for
type-dependent cases (a question has been raised on the core reflector).
llvm-svn: 290647
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Needed for https://reviews.llvm.org/D27166
Reviewers: sbenza, bkramer, klimek
Subscribers: aemerson, cfe-commits
Differential Revision: https://reviews.llvm.org/D27447
llvm-svn: 289042
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D27207
llvm-svn: 288366
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: sbenza, lukasza, aaron.ballman, klimek
Subscribers: lukasza, sbenza, cfe-commits
Differential Revision: https://reviews.llvm.org/D26032
llvm-svn: 285644
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The unit tests in this patch demonstrate the need to traverse template
parameter lists of DeclaratorDecls (e.g. VarDecls, CXXMethodDecls) and
TagDecls (e.g. EnumDecls, RecordDecls).
Fixes PR29042.
https://reviews.llvm.org/D24268
Patch from Lukasz
Łukasz Anforowicz <lukasza@chromium.org>!
llvm-svn: 281345
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Required for D22220
Reviewers: sbenza, klimek, aaron.ballman, alexfh
Subscribers: alexfh, klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D23004
llvm-svn: 278123
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D22963
llvm-svn: 277155
|
|
|
|
|
|
|
|
|
|
|
|
| |
functionDecl.
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D22957
llvm-svn: 277142
|
|
|
|
|
|
| |
Matches methods overridden by the given method.
llvm-svn: 274531
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
has matcher can now match to implicit and paren casts
http://reviews.llvm.org/D20801
llvm-svn: 271288
|