| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
outside of it.
llvm-svn: 231671
|
|
|
|
|
|
| |
Found by -Wmissing-prototypes.
llvm-svn: 231668
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Add translationUnitDecl matcher.
Reviewers: alexfh
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D7512
llvm-svn: 228694
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Add voidType() matcher.
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D6656
llvm-svn: 224250
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
typedefDecl, isInMainFile, isInSystemFile, isInFileMatchingName
Change to original: ifndef out tests in Windows due to /-separated
paths.
Summary:
Often one is only interested in matches within the main-file or matches
that are not within a system-header, for which this patch adds
isInMainFile and isInSystemFile. They take no arguments and narrow down
the matches.
The isInFileMatchingName is mainly thought for interactive
clang-query-sessions, to make a matcher more specific without restarting
the session with the files you are interested in for that moment. It
takes a string that will be used as regular-expression to match the
filename of where the matched node is expanded.
Patch by Hendrik von Prince.
llvm-svn: 222765
|
|
|
|
|
|
| |
which was required for r222646 to compile with Visual Studio 2012.
llvm-svn: 222667
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
isInFileMatchingName
Summary:
Often one is only interested in matches within the main-file or matches
that are not within a system-header, for which this patch adds
isInMainFile and isInSystemFile. They take no arguments and narrow down
the matches.
The isInFileMatchingName is mainly thought for interactive
clang-query-sessions, to make a matcher more specific without restarting
the session with the files you are interested in for that moment. It
takes a string that will be used as regular-expression to match the
filename of where the matched node is expanded.
Patch by Hendrik von Prince.
llvm-svn: 222646
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Replace variadic operator function pointer with an enum value.
Hiding the implementation of the variadic matcher will allow to specialize them for the operation performed.
In particular, it will allow for a more efficient allOf() matcher.
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D6293
llvm-svn: 222432
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DynTypedMatcher.
Summary:
The generic variadic matcher is faster (one less virtual function call
per match) and doesn't require template instantiations which reduces
compile time and binary size.
Registry.cpp.o generates ~14% less symbols and compiles ~7.5% faster.
The change also speeds up our clang-tidy benchmark by ~2%.
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D6278
llvm-svn: 222131
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Add valueDecl() matcher.
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D6005
llvm-svn: 220776
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
overloads.
Summary:
There was an assumption that there were no matchers that were overloaded
on matchers and other types of arguments.
This assumption was broken recently with the addition of new matcher
overloads.
Fixes http://llvm.org/PR21226
Reviewers: pcc
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D5711
llvm-svn: 219450
|
|
|
|
| |
llvm-svn: 219408
|
|
|
|
|
|
| |
These were uncoveredby my yet undelivered patch.
llvm-svn: 218774
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Refactor VariantMatcher::MatcherOps to reduce the amount of generated code.
- Make some code type agnostic and move it to the cpp file.
- Return a DynTypedMatcher instead of storing the object in MatcherOps.
This change reduces the number of symbols generated in Registry.cpp by
~19%, the object byte size by ~17% and the compilation time (in non-release mode) by ~20%.
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D5124
llvm-svn: 217152
|
|
|
|
|
|
|
|
|
|
|
| |
template instantiation.
This is hoisted from clang-tidy where it's used everywhere. The implementation
is not particularly efficient right now, but there is no easy fix for that.
Differential Revision: http://reviews.llvm.org/D5085
llvm-svn: 217029
|
|
|
|
|
|
| |
const from some other StringRefs since its implicitly const already.
llvm-svn: 216825
|
|
|
|
|
|
| |
and mentioning the type. This works now that we have a conversion from ArrayRef<T*> to ArrayRef<const T*>.
llvm-svn: 216824
|
|
|
|
|
|
|
|
| |
Delete special-case CUDA attribute matchers.
Patch by Jacques Pienaar.
llvm-svn: 216379
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D4910
llvm-svn: 215757
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D4911
llvm-svn: 215714
|
|
|
|
|
|
| |
Modifications made by clang-tidy with minor tweaks.
llvm-svn: 215557
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This includes:
- Passing a Sema to completeExpression to allow for named values in the
expression.
- Passing a map of names to values to the parser.
- Update the Sema interface to include completion for matchers.
- Change the parser to use the Sema for completion, instead of going
directly to Registry.
Reviewers: pcc
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D3509
llvm-svn: 215472
|
|
|
|
| |
llvm-svn: 211987
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add hasLocalStorage/hasGlobalStorage matchers for VarDecl nodes.
Update the doc. Also add them to the dynamic registry.
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D4034
llvm-svn: 210278
|
|
|
|
| |
llvm-svn: 209070
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Add support for named values in the parser.
Reviewers: pcc
CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D3276
llvm-svn: 206176
|
|
|
|
|
|
|
|
| |
This was submitted before it was ready.
This reverts commit 62060a01e095cf35eb9ca42a333752d12714f35c.
llvm-svn: 205533
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Add matcher for ExprWithCleanups.
Reviewers: klimek
CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D3248
llvm-svn: 205420
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add support for named values in the parser.
This allows injection of arbitrary constants using a custom Sema object.
Completions are not supported right now.
Will be used by clang_query to support the 'let' command.
Usage example:
clang_query> let unique_ptr recordDecl(hasName("unique_ptr"))
clang_query> match varDecl(hasType(unique_ptr))
Reviewers: klimek, pcc
CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D3229
llvm-svn: 205419
|
|
|
|
|
|
| |
semantics where appropriate.
llvm-svn: 203477
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add loc() to the dynamic registry.
Other fixes:
- Fix the polymorphic variant value to accept an exact match, even if
there are other possible conversions.
- Fix specifiesTypeLoc() to not crash on an empty
NestedNameSpecifierLoc.
Reviewers: klimek
CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D2928
llvm-svn: 203467
|
|
|
|
|
|
| |
Also change to using range-based for loops. No functional change intended.
llvm-svn: 203396
|
|
|
|
|
|
| |
No functionality change.
llvm-svn: 203241
|
|
|
|
| |
llvm-svn: 202630
|
|
|
|
| |
llvm-svn: 202625
|
|
|
|
| |
llvm-svn: 202238
|
|
|
|
|
|
|
|
|
|
|
| |
hasAnyTemplateArgument, and (out of necessity) an isExpr matcher.
Also updates the TemplateArgument doxygen to reflect reality for
non-canonical template arguments.
Differential Revision: http://llvm-reviews.chandlerc.com/D2810
llvm-svn: 201804
|
|
|
|
|
|
| |
Differential Revision: http://llvm-reviews.chandlerc.com/D2708
llvm-svn: 200949
|
|
|
|
| |
llvm-svn: 200642
|
|
|
|
|
|
|
|
|
| |
This function returns a list of completions for a given expression and
completion position.
Differential Revision: http://llvm-reviews.chandlerc.com/D2261
llvm-svn: 200497
|
|
|
|
| |
llvm-svn: 200140
|
|
|
|
| |
llvm-svn: 199956
|