Skip to content

Commit

Permalink
Merge tag 'llvmorg-11.0.0-rc3' into rustc/11.0-2020-08-20
Browse files Browse the repository at this point in the history
Tag 11.0.0-rc3
  • Loading branch information
cuviper committed Sep 22, 2020
2 parents a78defc + 8aca41f commit d5e220f
Show file tree
Hide file tree
Showing 324 changed files with 7,861 additions and 4,279 deletions.
2 changes: 1 addition & 1 deletion clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def get_tidy_invocation(f, clang_tidy_binary, checks, tmpdir, build_path,
extra_arg, extra_arg_before, quiet, config):
"""Gets a command line for clang-tidy."""
start = [clang_tidy_binary]
if allow_enabling_alpha_checkers is not None:
if allow_enabling_alpha_checkers:
start.append('-allow-enabling-analyzer-alpha-checkers')
if header_filter is not None:
start.append('-header-filter=' + header_filter)
Expand Down
5 changes: 4 additions & 1 deletion clang-tools-extra/clangd/ClangdLSPServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,10 @@ void ClangdLSPServer::onInitialize(const InitializeParams &Params,
{"codeActionProvider", std::move(CodeActionProvider)},
{"completionProvider",
llvm::json::Object{
{"allCommitCharacters", " \t()[]{}<>:;,+-/*%^&#?.=\"'|"},
{"allCommitCharacters",
{" ", "\t", "(", ")", "[", "]", "{", "}", "<",
">", ":", ";", ",", "+", "-", "/", "*", "%",
"^", "&", "#", "?", ".", "=", "\"", "'", "|"}},
{"resolveProvider", false},
// We do extra checks, e.g. that > is part of ->.
{"triggerCharacters", {".", "<", ">", ":", "\"", "/"}},
Expand Down
1 change: 1 addition & 0 deletions clang-tools-extra/clangd/ConfigYAML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class Parser {
DictParser Dict("Config", this);
Dict.handle("If", [&](Node &N) { parse(F.If, N); });
Dict.handle("CompileFlags", [&](Node &N) { parse(F.CompileFlags, N); });
Dict.handle("Index", [&](Node &N) { parse(F.Index, N); });
Dict.parse(N);
return !(N.failed() || HadError);
}
Expand Down
30 changes: 29 additions & 1 deletion clang-tools-extra/clangd/test/initialize-params.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,35 @@
# CHECK-NEXT: "capabilities": {
# CHECK-NEXT: "codeActionProvider": true,
# CHECK-NEXT: "completionProvider": {
# CHECK-NEXT: "allCommitCharacters": " \t()[]{}<>:;,+-/*%^&#?.=\"'|",
# CHECK-NEXT: "allCommitCharacters": [
# CHECK-NEXT: " ",
# CHECK-NEXT: "\t",
# CHECK-NEXT: "(",
# CHECK-NEXT: ")",
# CHECK-NEXT: "[",
# CHECK-NEXT: "]",
# CHECK-NEXT: "{",
# CHECK-NEXT: "}",
# CHECK-NEXT: "<",
# CHECK-NEXT: ">",
# CHECK-NEXT: ":",
# CHECK-NEXT: ";",
# CHECK-NEXT: ",",
# CHECK-NEXT: "+",
# CHECK-NEXT: "-",
# CHECK-NEXT: "/",
# CHECK-NEXT: "*",
# CHECK-NEXT: "%",
# CHECK-NEXT: "^",
# CHECK-NEXT: "&",
# CHECK-NEXT: "#",
# CHECK-NEXT: "?",
# CHECK-NEXT: ".",
# CHECK-NEXT: "=",
# CHECK-NEXT: "\"",
# CHECK-NEXT: "'",
# CHECK-NEXT: "|"
# CHECK-NEXT: ],
# CHECK-NEXT: "resolveProvider": false,
# CHECK-NEXT: "triggerCharacters": [
# CHECK-NEXT: ".",
Expand Down
17 changes: 11 additions & 6 deletions clang-tools-extra/clangd/unittests/ConfigYAMLTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,21 @@ CompileFlags: { Add: [foo, bar] }
Add: |
b
az
---
Index:
Background: Skip
)yaml";
auto Results = Fragment::parseYAML(YAML, "config.yaml", Diags.callback());
EXPECT_THAT(Diags.Diagnostics, IsEmpty());
ASSERT_EQ(Results.size(), 2u);
EXPECT_FALSE(Results.front().If.HasUnrecognizedCondition);
EXPECT_THAT(Results.front().If.PathMatch, ElementsAre(Val("abc")));
EXPECT_THAT(Results.front().CompileFlags.Add,
ElementsAre(Val("foo"), Val("bar")));
ASSERT_EQ(Results.size(), 3u);
EXPECT_FALSE(Results[0].If.HasUnrecognizedCondition);
EXPECT_THAT(Results[0].If.PathMatch, ElementsAre(Val("abc")));
EXPECT_THAT(Results[0].CompileFlags.Add, ElementsAre(Val("foo"), Val("bar")));

EXPECT_THAT(Results[1].CompileFlags.Add, ElementsAre(Val("b\naz\n")));

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

TEST(ParseYAML, Locations) {
Expand Down
60 changes: 3 additions & 57 deletions clang-tools-extra/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
====================================================
Extra Clang Tools 11.0.0 (In-Progress) Release Notes
====================================================
======================================
Extra Clang Tools 11.0.0 Release Notes
======================================

.. contents::
:local:
:depth: 3

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

.. warning::

These are in-progress notes for the upcoming Extra Clang Tools 11 release.
Release notes for previous releases can be found on
`the Download Page <https://releases.llvm.org/download.html>`_.

Introduction
============

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

Note that if you are reading this file from a Git checkout or the
main Clang web page, this document applies to the *next* release, not
the current one. To see the release notes for a specific release, please
see the `releases page <https://llvm.org/releases/>`_.

What's New in Extra Clang Tools 11.0.0?
=======================================

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

Major New Features
------------------

...

Improvements to clangd
----------------------

Expand Down Expand Up @@ -238,21 +222,6 @@ Miscellaneous

- Too many stability and correctness fixes to mention.

Improvements to clang-doc
-------------------------

The improvements are...

Improvements to clang-query
---------------------------

The improvements are...

Improvements to clang-rename
----------------------------

The improvements are...

Improvements to clang-tidy
--------------------------

Expand Down Expand Up @@ -439,26 +408,3 @@ Other improvements

- For `run-clang-tidy.py` add option to use alpha checkers from
`clang-analyzer`.

Improvements to include-fixer
-----------------------------

The improvements are...

Improvements to clang-include-fixer
-----------------------------------

The improvements are...

Improvements to modularize
--------------------------

The improvements are...

Improvements to pp-trace
------------------------

The improvements are...

Clang-tidy visual studio plugin
-------------------------------
2 changes: 1 addition & 1 deletion clang/docs/CommandGuide/clang.rst
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ Code Generation Options
:option:`-Og` Like :option:`-O1`. In future versions, this option might
disable different optimizations in order to improve debuggability.

:option:`-O` Equivalent to :option:`-O2`.
:option:`-O` Equivalent to :option:`-O1`.

:option:`-O4` and higher

Expand Down
10 changes: 10 additions & 0 deletions clang/docs/LTOVisibility.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ other classes receive hidden LTO visibility. Classes with internal linkage
(e.g. classes declared in unnamed namespaces) also receive hidden LTO
visibility.

During the LTO link, all classes with public LTO visibility will be refined
to hidden LTO visibility when the ``--lto-whole-program-visibility`` lld linker
option is applied (``-plugin-opt=whole-program-visibility`` for gold). This flag
can be used to defer specifying whether classes have hidden LTO visibility until
link time, to allow bitcode objects to be shared by different LTO links.
Due to an implementation limitation, symbols associated with classes with hidden
LTO visibility may still be exported from the binary when using this flag. It is
unsafe to refer to these symbols, and their visibility may be relaxed to hidden
in a future compiler release.

A class defined in a translation unit built without LTO receives public
LTO visibility regardless of its object file visibility, linkage or other
attributes.
Expand Down
Loading

0 comments on commit d5e220f

Please sign in to comment.