| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
http://reviews.llvm.org/D16394
llvm-svn: 258415
|
|
|
|
|
|
|
|
| |
dynamically.
Path by Jonathan Coe.
llvm-svn: 258341
|
|
|
|
|
|
| |
Patch by Adrian Zgorzałek.
llvm-svn: 258321
|
|
|
|
|
|
| |
Patch by Jonathan Coe.
llvm-svn: 258072
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new matcher allows users to provide a matcher for both the argument
of a CallExpr/CxxConstructExpr a well as the ParmVarDecl of the
argument.
Patch by Felix Berger.
Differential Revision: http://reviews.llvm.org/D13845
llvm-svn: 258042
|
|
|
|
| |
llvm-svn: 256278
|
|
|
|
|
|
| |
non-throwing exception specification.
llvm-svn: 254516
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When RAV traverses a Stmt or Expr node, if the corresponding Traverse*
functions have not been overridden, it will now use data recursion to walk
those nodes. We arrange this to be an unobservable optimization to RAV
subclasses, and to gracefully degrade as parts of the visitation are overridden
with functions that might observe the visitation.
For instance, if an RAV subclass overrides TraverseUnaryNot, we will ensure
that there are real recursive stack frames for those traversals, but we'll
use data recursion for all other traversals.
This removes the need for DataRecursiveASTVisitor, and for the
'shouldUseDataRecursionFor' extension point, both of which are removed by this
change.
llvm-svn: 253948
|
|
|
|
| |
llvm-svn: 253882
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This relands r250831 after some fixes to shrink the ParentMap overall
with one addtional tweak: nodes with pointer identity (e.g. Decl* and
friends) can be store more efficiently so I put them in a separate map.
All other nodes (so far only TypeLoc and NNSLoc) go in a different map
keyed on DynTypedNode. This further uglifies the code but significantly
reduces memory overhead.
Overall this change still make ParentMap significantly larger but it's
nowhere as bad as before. I see about 25 MB over baseline (pre-r251008)
on X86ISelLowering.cpp. If this becomes an issue we could consider
splitting the maps further as DynTypedNode is still larger (32 bytes)
than a single TypeLoc (16 bytes) but I didn't want to introduce even
more complexity now.
Differential Revision: http://reviews.llvm.org/D14011
llvm-svn: 251101
|
|
|
|
|
|
|
|
|
|
|
|
| |
Putting DynTypedNode in the ParentMap bloats its memory foot print.
Before the void* key had 8 bytes, now we're at 40 bytes per key which
can mean multiple gigabytes increase for large ASTs and this count
doesn't even include all the added TypeLoc nodes. Revert until I come
up with a better data structure.
This reverts commit r250831.
llvm-svn: 250889
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Firstly this changes the type of parent map to be keyed on DynTypedNode to
simplify the following changes. This comes with a DenseMapInfo for
DynTypedNode, which is a bit incomplete still and will probably only work
for parentmap right now.
Then the RecursiveASTVisitor in ASTContext is updated and finally
ASTMatchers hasParent and hasAncestor learn about the new functionality.
Now ParentMap is only missing TemplateArgumentLocs and CXXCtorInitializers.
Differential Revision: http://reviews.llvm.org/D13897
llvm-svn: 250831
|
|
|
|
|
|
|
|
|
|
| |
Summary: It breaks the build for the ASTMatchers
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D13893
llvm-svn: 250827
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Replace empty bodies of default constructors and destructors with '= default'.
Reviewers: bkramer, klimek
Subscribers: klimek, alexfh, cfe-commits
Differential Revision: http://reviews.llvm.org/D13890
llvm-svn: 250822
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Add decayedType and hasDecayedType AST matchers
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D13639
llvm-svn: 250114
|
|
|
|
|
|
|
|
|
|
|
| |
AllCallbacks is currently only used to call onStartOfTranslationUnit and
onEndOfTranslationUnit on them. In this (and any other scenario I can
come up with), it is important (or at least better) not to have
duplicates in this container. E.g. currently onEndOfTranslationUnit is
called repeatedly on the same callback for every matcher that is
registered with it.
llvm-svn: 249598
|
|
|
|
|
|
| |
and documentation.
llvm-svn: 249321
|
|
|
|
| |
llvm-svn: 249259
|
|
|
|
|
|
| |
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: 246322
|
|
|
|
| |
llvm-svn: 246037
|
|
|
|
|
|
| |
inline keyword can also be specified on a FunctionDecl, this is a polymorphic matcher.
llvm-svn: 245337
|
|
|
|
| |
llvm-svn: 244802
|
|
|
|
| |
llvm-svn: 244792
|
|
|
|
|
|
| |
conversion declaration is marked as explicit or not.
llvm-svn: 244666
|
|
|
|
| |
llvm-svn: 244662
|
|
|
|
|
|
| |
constructors, as well as functionality to determine whether a ctor initializer is a base initializer.
llvm-svn: 244036
|
|
|
|
|
|
| |
declaration are marked final.
llvm-svn: 243107
|
|
|
|
|
|
|
|
|
|
| |
matchers.
Individual matchers might not be convertible to each other's kind, but
they might still all be convertible to the target kind.
All the callers already know the target kind, so just pass it down.
llvm-svn: 242534
|
|
|
|
|
|
| |
variable.
llvm-svn: 242303
|
|
|
|
|
|
| |
(Broken out from http://reviews.llvm.org/D11168)
llvm-svn: 242161
|
|
|
|
|
|
|
|
| |
and std::move to avoid implicit std::string construction.
Patch by Eugene Kosov.
llvm-svn: 241433
|
|
|
|
|
|
| |
now fails the bots.
llvm-svn: 241335
|
|
|
|
|
|
|
|
| |
and std::move to avoid implicit std::string construction.
Patch by Eugene Kosov.
llvm-svn: 241330
|
|
|
|
| |
llvm-svn: 241321
|
|
|
|
|
|
|
|
|
|
| |
and std::move to avoid implicit std::string construction.
Part 1/2.
Patch by Eugene Kosov.
llvm-svn: 241319
|
|
|
|
|
|
| |
all members of the set. Instead, test that all members are convertible to the common type.
llvm-svn: 241263
|
|
|
|
|
|
| |
exception type (...).
llvm-svn: 241256
|
|
|
|
|
|
|
|
| |
It's better not to rely on the diagnostics engine to pretty print the
argument to decltype. Instead, exercise the functionality in
DeclPrinterTest.
llvm-svn: 239197
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the type isn't trivially moveable emplace can skip a potentially
expensive move. It also saves a couple of characters.
Call sites were found with the ASTMatcher + some semi-automated cleanup.
memberCallExpr(
argumentCountIs(1), callee(methodDecl(hasName("push_back"))),
on(hasType(recordDecl(has(namedDecl(hasName("emplace_back")))))),
hasArgument(0, bindTemporaryExpr(
hasType(recordDecl(hasNonTrivialDestructor())),
has(constructExpr()))),
unless(isInTemplateInstantiation()))
No functional change intended.
llvm-svn: 238601
|
|
|
|
| |
llvm-svn: 235348
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The patch is generated using clang-tidy misc-use-override check.
This command was used:
tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \
-checks='-*,misc-use-override' -header-filter='llvm|clang' -j=32 -fix
Reviewers: dblaikie
Reviewed By: dblaikie
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D8926
llvm-svn: 234678
|
|
|
|
|
|
|
| |
In a static build the dependency is picked up implictly, but not in a shared
library build. This is needed for the new ObjC matchers that reference Selector.
llvm-svn: 232055
|
|
|
|
|
|
|
|
|
|
|
| |
Add some matchers for Objective-C selectors and messages to
ASTMatchers.h. Minor mods to ASTMatchersTest.h to allow test files with
".m" extension in addition to ".cpp". New tests added to
ASTMatchersTest.c.
Patch by Dean Sutherland.
llvm-svn: 232051
|
|
|
|
|
|
| |
http://bb.pgr.jp/builders/ninja-clang-x64-mingw64-RA/builds/6352/steps/build/logs/stdio
llvm-svn: 232038
|
|
|
|
|
|
|
|
| |
Minor mods to ASTMatchersTest.h to allow test files with ".m" extension in addition to ".cpp". New tests added to ASTMatchersTest.c.
Patch by Dean Sutherland, reviewed by Manuel Klimek. From http://reviews.llvm.org/D7710
llvm-svn: 232034
|