Age | Commit message (Collapse) | Author |
|
Change-Id: I725a25e633fed57b4065f7c34243b468a5ab125c
|
|
Bug: http://b/115807768
This reverts commit bbd503d792e9a9b3a726d6522962964f9cffb22b. This can
now build succesfully with Clang.
Test: build.py
|
|
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D58135
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353926 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Fixes https://bugs.llvm.org/show_bug.cgi?id=40593.
Non-percent-encoded chars doesn't cause any problems on the input-side since we
assume everything after authority section is data and don't interpret them as
delimeters.
Reviewers: sammccall
Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D58126
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353857 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353821 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Avoid this warning:
llvm/clang-tools-extra/clangd/ClangdServer.cpp:365:23: warning: lambda
capture 'this' is not used [-Wunused-lambda-capture]
auto Action = [Sel, this](decltype(CB) CB, std::string File,
~~^~~~
1 warning generated.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353760 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
This patch contains two parts:
1) reverts commit r353306.
2) move the format logic out from tweaks, keep tweaks API unchanged.
Reviewers: sammccall, ilya-biryukov
Reviewed By: ilya-biryukov
Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D58051
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353712 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
For example, if an index symbol has location in a .proto file and an AST symbol
has location in a generated .proto.h file, then we prefer location in .proto
which is more meaningful to users.
Also use `mergeSymbols` to get the preferred location between AST location and index location in go-to-def.
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D58037
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353708 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Reviewers: hokein
Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57950
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353696 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353694 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
SystemHeaderMappings were added only after takeIncludes call, which
resulted in getting mapping on main file ast updates but not on preamble ast
updates.
Fixes https://github.com/clangd/clangd/issues/8
Reviewers: hokein
Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D58029
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353687 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
The modernize-use-default-member-init check crashes when trying to
create an assignment value for a value-initialized enum because it isn't a
BuiltinType.
An enum cannot be initialized by assigning 0 to it unless a cast is added.
It could be initialized with an enumerator with the value 0, but there might not
be one.
Avoid these issues by ignoring the UseAssignment setting for value-initialized
enums.
Fixes PR35050.
Reviewers: aaron.ballman, alexfh, JonasToth
Reviewed By: JonasToth
Subscribers: xazax.hun, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57852
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353554 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
argument comments to literals
bugprone-argument-comment only supports identifying those comments which do not match the function parameter name
This revision add 3 options to adding missing argument comments to literals (granularity on type is added to control verbosity of fixit)
```
CheckOptions:
- key: bugprone-argument-comment.CommentBoolLiterals
value: '1'
- key: bugprone-argument-comment.CommentFloatLiterals
value: '1'
- key: bugprone-argument-comment.CommentIntegerLiterals
value: '1'
- key: bugprone-argument-comment.CommentStringLiterals
value: '1'
- key: bugprone-argument-comment.CommentCharacterLiterals
value: '1'
- key: bugprone-argument-comment.CommentUserDefinedLiterals
value: '1'
- key: bugprone-argument-comment.CommentNullPtrs
value: '1'
```
After applying these options, literal arguments will be preceded with /*ParameterName=*/
Reviewers: JonasToth, Eugene.Zelenko, alexfh, hokein, aaron.ballman
Reviewed By: aaron.ballman, Eugene.Zelenko
Differential Revision: https://reviews.llvm.org/D57674
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353535 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Fix placement of comma from previous (test) commit.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353525 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353523 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary: https://github.com/clangd/clangd/issues/7
Reviewers: sammccall, hokein
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57944
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353514 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Reviewers: sammccall
Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits
Differential Revision: https://reviews.llvm.org/D57392
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353423 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
physical cores.
Summary:
clangd is using as many threads as logical cores for BackgroundIndex
by default. We observed that it increases latency of foreground tasks.
This patch aims to change that default to number of physical cores to get rid of
that extra latency.
Reviewers: ilya-biryukov
Reviewed By: ilya-biryukov
Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57819
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353422 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
The assertion is triggered when the Decl is null.
Details for the assertion:
F0207 09:55:09.069385 47308 logging.cc:84] assert.h assertion failed at llvm/include/llvm/Support/Casting.h:105 in static bool llvm::isa_impl_cl<clang::TranslationUnitDecl, const clang:: Decl *>::doit(const From *) [To = clang::TranslationUnitDecl, From = const clang::Decl *]: Val && "isa<> used on a null pointer"
15 *** Check failure stack trace: ***
19 @ 0x55615c1f7e06 __assert_fail
20 @ 0x55615a6297d8 clang::clangd::(anonymous namespace)::SelectionVisitor::TraverseDecl()
21 @ 0x55615a62f48d clang::RecursiveASTVisitor<>::TraverseTemplateTemplateParmDecl()
22 @ 0x55615a62b264 clang::RecursiveASTVisitor<>::TraverseDecl()
23 @ 0x55615a62979c clang::clangd::(anonymous namespace)::SelectionVisitor::TraverseDecl()
24 @ 0x55615a63060c clang::RecursiveASTVisitor<>::TraverseClassTemplatePartialSpecializationDecl()
25 @ 0x55615a62ae45 clang::RecursiveASTVisitor<>::TraverseDecl()
Reviewers: sammccall
Subscribers: javed.absar, kristof.beyls, ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57879
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353421 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353415 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Memory usage for a sample TU:
Without Dex: 17.9M
With Dex: 24.4M
The memory increase is considerable but seems tolerable.
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57878
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353413 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
There was an extra semicolon that was somehow working in some contexts.
Patch by oleg.smolsky.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353389 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353382 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
This adds include-fixer feature into clangd based on D56903. Clangd now captures
diagnostics caused by typos and attach include insertion fixes to potentially
fix the typo.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: cfe-commits, kadircet, arphaman, mgrang, jkorous, MaskRay, javed.absar, ilya-biryukov, mgorny
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57021
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353380 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
The check should ignore the main function, the program entry point.
It is not possible to use `std::array<>` for the `argv`.
The alternative is to use `char** argv`.
Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=40604 | PR40604 ]]
Reviewers: JonasToth, aaron.ballman
Reviewed By: aaron.ballman
Subscribers: xazax.hun, hans, cfe-commits
Tags: #clang-tools-extra, #clang
Differential Revision: https://reviews.llvm.org/D57787
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353327 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
No noticeable impact on code completions overall except some improvement on
cross-namespace completion.
Reviewers: sammccall, ilya-biryukov
Reviewed By: sammccall
Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57815
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353310 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
CHANGELOG:
- activate the extension on ObjC files.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353309 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353306 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
The version bumps are a result of running `npm audit`, which found
3 security issues in previous versions of our dependencies.
Also add 'package-lock.json' to the repo, it's a common practice to
check in those files into the repository to get consistent versions of
dependencies when running on different machines.
Reviewers: hokein
Reviewed By: hokein
Subscribers: dschuff, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57814
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353296 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary: Thanks to Andreas Ostermeyer for raising this on the mailing list.
Reviewers: hokein
Reviewed By: hokein
Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57813
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353295 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Reviewers: sammccall
Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57746
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353284 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Reviewers: ilya-biryukov
Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57755
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353283 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
clang-tidy's modernize-use-default-member-init was crashing for unions
with an existing default member initializer.
Fixes PR40492
Reviewers: aaron.ballman, alexfh, JonasToth
Reviewed By: JonasToth
Subscribers: JonasToth, riccibruno, xazax.hun, cfe-commits
Tags: #clang, #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D57665
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353092 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: https://reviews.llvm.org/D57353
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353079 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
This enables include insertion by adding canonical includes into
preambledata.
Reviewers: ioeric, ilya-biryukov
Subscribers: javed.absar, MaskRay, jkorous, arphaman, cfe-commits
Differential Revision: https://reviews.llvm.org/D57508
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353054 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
CHANGELOG:
- cleanup filestatus caches when clangd crashes
- extension workwith LSP v3.14.0, support go-to-declaration feature
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353027 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This allows us to use latest LSP v3.14.0 (for go-to-declaration feature).
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353026 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@352991 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@352990 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@352969 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Implicit functions are outside the control of source authors and should
be exempt from style restrictions.
Tested via running clang tools tests.
Reviewers: aaron.ballman
Reviewed By: aaron.ballman
Subscribers: xazax.hun, cfe-commits
Differential Revision: https://reviews.llvm.org/D57207
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@352968 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@352964 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@352957 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
between definition and declaration location when they are distinct.
Summary:
This helps minimize the disruption of not returning declarations as part of
a find-definition response (r352864).
Reviewers: hokein
Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, ilya-biryukov
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57580
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@352953 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
This reduces the per-check implementation burden and redundant work.
It also makes checks range-aware by default (treating the commonAncestor
as if it were a point selection should be good baseline behavior).
Reviewers: ilya-biryukov
Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57570
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@352876 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
The primary problem this solves is to expose the codeAction selection to
AST-based refactorings in a way that makes it easy and efficient for them to
bind to the right parts of the AST.
It should also allow us to make XRefs based features (textDocument/definition)
more robust, more easily implement textDocument/typeDefinition etc.
As an example, template parameter references can be identified without special
handling.
There should be slight speedup too: we can prune most of the AST traversal
in most cases.
Elephant in the room: this is similar-but-different to Tooling/Refactoring/ASTSelection.
That captures a smaller set of AST nodes, has a slightly different way of
representing selections, and generally has mare features and does more work.
The overall shape is pretty similar, and yet I can't quite get to behave as I
expect.
Reviewers: ilya-biryukov, kadircet
Subscribers: mgorny, ioeric, MaskRay, jkorous, mgrang, arphaman
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57562
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@352875 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
The primary problem this solves is to expose the codeAction selection to
AST-based refactorings in a way that makes it easy and efficient for them to
bind to the right parts of the AST.
It should also allow us to make XRefs based features (textDocument/definition)
more robust, more easily implement textDocument/typeDefinition etc.
As an example, template parameter references can be identified without special
handling.
There should be slight speedup too: we can prune most of the AST traversal
in most cases.
Elephant in the room: this is similar-but-different to Tooling/Refactoring/ASTSelection.
That captures a smaller set of AST nodes, has a slightly different way of
representing selections, and generally has mare features and does more work.
The overall shape is pretty similar, and yet I can't quite get to behave as I
expect.
Reviewers: ilya-biryukov, kadircet
Subscribers: mgorny, ioeric, MaskRay, jkorous, mgrang, arphaman
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57562
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@352874 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Patch by Nathan Ridge!
Differential Revision: https://reviews.llvm.org/D56653
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@352868 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
LSP now reflects the declaration/definition distinction.
Language server changes:
- textDocument/definition now returns a definition if one is found, otherwise
the declaration. It no longer returns declaration + definition if they are
distinct.
- textDocument/declaration returns the best declaration we can find.
- For macros, the active macro definition is returned for both methods.
- For include directive, the top of the target file is returned for both.
There doesn't appear to be a discovery mechanism (we can't return everything to
clients that only know about definition), so this changes existing behavior.
In practice, it should greatly reduce the fraction of the time we need to show
the user a menu of options.
C++ API changes:
- findDefinitions is replaced by locateSymbolAt, which returns a
vector<LocatedSymbol> - one for each symbol under the cursor.
- this contains the preferred declaration, the definition (if found), and
the symbol name
This API enables some potentially-neat extensions, like swapping between decl
and def, and exposing the symbol name to the UI in the case of multiple symbols.
Reviewers: hokein
Subscribers: ilya-biryukov, javed.absar, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Differential Revision: https://reviews.llvm.org/D57388
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@352864 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@352863 91177308-0d34-0410-b5e6-96231b3b80d8
|