Skip to content

Commit d5e220f

Browse files
committed
Merge tag 'llvmorg-11.0.0-rc3' into rustc/11.0-2020-08-20
Tag 11.0.0-rc3
2 parents a78defc + 8aca41f commit d5e220f

File tree

324 files changed

+7861
-4279
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

324 files changed

+7861
-4279
lines changed

clang-tools-extra/clang-tidy/tool/run-clang-tidy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def get_tidy_invocation(f, clang_tidy_binary, checks, tmpdir, build_path,
8484
extra_arg, extra_arg_before, quiet, config):
8585
"""Gets a command line for clang-tidy."""
8686
start = [clang_tidy_binary]
87-
if allow_enabling_alpha_checkers is not None:
87+
if allow_enabling_alpha_checkers:
8888
start.append('-allow-enabling-analyzer-alpha-checkers')
8989
if header_filter is not None:
9090
start.append('-header-filter=' + header_filter)

clang-tools-extra/clangd/ClangdLSPServer.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,10 @@ void ClangdLSPServer::onInitialize(const InitializeParams &Params,
592592
{"codeActionProvider", std::move(CodeActionProvider)},
593593
{"completionProvider",
594594
llvm::json::Object{
595-
{"allCommitCharacters", " \t()[]{}<>:;,+-/*%^&#?.=\"'|"},
595+
{"allCommitCharacters",
596+
{" ", "\t", "(", ")", "[", "]", "{", "}", "<",
597+
">", ":", ";", ",", "+", "-", "/", "*", "%",
598+
"^", "&", "#", "?", ".", "=", "\"", "'", "|"}},
596599
{"resolveProvider", false},
597600
// We do extra checks, e.g. that > is part of ->.
598601
{"triggerCharacters", {".", "<", ">", ":", "\"", "/"}},

clang-tools-extra/clangd/ConfigYAML.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class Parser {
3838
DictParser Dict("Config", this);
3939
Dict.handle("If", [&](Node &N) { parse(F.If, N); });
4040
Dict.handle("CompileFlags", [&](Node &N) { parse(F.CompileFlags, N); });
41+
Dict.handle("Index", [&](Node &N) { parse(F.Index, N); });
4142
Dict.parse(N);
4243
return !(N.failed() || HadError);
4344
}

clang-tools-extra/clangd/test/initialize-params.test

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,35 @@
77
# CHECK-NEXT: "capabilities": {
88
# CHECK-NEXT: "codeActionProvider": true,
99
# CHECK-NEXT: "completionProvider": {
10-
# CHECK-NEXT: "allCommitCharacters": " \t()[]{}<>:;,+-/*%^&#?.=\"'|",
10+
# CHECK-NEXT: "allCommitCharacters": [
11+
# CHECK-NEXT: " ",
12+
# CHECK-NEXT: "\t",
13+
# CHECK-NEXT: "(",
14+
# CHECK-NEXT: ")",
15+
# CHECK-NEXT: "[",
16+
# CHECK-NEXT: "]",
17+
# CHECK-NEXT: "{",
18+
# CHECK-NEXT: "}",
19+
# CHECK-NEXT: "<",
20+
# CHECK-NEXT: ">",
21+
# CHECK-NEXT: ":",
22+
# CHECK-NEXT: ";",
23+
# CHECK-NEXT: ",",
24+
# CHECK-NEXT: "+",
25+
# CHECK-NEXT: "-",
26+
# CHECK-NEXT: "/",
27+
# CHECK-NEXT: "*",
28+
# CHECK-NEXT: "%",
29+
# CHECK-NEXT: "^",
30+
# CHECK-NEXT: "&",
31+
# CHECK-NEXT: "#",
32+
# CHECK-NEXT: "?",
33+
# CHECK-NEXT: ".",
34+
# CHECK-NEXT: "=",
35+
# CHECK-NEXT: "\"",
36+
# CHECK-NEXT: "'",
37+
# CHECK-NEXT: "|"
38+
# CHECK-NEXT: ],
1139
# CHECK-NEXT: "resolveProvider": false,
1240
# CHECK-NEXT: "triggerCharacters": [
1341
# CHECK-NEXT: ".",

clang-tools-extra/clangd/unittests/ConfigYAMLTests.cpp

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,21 @@ CompileFlags: { Add: [foo, bar] }
4747
Add: |
4848
b
4949
az
50+
---
51+
Index:
52+
Background: Skip
5053
)yaml";
5154
auto Results = Fragment::parseYAML(YAML, "config.yaml", Diags.callback());
5255
EXPECT_THAT(Diags.Diagnostics, IsEmpty());
53-
ASSERT_EQ(Results.size(), 2u);
54-
EXPECT_FALSE(Results.front().If.HasUnrecognizedCondition);
55-
EXPECT_THAT(Results.front().If.PathMatch, ElementsAre(Val("abc")));
56-
EXPECT_THAT(Results.front().CompileFlags.Add,
57-
ElementsAre(Val("foo"), Val("bar")));
56+
ASSERT_EQ(Results.size(), 3u);
57+
EXPECT_FALSE(Results[0].If.HasUnrecognizedCondition);
58+
EXPECT_THAT(Results[0].If.PathMatch, ElementsAre(Val("abc")));
59+
EXPECT_THAT(Results[0].CompileFlags.Add, ElementsAre(Val("foo"), Val("bar")));
60+
61+
EXPECT_THAT(Results[1].CompileFlags.Add, ElementsAre(Val("b\naz\n")));
5862

59-
EXPECT_THAT(Results.back().CompileFlags.Add, ElementsAre(Val("b\naz\n")));
63+
ASSERT_TRUE(Results[2].Index.Background);
64+
EXPECT_EQ("Skip", *Results[2].Index.Background.getValue());
6065
}
6166

6267
TEST(ParseYAML, Locations) {

clang-tools-extra/docs/ReleaseNotes.rst

Lines changed: 3 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
1-
====================================================
2-
Extra Clang Tools 11.0.0 (In-Progress) Release Notes
3-
====================================================
1+
======================================
2+
Extra Clang Tools 11.0.0 Release Notes
3+
======================================
44

55
.. contents::
66
:local:
77
:depth: 3
88

99
Written by the `LLVM Team <https://llvm.org/>`_
1010

11-
.. warning::
12-
13-
These are in-progress notes for the upcoming Extra Clang Tools 11 release.
14-
Release notes for previous releases can be found on
15-
`the Download Page <https://releases.llvm.org/download.html>`_.
16-
1711
Introduction
1812
============
1913

@@ -27,23 +21,13 @@ For more information about Clang or LLVM, including information about
2721
the latest release, please see the `Clang Web Site <https://clang.llvm.org>`_ or
2822
the `LLVM Web Site <https://llvm.org>`_.
2923

30-
Note that if you are reading this file from a Git checkout or the
31-
main Clang web page, this document applies to the *next* release, not
32-
the current one. To see the release notes for a specific release, please
33-
see the `releases page <https://llvm.org/releases/>`_.
34-
3524
What's New in Extra Clang Tools 11.0.0?
3625
=======================================
3726

3827
Some of the major new features and improvements to Extra Clang Tools are listed
3928
here. Generic improvements to Extra Clang Tools as a whole or to its underlying
4029
infrastructure are described first, followed by tool-specific sections.
4130

42-
Major New Features
43-
------------------
44-
45-
...
46-
4731
Improvements to clangd
4832
----------------------
4933

@@ -238,21 +222,6 @@ Miscellaneous
238222

239223
- Too many stability and correctness fixes to mention.
240224

241-
Improvements to clang-doc
242-
-------------------------
243-
244-
The improvements are...
245-
246-
Improvements to clang-query
247-
---------------------------
248-
249-
The improvements are...
250-
251-
Improvements to clang-rename
252-
----------------------------
253-
254-
The improvements are...
255-
256225
Improvements to clang-tidy
257226
--------------------------
258227

@@ -439,26 +408,3 @@ Other improvements
439408

440409
- For `run-clang-tidy.py` add option to use alpha checkers from
441410
`clang-analyzer`.
442-
443-
Improvements to include-fixer
444-
-----------------------------
445-
446-
The improvements are...
447-
448-
Improvements to clang-include-fixer
449-
-----------------------------------
450-
451-
The improvements are...
452-
453-
Improvements to modularize
454-
--------------------------
455-
456-
The improvements are...
457-
458-
Improvements to pp-trace
459-
------------------------
460-
461-
The improvements are...
462-
463-
Clang-tidy visual studio plugin
464-
-------------------------------

clang/docs/CommandGuide/clang.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ Code Generation Options
385385
:option:`-Og` Like :option:`-O1`. In future versions, this option might
386386
disable different optimizations in order to improve debuggability.
387387

388-
:option:`-O` Equivalent to :option:`-O2`.
388+
:option:`-O` Equivalent to :option:`-O1`.
389389

390390
:option:`-O4` and higher
391391

clang/docs/LTOVisibility.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@ other classes receive hidden LTO visibility. Classes with internal linkage
3535
(e.g. classes declared in unnamed namespaces) also receive hidden LTO
3636
visibility.
3737

38+
During the LTO link, all classes with public LTO visibility will be refined
39+
to hidden LTO visibility when the ``--lto-whole-program-visibility`` lld linker
40+
option is applied (``-plugin-opt=whole-program-visibility`` for gold). This flag
41+
can be used to defer specifying whether classes have hidden LTO visibility until
42+
link time, to allow bitcode objects to be shared by different LTO links.
43+
Due to an implementation limitation, symbols associated with classes with hidden
44+
LTO visibility may still be exported from the binary when using this flag. It is
45+
unsafe to refer to these symbols, and their visibility may be relaxed to hidden
46+
in a future compiler release.
47+
3848
A class defined in a translation unit built without LTO receives public
3949
LTO visibility regardless of its object file visibility, linkage or other
4050
attributes.

0 commit comments

Comments
 (0)