| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Some of the checks were activated in the Clang-Tidy
standalone application but were not in the plugin.
Change-Id: I6b6fa01093ae1096c24bf1c47405a5d8480f3e86
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Mingw miscompiles one of the static variables
in Clang-Tidy which results in clang driver
wrong return codes. Making it a local static
variable solves the issue.
Change-Id: I438e1b8d644c742204e88e101c76fd188884089f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
| |
Provide special extra flag for Clazy to make it know
it's built inside clang sources and add it's folder
as tools/extra subfolder.
Change-Id: I3feaff67fbbf8016c09dd88737398417581e6ae9
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/branches/release_60@326199 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/branches/release_60@325789 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
------------------------------------------------------------------------
r323040 | dim | 2018-01-20 15:34:33 +0100 (Sat, 20 Jan 2018) | 5 lines
Assume the shared library path variable is LD_LIBRARY_PATH on systems
except Darwin and Windows. This prevents inserting an environment
variable with an empty name (which is illegal and leads to a Python
exception) on any of the BSDs.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/branches/release_60@324871 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
------------------------------------------------------------------------
r321762 | juliehockett | 2018-01-03 14:10:11 -0800 (Wed, 03 Jan 2018) | 8 lines
[clang-tidy] Update fuchsia-overloaded-operator to check for valid loc
Updating fuchsia-overloaded-operator check to not issue warnings for
invalid locations.
Fixes PR35803.
Differential Revision: https://reviews.llvm.org/D41708
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/branches/release_60@321800 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/branches/release_60@321719 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
| |
It was previously set to an identifier that the user typed, leading to
surprising behavior in VSCode (probably in other editors too).
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321554 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
| |
Some output changes from uppercase hex to lowercase hex, no other functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321526 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321525 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321523 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: To make building preambles faster and keep them smaller.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D41495
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321521 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This improves a few things:
- the insert -> freeze -> read sequence is now enforced/communicated by the
type system
- SymbolSlab::const_iterator iterates over symbols, not over id-symbol pairs
- we avoid permanently storing a second copy of the IDs, and the
string map's hashtable
The slab size is now down to 21.8MB for the LLVM project.
Of this only 2.7MB is strings, the rest is #symbols * `sizeof(Symbol)`.
`sizeof(Symbol)` is currently 96, which seems too big - I think
SymbolInfo isn't efficiently packed. That's a topic for another patch!
Also added simple API to see the memory usage/#symbols of a slab, since
it seems likely we will continue to care about this.
Reviewers: ilya-biryukov
Subscribers: klimek, mgrang, cfe-commits
Differential Revision: https://reviews.llvm.org/D41506
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321412 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
| |
Fixing parameters in clang-tidy fuchsia-overloaded-operator test case
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321378 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a check to the Fuchsia module to warn if an operator is overloaded,
except move and copy operators.
See https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md for
reference.
Differential Revision: https://reviews.llvm.org/D41363
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321363 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The tools is used to generate global symbols for clangd (global code completion),
The format is YAML, which is only for **experiment**.
Usage:
./bin/global-symbol-builder </path/to/llvm-dir> > global-symbols.yaml
TEST:
used the tool to generate global symbols for LLVM (~72MB).
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: klimek, mgorny, ilya-biryukov, cfe-commits
Differential Revision: https://reviews.llvm.org/D41491
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321358 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321350 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321348 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321323 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321302 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
| |
Found by asan.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321286 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Symbols are not self-contained - it's only safe to hand them out if you
guarantee the lifetime of the underlying data.
Before this lands, I'm going to measure the before/after memory usage of the
LLVM index loaded into memory in a single slab.
Reviewers: hokein
Subscribers: klimek, ilya-biryukov, cfe-commits
Differential Revision: https://reviews.llvm.org/D41483
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321272 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321267 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
extension.
Summary:
Previously, we use a separate GitHub repository (https://github.com/llvm-vs-code-extensions/vscode-clangd)
for publishing `vscode-clangd` extension to marketplace.
To reduce the maintain burden, we will use the vscode extension in the
clang-tools-extra, and deprecate the one on GitHub.
Test in https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.clangd-vscode-test
Reviewers: sammccall, krasimir
Reviewed By: sammccall
Subscribers: klimek, ilya-biryukov, cfe-commits
Differential Revision: https://reviews.llvm.org/D41391
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321252 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
| |
Build was broken by r321092.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321226 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
| |
unit test.
Reviewers: sammccall
Subscribers: klimek, mgorny, ilya-biryukov, cfe-commits
Differential Revision: https://reviews.llvm.org/D41450
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321193 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321192 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The goal here is again to make it easier to read and write the tests.
I've extracted `parseTextMarker` from CodeCompleteTests into an `Annotations`
class, adding features to it:
- as well as points `^s` it allows ranges `[[...]]`
- multiple points and ranges are supported
- points and ranges may be named: `$name^` and `$name[[...]]`
These features are used for the xrefs tests. This also paves the way for
replacing the lit diagnostics.test with more readable unit tests, using named
ranges.
Alternative considered: `TestSelectionRange` in clang-refactor/TestSupport
Main problems were:
- delimiting the end of ranges is awkward, requiring counting
- comment syntax is long and at least as cryptic for most cases
- no separate syntax for point vs range, which keeps xrefs tests concise
- Still need to convert to Position everywhere
- Still need helpers for common case of expecting exactly one point/range
(I'll probably promote the extra `PrintTo`s from some of the core Protocol types
into `operator<<` in `Protocol.h` itself in a separate, prior patch...)
Reviewers: ioeric
Subscribers: klimek, mgorny, ilya-biryukov, cfe-commits
Differential Revision: https://reviews.llvm.org/D41432
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321184 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321173 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321169 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bitwise operator expressions
Examples:
* Always evaluates to 0:
```
int X;
if (0 & X) return;
```
* Always evaluates to ~0:
```
int Y;
if (Y | ~0) return;
```
* The symbol is unmodified:
```
int Z;
Z &= ~0;
```
Patch by: Lilla Barancsuk!
Differential Revision: https://reviews.llvm.org/D39285
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321168 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321161 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321157 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321156 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
We use Diagnostic as a key to find the corresponding FixIt when we do
the "apply-fix", but the "severity" field could be omitted, in some cases,
the codeAction request sent from LSP clients (e.g. VScode) doesn't include the
`severity` field, which makes clangd fail to find the FixIt.
Test the following code in VScode, before the fix, no FixIt shown.
```
void main() {}
^~~~
```
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: klimek, ilya-biryukov, cfe-commits
Differential Revision: https://reviews.llvm.org/D41280
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321106 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321094 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: klimek, ilya-biryukov, cfe-commits
Differential Revision: https://reviews.llvm.org/D41289
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321092 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
| |
Going to add unit tests in the next patch. (Haha!) But seriously there's
some work to do first - need to extract the markers-in-source-code
parser from CodeComplete test and make it more flexible, to allow
annotated ranges etc.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321087 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321086 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Use symbol index to populate completion results for qualfified IDs e.g. "nx::A^".
Reviewers: ilya-biryukov, sammccall
Reviewed By: ilya-biryukov, sammccall
Subscribers: rwols, klimek, mgorny, cfe-commits, sammccall
Differential Revision: https://reviews.llvm.org/D41281
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321083 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
- Moved these functions to SourceCode.h
- added unit tests
- fix off by one in positionToOffset: Offset - 1 in final calculation was wrong
- fixed formatOnType which had an equal and opposite off-by-one
- positionToOffset and offsetToPosition both consistently clamp to beginning/end
of file when input is out of range
- gave variables more descriptive names
- removed windows line ending fixmes where there is nothing to fix
- elaborated on UTF-8 fixmes
This will conflict with Eric's D41281, but in a pretty easy-to-resolve way.
Reviewers: ioeric
Subscribers: klimek, mgorny, ilya-biryukov, cfe-commits
Differential Revision: https://reviews.llvm.org/D41351
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321073 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: When scopes are specified, only match symbols from scopes.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: klimek, ilya-biryukov, cfe-commits
Differential Revision: https://reviews.llvm.org/D41367
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321067 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
| |
are smoke only.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321065 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321016 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
- Some features were implemented so mark them as such.
- Add installation instructions (LLVM debian packages)
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewers: jkorous-apple
Reviewed By: jkorous-apple
Subscribers: jkorous-apple, klimek, ilya-biryukov, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D41306
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@320988 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The filtering wasn't previously working as intended - the string list is
interpreted as a list of editor modes, not file extensions.
(It happens to mostly work as "c" and "cpp" are the names of modes, but we're
missing objective-c)
The file: restriction is new - clangd needs to be able to convert URI<->path
in order to determine how to build.
Reviewers: hokein
Subscribers: klimek, ilya-biryukov, cfe-commits
Differential Revision: https://reviews.llvm.org/D41343
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@320972 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a check to the Fuchsia module to warn if classes are defined
with virtual inheritance.
See https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md for
reference.
Differential Revision: https://reviews.llvm.org/D40813
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@320841 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: klimek, mgorny, ilya-biryukov, cfe-commits
Differential Revision: https://reviews.llvm.org/D41276
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@320807 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
| |
Clang-format categorizes and sorts #includes with style. It doesn't make sense
to manually managing #include blocks.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@320743 91177308-0d34-0410-b5e6-96231b3b80d8
|