| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 192997
|
|
|
|
|
|
|
|
|
|
| |
specified.
In particular it makes sure that relative paths for non-virtual files aren't
made absolute.
Added unittest.
llvm-svn: 192992
|
|
|
|
| |
llvm-svn: 192313
|
|
|
|
|
|
|
|
|
|
| |
specified.
In particular it makes sure that relative paths for non-virtual files aren't
made absolute.
Added unittest test.
llvm-svn: 192299
|
|
|
|
| |
llvm-svn: 190632
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes PR16182.
Normally RAV visits parameter variable declarations of a function by traversing the TypeLoc of
the parameter declarations. However, for implicit functions, their parameters don't have any
TypeLoc, because they are implicit.
So for implicit functions, we visit their parameter variable declarations by traversing them through
the function declaration, and visit them accordingly.
Reviewed by Richard Smith and Manuel Klimek.
llvm-svn: 190528
|
|
|
|
| |
llvm-svn: 190486
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Closure classes for C++ lambdas are always compiler-generated. This one-line change calls setImplicit(true) on them at creation time, such that a default RecursiveASTVisitor (or any for which shouldVisitImplicitCode returns false) will skip them.
Reviewers: rsmith, dblaikie
Reviewed By: dblaikie
CC: klimek, revane, cfe-commits, jordan_rose
Differential Revision: http://llvm-reviews.chandlerc.com/D1593
llvm-svn: 190073
|
|
|
|
|
|
|
|
|
| |
During the transition of clang::tooling::Replacements from std::set to
std::vector, functions such as clang::tooling::applyAllReplacements() have been
duplicated to take a std::vector<Replacement>. Applying this same temporary
duplication to clang::tooling::shiftedCodePosition().
llvm-svn: 189358
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding a new data structure for storing the Replacements generated for a single
translation unit. Structure contains a vector of Replacements as well a field
indicating the main source file of the translation unit. An optional 'Context'
field allows for tools to provide any information they want about the context
the Replacements were generated in. This context is printed, for example, when
detecting conflicts during Replacement deduplication.
YAML serialization for this data structure is implemented in this patch. Tests
are included.
Differential Revision: http://llvm-reviews.chandlerc.com/D1422
llvm-svn: 188818
|
|
|
|
|
|
| |
Improved test to catch missing case.
llvm-svn: 188304
|
|
|
|
|
|
|
|
|
|
|
| |
One day soon, tooling::Replacements will be changed from being implemented as
an std::set to being implemented as an std::vector. Until then, some new code
using vectors of Replacements would enjoy having a version of
applyAllReplacements that takes a vector.
Differential Revision: http://llvm-reviews.chandlerc.com/D1380
llvm-svn: 188295
|
|
|
|
|
|
|
|
| |
If a Replacment is contained within the conflict range being built, the
conflict range would be erroneously shortened. Now fixed. Tests updated to
catch this case.
llvm-svn: 188287
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Source-centric tools need access to the location of a C++11
lambda expression's capture-default ('&' or '=') when it's present.
It's possible for them to find it by re-lexing and re-implementing
rules that Clang's parser has already applied, but the cost of storing
the SourceLocation and making it available to them is 32 bits per
LambdaExpr (a small delta, proportionally), and the simplification in
client code is significant.
Reviewers: rsmith
Reviewed By: rsmith
CC: cfe-commits, klimek, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D1192
llvm-svn: 188121
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch adds tooling::deduplicate() which removes duplicates from and
looks for conflicts in a vector of Replacements.
Differential Revision: http://llvm-reviews.chandlerc.com/D1314
llvm-svn: 187979
|
|
|
|
|
|
| |
Patch by Guillaume Papin.
llvm-svn: 186670
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
use/maintain additional state from the LambdaExpr while visiting the body
of a LambdaExpr.
One use for this arises because Clang's AST currently holds lambda bodies
in a form prior to their adjustment to refer to captured copies of local
variables, and so some clients will need access to the lambda's closure
type in order to query how to map VarDecl*s to the FieldDecls of their
by-copy captures. This hook is sufficient for at least one such client;
to do this without such a hook would require the client to re-implement
the whole of TraverseLambdaExpr, which is non-trivial and would likely be
more brittle.
llvm-svn: 186024
|
|
|
|
| |
llvm-svn: 185717
|
|
|
|
|
|
|
| |
WalkUpFromLambdaExpr, so that the Visit* functions are called
on that AST node.
llvm-svn: 185277
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
explicitly specify use of C++98 or C++11. Lang_CXX is preserved as
an alias for Lang_CXX98.
This does not add Lang_CXX1Y or Lang_C11, on the assumption that it's
better to add them if/when they are needed.
(This is a prerequisite for a test in a later patch for RecursiveASTVisitor.)
Reviewed by Richard Smith.
llvm-svn: 185276
|
|
|
|
|
|
|
| |
They are mostly duplicated and got out of sync during the PathV1 removal. We
should factor the code somewhere, but for now a FIXME will do.
llvm-svn: 185019
|
|
|
|
|
|
|
| |
Instead of creating a temporary directory, remember the set of temporary files
we create.
llvm-svn: 184951
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The big changes are:
- Deleting Driver/(Arg|Opt)*
- Rewriting includes to llvm/Option/ and re-sorting
- 'using namespace llvm::opt' in clang::driver
- Fixing the autoconf build by adding option everywhere
As discussed in the review, this change includes using directives in
header files. I'll make follow up changes to remove those in favor of
name specifiers.
Reviewers: espindola
Differential Revision: http://llvm-reviews.chandlerc.com/D975
llvm-svn: 183989
|
|
|
|
|
|
| |
I am about to move PathV2.h to Path.h.
llvm-svn: 183795
|
|
|
|
| |
llvm-svn: 183786
|
|
|
|
|
|
|
|
| |
This enables changing clang-check to get extra arguments.
Patch by Pavel Labath.
llvm-svn: 183227
|
|
|
|
| |
llvm-svn: 182930
|
|
|
|
|
|
|
|
|
|
|
|
| |
newFrontendActionFactory() took a pointer to a callback to call when a source
file was done being processed by an action. This revision updates the callback
to include an ante-processing callback as well.
Callback-providing class renamed and callback functions themselves renamed.
Functions are no longer pure-virtual so users aren't forced to implement both
callbacks if one isn't needed.
llvm-svn: 182864
|
|
|
|
|
|
|
|
|
| |
With this patch, clang-format will try to keep the cursor at the
original code position in editor integrations (implemented for emacs and
vim). This means, after formatting, clang-format will try to keep the
cursor on the same character of the same token.
llvm-svn: 182373
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The most common (non-buggy) case are where such objects are used as
return expressions in bool-returning functions or as boolean function
arguments. In those cases I've used (& added if necessary) a named
function to provide the equivalent (or sometimes negative, depending on
convenient wording) test.
DiagnosticBuilder kept its implicit conversion operator owing to the
prevalent use of it in return statements.
One bug was found in ExprConstant.cpp involving a comparison of two
PointerUnions (PointerUnion did not previously have an operator==, so
instead both operands were converted to bool & then compared). A test
is included in test/SemaCXX/constant-expression-cxx1y.cpp for the fix
(adding operator== to PointerUnion in LLVM).
llvm-svn: 181869
|
|
|
|
|
|
| |
Differential Revision: http://llvm-reviews.chandlerc.com/D482
llvm-svn: 176404
|
|
|
|
|
|
| |
PrintTemplateArgumentList.
llvm-svn: 175894
|
|
|
|
| |
llvm-svn: 173658
|
|
|
|
| |
llvm-svn: 172907
|
|
|
|
|
|
| |
brought into 'clang' namespace by clang/Basic/LLVM.h
llvm-svn: 172323
|
|
|
|
|
|
| |
I forgot to re-sort after fixing main module headers.
llvm-svn: 169244
|
|
|
|
|
|
| |
I've tried to place sensible headers at the top as main-module headers.
llvm-svn: 169243
|
|
|
|
|
|
| |
compile commands of the database and expose it via the libclang API.
llvm-svn: 169226
|
|
|
|
|
|
| |
by Olivier Goffart!
llvm-svn: 168726
|
|
|
|
|
|
| |
newFrontendActionFactory.InjectsEndOfSourceFileCallback on Win32 for now. Investigating.
llvm-svn: 166674
|
|
|
|
|
|
|
|
| |
translation unit is processed.
This is important when one wants to deduplicate results during one run over a translation unit by pointer identity of AST nodes.
llvm-svn: 166671
|
|
|
|
| |
llvm-svn: 166521
|
|
|
|
| |
llvm-svn: 166516
|
|
|
|
| |
llvm-svn: 165425
|
|
|
|
|
|
| |
considered absolute on all platforms.
llvm-svn: 165422
|
|
|
|
| |
llvm-svn: 165412
|
|
|
|
|
| |
Review: http://llvm-reviews.chandlerc.com/D30
llvm-svn: 165392
|
|
|
|
|
|
|
| |
This is similar to how we divide up the StaticAnalyzer libraries to separate
core functionality to what is clearly associated with Frontend actions.
llvm-svn: 163050
|
|
|
|
|
|
|
|
| |
passing additional parameters to a tool.
Use this to fix a FIXME in testing code.
llvm-svn: 162889
|
|
|
|
|
|
|
|
|
|
|
| |
isWritten() returns false, if shouldVisitImplicitCode() returns true.
Previously those CXXCtorInitializers were always skipped.
In order to make this change easier to test, this patch also extends the
test class template ExpectedLocationVisitor to support arbitrary numbers
of expected matches and disallowed matches.
llvm-svn: 162544
|