aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-02-24 21:27:39 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-02-24 21:27:39 +0000
commit93179bb90b8042f256bd2adc00b7e39ef42869c4 (patch)
tree31a923f5304528d512a2d514b25236c67941c9df
parent6eea8b8c1aad853d6161709d8b3035dfd867fa1c (diff)
downloadsrc-93179bb90b8042f256bd2adc00b7e39ef42869c4.tar.gz
src-93179bb90b8042f256bd2adc00b7e39ef42869c4.zip
Vendor import of clang release_60 branch r325932:vendor/clang/clang-release_60-r325932
Notes
Notes: svn path=/vendor/clang/dist-release_60/; revision=329933 svn path=/vendor/clang/clang-release_60-r325932/; revision=329934; tag=vendor/clang/clang-release_60-r325932
-rw-r--r--docs/ClangCommandLineReference.rst8
-rw-r--r--docs/DiagnosticsReference.rst277
-rw-r--r--docs/ReleaseNotes.rst28
-rw-r--r--lib/Basic/Targets/X86.cpp3
-rw-r--r--lib/Sema/SemaExpr.cpp3
-rw-r--r--test/Preprocessor/predefined-arch-macros.c4
-rw-r--r--test/SemaCXX/lambda-expressions.cpp15
7 files changed, 191 insertions, 147 deletions
diff --git a/docs/ClangCommandLineReference.rst b/docs/ClangCommandLineReference.rst
index 782d225dce12..8a2da51bccbd 100644
--- a/docs/ClangCommandLineReference.rst
+++ b/docs/ClangCommandLineReference.rst
@@ -706,6 +706,10 @@ Print source range spans in numeric form
.. option:: -fdiagnostics-show-category=<arg>
+.. option:: -fexperimental-isel, -fno-experimental-isel
+
+Enables the experimental global instruction selector
+
.. option:: -fexperimental-new-pass-manager, -fno-experimental-new-pass-manager
Enables an experimental new pass manager in LLVM.
@@ -2414,6 +2418,10 @@ X86
.. option:: -mrdseed, -mno-rdseed
+.. option:: -mretpoline, -mno-retpoline
+
+.. option:: -mretpoline-external-thunk, -mno-retpoline-external-thunk
+
.. option:: -mrtm, -mno-rtm
.. option:: -msgx, -mno-sgx
diff --git a/docs/DiagnosticsReference.rst b/docs/DiagnosticsReference.rst
index e2b0bd7dd550..e38c58605f19 100644
--- a/docs/DiagnosticsReference.rst
+++ b/docs/DiagnosticsReference.rst
@@ -806,6 +806,17 @@ Also controls `-Wc++98-compat-bind-to-temporary-copy`_.
+--------------------------------------------------------------------+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
+-Wbinding-in-condition
+----------------------
+This diagnostic is enabled by default.
+
+**Diagnostic text:**
+
++--------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`ISO C++17 does not permit structured binding declaration in a condition`|
++--------------------------------------------------------------------------------------------------------------+
+
+
-Wbitfield-constant-conversion
------------------------------
This diagnostic is enabled by default.
@@ -1402,6 +1413,10 @@ Some of the diagnostics controlled by this flag are enabled by default.
**Diagnostic text:**
++--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`ISO C++ standards before C++17 do not allow new expression for type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to use list-initialization`|
++--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+
+------------------------------------------------------------------------+
|:warning:`warning:` |nbsp| :diagtext:`constexpr if is a C++17 extension`|
+------------------------------------------------------------------------+
@@ -1501,8 +1516,14 @@ Synonym for `-Wc++17-extensions`_.
-Wc++2a-compat
--------------
+Some of the diagnostics controlled by this flag are enabled by default.
+
**Diagnostic text:**
++------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`'<=>' is a single token in C++2a; add a space to avoid a change in behavior`|
++------------------------------------------------------------------------------------------------------------------+
+
+-------------------------------------------------------------------------------------------+
|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' is a keyword in C++2a`|
+-------------------------------------------------------------------------------------------+
@@ -1544,6 +1565,10 @@ Some of the diagnostics controlled by this flag are enabled by default.
|:warning:`warning:` |nbsp| :diagtext:`explicit capture of 'this' with a capture default of '=' is incompatible with C++ standards before C++2a`|
+-----------------------------------------------------------------------------------------------------------------------------------------------+
++-----------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`'<=>' operator is incompatible with C++ standards before C++2a`|
++-----------------------------------------------------------------------------------------------------+
+
-Wc++98-c++11-c++14-c++17-compat-pedantic
-----------------------------------------
@@ -3540,6 +3565,21 @@ Some of the diagnostics controlled by this flag are enabled by default.
+-------------------------------------------------------------------------------------------------+
+-Wexperimental-isel
+-------------------
+This diagnostic is enabled by default.
+
+**Diagnostic text:**
+
++------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`-fexperimental-isel support for the '`:placeholder:`A`:diagtext:`' architecture is incomplete`|
++------------------------------------------------------------------------------------------------------------------------------------+
+
++----------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`-fexperimental-isel support is incomplete for this architecture at the current optimization level`|
++----------------------------------------------------------------------------------------------------------------------------------------+
+
+
-Wexplicit-initialize-call
--------------------------
This diagnostic is enabled by default.
@@ -3564,15 +3604,6 @@ This diagnostic is enabled by default.
+-------------------------------------------------------------------------------------------------------------------------------------+
--Wextended-offsetof
--------------------
-**Diagnostic text:**
-
-+--------------------------------------------------------------------------------------+
-|:warning:`warning:` |nbsp| :diagtext:`using extended field designator is an extension`|
-+--------------------------------------------------------------------------------------+
-
-
-Wextern-c-compat
-----------------
This diagnostic is enabled by default.
@@ -4565,96 +4596,34 @@ This diagnostic is enabled by default.
| |+----------------------------------------------------------------------------------------------------------------+|
| ||:diagtext:`variables and functions` ||
| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`functions and global variables` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`functions, variables, and Objective-C interfaces` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
| ||:diagtext:`functions and methods` ||
| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`parameters` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
| ||:diagtext:`functions, methods and blocks` ||
| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`functions, methods, and classes` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
| ||:diagtext:`functions, methods, and parameters` ||
| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`functions, methods, and global variables` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`classes` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`enums` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
| ||:diagtext:`variables` ||
| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`methods` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`fields and global variables` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`structs` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`parameters and typedefs` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`variables and typedefs` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`thread-local variables` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
| ||:diagtext:`variables and fields` ||
| |+----------------------------------------------------------------------------------------------------------------+|
| ||:diagtext:`variables, data members and tag types` ||
| |+----------------------------------------------------------------------------------------------------------------+|
| ||:diagtext:`types and namespaces` ||
| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`Objective-C interfaces` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`methods and properties` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`functions, methods, and properties` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`struct or union` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`struct, union or class` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`types` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`Objective-C instance methods` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`init methods of interface or class extension declarations` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
| ||:diagtext:`variables, functions and classes` ||
| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`functions, variables, classes, and Objective-C interfaces` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`Objective-C protocols` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`variables with static or thread storage duration` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`functions, methods, properties, and global variables` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`structs, unions, and typedefs` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`structs and typedefs` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`interface or protocol declarations` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
| ||:diagtext:`kernel functions` ||
| |+----------------------------------------------------------------------------------------------------------------+|
| ||:diagtext:`non-K&R-style functions` ||
| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`variables, enums, fields and typedefs` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`functions, methods, enums, and classes` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`structs, classes, variables, functions, and inline namespaces` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
| ||:diagtext:`variables, functions, methods, types, enumerations, enumerators, labels, and non-static data members`||
| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`classes and enumerations` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
-| ||:diagtext:`named declarations` ||
-| |+----------------------------------------------------------------------------------------------------------------+|
+------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+
++----------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute only applies to` |nbsp| :placeholder:`B`|
++----------------------------------------------------------------------------------------------------------------+
+
+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|:warning:`warning:` |nbsp| :diagtext:`attribute` |nbsp| :placeholder:`A` |nbsp| :diagtext:`ignored, because it cannot be applied to omitted return type`|
+--------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -6333,6 +6302,17 @@ This diagnostic is enabled by default.
+----------------------------------------------------------------------------------------------------------+
+-Wmicrosoft-inaccessible-base
+-----------------------------
+This diagnostic is enabled by default.
+
+**Diagnostic text:**
+
++-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`accessing inaccessible direct base` |nbsp| :placeholder:`A` |nbsp| :diagtext:`of` |nbsp| :placeholder:`B` |nbsp| :diagtext:`is a Microsoft extension`|
++-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+
+
-Wmicrosoft-include
-------------------
This diagnostic is enabled by default.
@@ -8075,7 +8055,7 @@ This diagnostic is enabled by default.
-Wpedantic
----------
-Also controls `-Wc++11-extra-semi`_, `-Wc++11-long-long`_, `-Wc++14-binary-literal`_, `-Wc11-extensions`_, `-Wcomplex-component-init`_, `-Wdeclaration-after-statement`_, `-Wdollar-in-identifier-extension`_, `-Wembedded-directive`_, `-Wempty-translation-unit`_, `-Wextended-offsetof`_, `-Wflexible-array-extensions`_, `-Wformat-pedantic`_, `-Wfour-char-constants`_, `-Wgnu-anonymous-struct`_, `-Wgnu-auto-type`_, `-Wgnu-binary-literal`_, `-Wgnu-case-range`_, `-Wgnu-complex-integer`_, `-Wgnu-compound-literal-initializer`_, `-Wgnu-conditional-omitted-operand`_, `-Wgnu-empty-initializer`_, `-Wgnu-empty-struct`_, `-Wgnu-flexible-array-initializer`_, `-Wgnu-flexible-array-union-member`_, `-Wgnu-folding-constant`_, `-Wgnu-imaginary-constant`_, `-Wgnu-include-next`_, `-Wgnu-label-as-value`_, `-Wgnu-redeclared-enum`_, `-Wgnu-statement-expression`_, `-Wgnu-union-cast`_, `-Wgnu-zero-line-directive`_, `-Wgnu-zero-variadic-macro-arguments`_, `-Wimport-preprocessor-directive-pedantic`_, `-Wkeyword-macro`_, `-Wlanguage-extension-token`_, `-Wlong-long`_, `-Wmicrosoft-charize`_, `-Wmicrosoft-comment-paste`_, `-Wmicrosoft-cpp-macro`_, `-Wmicrosoft-end-of-file`_, `-Wmicrosoft-enum-value`_, `-Wmicrosoft-fixed-enum`_, `-Wmicrosoft-flexible-array`_, `-Wmicrosoft-redeclare-static`_, `-Wnested-anon-types`_, `-Wnullability-extension`_, `-Woverlength-strings`_, `-Wretained-language-linkage`_, `-Wundefined-internal-type`_, `-Wvla-extension`_, `-Wzero-length-array`_.
+Also controls `-Wc++11-extra-semi`_, `-Wc++11-long-long`_, `-Wc++14-binary-literal`_, `-Wc11-extensions`_, `-Wcomplex-component-init`_, `-Wdeclaration-after-statement`_, `-Wdollar-in-identifier-extension`_, `-Wembedded-directive`_, `-Wempty-translation-unit`_, `-Wflexible-array-extensions`_, `-Wformat-pedantic`_, `-Wfour-char-constants`_, `-Wgnu-anonymous-struct`_, `-Wgnu-auto-type`_, `-Wgnu-binary-literal`_, `-Wgnu-case-range`_, `-Wgnu-complex-integer`_, `-Wgnu-compound-literal-initializer`_, `-Wgnu-conditional-omitted-operand`_, `-Wgnu-empty-initializer`_, `-Wgnu-empty-struct`_, `-Wgnu-flexible-array-initializer`_, `-Wgnu-flexible-array-union-member`_, `-Wgnu-folding-constant`_, `-Wgnu-imaginary-constant`_, `-Wgnu-include-next`_, `-Wgnu-label-as-value`_, `-Wgnu-redeclared-enum`_, `-Wgnu-statement-expression`_, `-Wgnu-union-cast`_, `-Wgnu-zero-line-directive`_, `-Wgnu-zero-variadic-macro-arguments`_, `-Wimport-preprocessor-directive-pedantic`_, `-Wkeyword-macro`_, `-Wlanguage-extension-token`_, `-Wlong-long`_, `-Wmicrosoft-charize`_, `-Wmicrosoft-comment-paste`_, `-Wmicrosoft-cpp-macro`_, `-Wmicrosoft-end-of-file`_, `-Wmicrosoft-enum-value`_, `-Wmicrosoft-fixed-enum`_, `-Wmicrosoft-flexible-array`_, `-Wmicrosoft-redeclare-static`_, `-Wnested-anon-types`_, `-Wnullability-extension`_, `-Woverlength-strings`_, `-Wretained-language-linkage`_, `-Wundefined-internal-type`_, `-Wvla-extension`_, `-Wzero-length-array`_.
**Diagnostic text:**
@@ -8137,6 +8117,10 @@ Also controls `-Wc++11-extra-semi`_, `-Wc++11-long-long`_, `-Wc++14-binary-liter
| |+---------------------------------------+| |
+--------------------------------------------------------------------+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
++--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`ISO C++ standards before C++17 do not allow new expression for type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to use list-initialization`|
++--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+
+--------------------------------------------------------------------------------------------------------------------------------------+
|:warning:`warning:` |nbsp| :diagtext:`parameter` |nbsp| :placeholder:`A` |nbsp| :diagtext:`was not declared, defaulting to type 'int'`|
+--------------------------------------------------------------------------------------------------------------------------------------+
@@ -8722,14 +8706,22 @@ This diagnostic is enabled by default.
**Diagnostic text:**
-+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-|:warning:`warning:` |nbsp| :diagtext:`top-level module '`:placeholder:`A`:diagtext:`' in private module map, expected a submodule of '`:placeholder:`B`:diagtext:`'`|
-+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++----------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`expected canonical name for private module '`:placeholder:`A`:diagtext:`'`|
++----------------------------------------------------------------------------------------------------------------+
+
++----------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`private submodule '`:placeholder:`A`:diagtext:`' in private module map, expected top-level module`|
++----------------------------------------------------------------------------------------------------------------------------------------+
+----------------------------------------------------------------------------------------------------------------------------------+
|:warning:`warning:` |nbsp| :diagtext:`module '`:placeholder:`A`:diagtext:`' already re-exported as '`:placeholder:`B`:diagtext:`'`|
+----------------------------------------------------------------------------------------------------------------------------------+
++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`no submodule named` |nbsp| :placeholder:`A` |nbsp| :diagtext:`in module '`:placeholder:`B`:diagtext:`'; using top level '`:placeholder:`C`:diagtext:`'`|
++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+
-Wprofile-instr-missing
-----------------------
@@ -10013,17 +10005,26 @@ Also controls `-Wtautological-constant-compare`_, `-Wtautological-overlap-compar
-------------------------------
This diagnostic is enabled by default.
-Also controls `-Wtautological-constant-out-of-range-compare`_, `-Wtautological-unsigned-enum-zero-compare`_, `-Wtautological-unsigned-zero-compare`_.
+Also controls `-Wtautological-constant-out-of-range-compare`_.
**Diagnostic text:**
-+---------------------------------------------------------+------------------+--------------------------------+------------------+-------------------------------------+-------------------+
-|:warning:`warning:` |nbsp| :diagtext:`comparison` |nbsp| |+----------------+| |nbsp| :placeholder:`C` |nbsp| |+----------------+| |nbsp| :diagtext:`is always` |nbsp| |+-----------------+|
-| ||:placeholder:`D`|| ||:placeholder:`B`|| ||:diagtext:`false`||
-| |+----------------+| |+----------------+| |+-----------------+|
-| ||:placeholder:`B`|| ||:placeholder:`D`|| ||:diagtext:`true` ||
-| |+----------------+| |+----------------+| |+-----------------+|
-+---------------------------------------------------------+------------------+--------------------------------+------------------+-------------------------------------+-------------------+
++----------------------------------------------------------------------+------------------------------------------------+--------------------------------+----------------------------------------------------------+-----------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`result of comparison of` |nbsp| |+----------------------------------------------+| |nbsp| :diagtext:`with` |nbsp| |+--------------------------------------------------------+| |nbsp| :diagtext:`is always` |nbsp| :placeholder:`E`|
+| ||+--------------------------------------------+|| ||+------------------------------------------------------+|| |
+| |||:diagtext:`constant` |nbsp| :placeholder:`A`||| |||:diagtext:`expression of type` |nbsp| :placeholder:`C`||| |
+| ||+--------------------------------------------+|| ||+------------------------------------------------------+|| |
+| |+----------------------------------------------+| |+--------------------------------------------------------+| |
+| ||:diagtext:`true` || ||:diagtext:`boolean expression` || |
+| |+----------------------------------------------+| |+--------------------------------------------------------+| |
+| ||:diagtext:`false` || | | |
+| |+----------------------------------------------+| | | |
++----------------------------------------------------------------------+------------------------------------------------+--------------------------------+----------------------------------------------------------+-----------------------------------------------------+
+
+
+-Wtautological-constant-in-range-compare
+----------------------------------------
+Controls `-Wtautological-type-limit-compare`_, `-Wtautological-unsigned-enum-zero-compare`_, `-Wtautological-unsigned-zero-compare`_.
-Wtautological-constant-out-of-range-compare
@@ -10032,17 +10033,17 @@ This diagnostic is enabled by default.
**Diagnostic text:**
-+------------------------------------------------------------+------------------------------------------------+--------------------------------+----------------------------------------------------------+-------------------------------------+-------------------+
-|:warning:`warning:` |nbsp| :diagtext:`comparison of` |nbsp| |+----------------------------------------------+| |nbsp| :diagtext:`with` |nbsp| |+--------------------------------------------------------+| |nbsp| :diagtext:`is always` |nbsp| |+-----------------+|
-| ||+--------------------------------------------+|| ||+------------------------------------------------------+|| ||:diagtext:`false`||
-| |||:diagtext:`constant` |nbsp| :placeholder:`A`||| |||:diagtext:`expression of type` |nbsp| :placeholder:`C`||| |+-----------------+|
-| ||+--------------------------------------------+|| ||+------------------------------------------------------+|| ||:diagtext:`true` ||
-| |+----------------------------------------------+| |+--------------------------------------------------------+| |+-----------------+|
-| ||:diagtext:`true` || ||:diagtext:`boolean expression` || | |
-| |+----------------------------------------------+| |+--------------------------------------------------------+| | |
-| ||:diagtext:`false` || | | | |
-| |+----------------------------------------------+| | | | |
-+------------------------------------------------------------+------------------------------------------------+--------------------------------+----------------------------------------------------------+-------------------------------------+-------------------+
++----------------------------------------------------------------------+------------------------------------------------+--------------------------------+----------------------------------------------------------+-----------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`result of comparison of` |nbsp| |+----------------------------------------------+| |nbsp| :diagtext:`with` |nbsp| |+--------------------------------------------------------+| |nbsp| :diagtext:`is always` |nbsp| :placeholder:`E`|
+| ||+--------------------------------------------+|| ||+------------------------------------------------------+|| |
+| |||:diagtext:`constant` |nbsp| :placeholder:`A`||| |||:diagtext:`expression of type` |nbsp| :placeholder:`C`||| |
+| ||+--------------------------------------------+|| ||+------------------------------------------------------+|| |
+| |+----------------------------------------------+| |+--------------------------------------------------------+| |
+| ||:diagtext:`true` || ||:diagtext:`boolean expression` || |
+| |+----------------------------------------------+| |+--------------------------------------------------------+| |
+| ||:diagtext:`false` || | | |
+| |+----------------------------------------------+| | | |
++----------------------------------------------------------------------+------------------------------------------------+--------------------------------+----------------------------------------------------------+-----------------------------------------------------+
-Wtautological-overlap-compare
@@ -10083,6 +10084,19 @@ This diagnostic is enabled by default.
+------------------------------------------------------------+------------------------+----------------------------------------------------------+-------------------------+-----------------------------------------------------+-------------------+
+-Wtautological-type-limit-compare
+---------------------------------
+**Diagnostic text:**
+
++-------------------------------------------------------------------+------------------+--------------------------------+------------------+-----------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`result of comparison` |nbsp| |+----------------+| |nbsp| :placeholder:`C` |nbsp| |+----------------+| |nbsp| :diagtext:`is always` |nbsp| :placeholder:`E`|
+| ||:placeholder:`D`|| ||:placeholder:`B`|| |
+| |+----------------+| |+----------------+| |
+| ||:placeholder:`B`|| ||:placeholder:`D`|| |
+| |+----------------+| |+----------------+| |
++-------------------------------------------------------------------+------------------+--------------------------------+------------------+-----------------------------------------------------+
+
+
-Wtautological-undefined-compare
--------------------------------
This diagnostic is enabled by default.
@@ -10108,32 +10122,28 @@ This diagnostic is enabled by default.
-Wtautological-unsigned-enum-zero-compare
-----------------------------------------
-This diagnostic is enabled by default.
-
**Diagnostic text:**
-+------------------------------------------------------------+--------------------------------------+--------------------------------+--------------------------------------+-------------------------------------+-------------------+
-|:warning:`warning:` |nbsp| :diagtext:`comparison of` |nbsp| |+------------------------------------+| |nbsp| :placeholder:`C` |nbsp| |+------------------------------------+| |nbsp| :diagtext:`is always` |nbsp| |+-----------------+|
-| ||:placeholder:`D` || ||:diagtext:`unsigned enum expression`|| ||:diagtext:`false`||
-| |+------------------------------------+| |+------------------------------------+| |+-----------------+|
-| ||:diagtext:`unsigned enum expression`|| ||:placeholder:`D` || ||:diagtext:`true` ||
-| |+------------------------------------+| |+------------------------------------+| |+-----------------+|
-+------------------------------------------------------------+--------------------------------------+--------------------------------+--------------------------------------+-------------------------------------+-------------------+
++----------------------------------------------------------------------+--------------------------------------+--------------------------------+--------------------------------------+-----------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`result of comparison of` |nbsp| |+------------------------------------+| |nbsp| :placeholder:`C` |nbsp| |+------------------------------------+| |nbsp| :diagtext:`is always` |nbsp| :placeholder:`E`|
+| ||:placeholder:`D` || ||:diagtext:`unsigned enum expression`|| |
+| |+------------------------------------+| |+------------------------------------+| |
+| ||:diagtext:`unsigned enum expression`|| ||:placeholder:`D` || |
+| |+------------------------------------+| |+------------------------------------+| |
++----------------------------------------------------------------------+--------------------------------------+--------------------------------+--------------------------------------+-----------------------------------------------------+
-Wtautological-unsigned-zero-compare
------------------------------------
-This diagnostic is enabled by default.
-
**Diagnostic text:**
-+------------------------------------------------------------+---------------------------------+--------------------------------+---------------------------------+-------------------------------------+-------------------+
-|:warning:`warning:` |nbsp| :diagtext:`comparison of` |nbsp| |+-------------------------------+| |nbsp| :placeholder:`C` |nbsp| |+-------------------------------+| |nbsp| :diagtext:`is always` |nbsp| |+-----------------+|
-| ||:placeholder:`D` || ||:diagtext:`unsigned expression`|| ||:diagtext:`false`||
-| |+-------------------------------+| |+-------------------------------+| |+-----------------+|
-| ||:diagtext:`unsigned expression`|| ||:placeholder:`D` || ||:diagtext:`true` ||
-| |+-------------------------------+| |+-------------------------------+| |+-----------------+|
-+------------------------------------------------------------+---------------------------------+--------------------------------+---------------------------------+-------------------------------------+-------------------+
++----------------------------------------------------------------------+---------------------------------+--------------------------------+---------------------------------+-----------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`result of comparison of` |nbsp| |+-------------------------------+| |nbsp| :placeholder:`C` |nbsp| |+-------------------------------+| |nbsp| :diagtext:`is always` |nbsp| :placeholder:`E`|
+| ||:placeholder:`D` || ||:diagtext:`unsigned expression`|| |
+| |+-------------------------------+| |+-------------------------------+| |
+| ||:diagtext:`unsigned expression`|| ||:placeholder:`D` || |
+| |+-------------------------------+| |+-------------------------------+| |
++----------------------------------------------------------------------+---------------------------------+--------------------------------+---------------------------------+-----------------------------------------------------+
-Wtentative-definition-incomplete-type
@@ -10652,6 +10662,17 @@ This diagnostic is enabled by default.
+---------------------------------------------------------------------------------------------+
+-Wunicode-homoglyph
+-------------------
+This diagnostic is enabled by default.
+
+**Diagnostic text:**
+
++-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`treating Unicode character <U+`:placeholder:`A`:diagtext:`> as identifier character rather than as '`:placeholder:`B`:diagtext:`' symbol`|
++-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+
+
-Wunicode-whitespace
--------------------
This diagnostic is enabled by default.
@@ -11134,19 +11155,17 @@ This diagnostic is enabled by default.
**Diagnostic text:**
-+---------------------------+-----------------------------------------+--------------------------------------------+
-|:warning:`warning:` |nbsp| |+---------------------------------------+| |nbsp| :diagtext:`comparison result unused`|
-| ||+----------------+--------------------+|| |
-| |||+--------------+|:diagtext:`equality`||| |
-| |||| || ||| |
-| |||+--------------+| ||| |
-| ||||:diagtext:`in`|| ||| |
-| |||+--------------+| ||| |
-| ||+----------------+--------------------+|| |
-| |+---------------------------------------+| |
-| ||:diagtext:`relational` || |
-| |+---------------------------------------+| |
-+---------------------------+-----------------------------------------+--------------------------------------------+
++---------------------------+------------------------+--------------------------------------------+
+|:warning:`warning:` |nbsp| |+----------------------+| |nbsp| :diagtext:`comparison result unused`|
+| ||:diagtext:`equality` || |
+| |+----------------------+| |
+| ||:diagtext:`inequality`|| |
+| |+----------------------+| |
+| ||:diagtext:`relational`|| |
+| |+----------------------+| |
+| ||:diagtext:`three-way` || |
+| |+----------------------+| |
++---------------------------+------------------------+--------------------------------------------+
-Wunused-const-variable
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst
index be33f15cb229..521ab9ba135c 100644
--- a/docs/ReleaseNotes.rst
+++ b/docs/ReleaseNotes.rst
@@ -1,6 +1,6 @@
-=======================================
-Clang 6.0.0 (In-Progress) Release Notes
-=======================================
+=========================
+Clang 6.0.0 Release Notes
+=========================
.. contents::
:local:
@@ -8,12 +8,6 @@ Clang 6.0.0 (In-Progress) Release Notes
Written by the `LLVM Team <http://llvm.org/>`_
-.. warning::
-
- These are in-progress notes for the upcoming Clang 6 release.
- Release notes for previous releases can be found on
- `the Download Page <http://releases.llvm.org/download.html>`_.
-
Introduction
============
@@ -30,11 +24,6 @@ For more information about Clang or LLVM, including information about the
latest release, please see the `Clang Web Site <http://clang.llvm.org>`_ or the
`LLVM Web Site <http://llvm.org>`_.
-Note that if you are reading this file from a Subversion 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 <http://llvm.org/releases/>`_.
-
What's New in Clang 6.0.0?
==========================
@@ -95,6 +84,12 @@ Improvements to Clang's diagnostics
- ``-Wzero-as-null-pointer-constant`` was adjusted not to warn on null pointer
constants that originate from system macros, except ``NULL`` macro.
+- ``-Wdelete-non-virtual-dtor`` can now fire in system headers, so that
+ ``std::unique_ptr<>`` deleting through a non-virtual dtor is now diagnosed.
+
+- ``-Wunreachable-code`` can now reason about ``__try``, ``__except`` and
+ ``__leave``.
+
Non-comprehensive list of changes in this release
-------------------------------------------------
@@ -137,6 +132,9 @@ New Compiler Flags
feature is enabled by default for AArch64 at the ``-O0`` optimization level.
Support for other targets or optimization levels is currently incomplete.
+- New ``-nostdlib++`` flag to disable linking the C++ standard library. Similar
+ to using ``clang`` instead of ``clang++`` but doesn't disable ``-lm``.
+
Deprecated Compiler Flags
-------------------------
@@ -185,6 +183,8 @@ Windows Support
- Clang now has initial, preliminary support for targeting Windows on
ARM64.
+- clang-cl now exposes the ``--version`` flag.
+
C Language Changes in Clang
---------------------------
diff --git a/lib/Basic/Targets/X86.cpp b/lib/Basic/Targets/X86.cpp
index 58c6ddc8ff66..cfa6c571d6ea 100644
--- a/lib/Basic/Targets/X86.cpp
+++ b/lib/Basic/Targets/X86.cpp
@@ -152,7 +152,8 @@ bool X86TargetInfo::initFeatureMap(
setFeatureEnabledImpl(Features, "avx512bw", true);
setFeatureEnabledImpl(Features, "avx512vl", true);
setFeatureEnabledImpl(Features, "pku", true);
- setFeatureEnabledImpl(Features, "clwb", true);
+ if (Kind != CK_Cannonlake) // CNL inherits all SKX features, except CLWB
+ setFeatureEnabledImpl(Features, "clwb", true);
LLVM_FALLTHROUGH;
case CK_SkylakeClient:
setFeatureEnabledImpl(Features, "xsavec", true);
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 7e01b058ab2d..a6e43765e106 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -14926,7 +14926,8 @@ static void DoMarkVarDeclReferenced(Sema &SemaRef, SourceLocation Loc,
if (RefersToEnclosingScope) {
LambdaScopeInfo *const LSI =
SemaRef.getCurLambda(/*IgnoreNonLambdaCapturingScope=*/true);
- if (LSI && !LSI->CallOperator->Encloses(Var->getDeclContext())) {
+ if (LSI && (!LSI->CallOperator ||
+ !LSI->CallOperator->Encloses(Var->getDeclContext()))) {
// If a variable could potentially be odr-used, defer marking it so
// until we finish analyzing the full expression for any
// lvalue-to-rvalue
diff --git a/test/Preprocessor/predefined-arch-macros.c b/test/Preprocessor/predefined-arch-macros.c
index 6021f9c60e34..716d6f72ba61 100644
--- a/test/Preprocessor/predefined-arch-macros.c
+++ b/test/Preprocessor/predefined-arch-macros.c
@@ -972,7 +972,7 @@
// CHECK_CNL_M32: #define __BMI2__ 1
// CHECK_CNL_M32: #define __BMI__ 1
// CHECK_CNL_M32: #define __CLFLUSHOPT__ 1
-// CHECK_CNL_M32: #define __CLWB__ 1
+// CHECK_CNL_M32-NOT: #define __CLWB__ 1
// CHECK_CNL_M32: #define __F16C__ 1
// CHECK_CNL_M32: #define __FMA__ 1
// CHECK_CNL_M32: #define __LZCNT__ 1
@@ -1019,7 +1019,7 @@
// CHECK_CNL_M64: #define __BMI2__ 1
// CHECK_CNL_M64: #define __BMI__ 1
// CHECK_CNL_M64: #define __CLFLUSHOPT__ 1
-// CHECK_CNL_M64: #define __CLWB__ 1
+// CHECK_CNL_M64-NOT: #define __CLWB__ 1
// CHECK_CNL_M64: #define __F16C__ 1
// CHECK_CNL_M64: #define __FMA__ 1
// CHECK_CNL_M64: #define __LZCNT__ 1
diff --git a/test/SemaCXX/lambda-expressions.cpp b/test/SemaCXX/lambda-expressions.cpp
index de77467b6d5a..4565345fc665 100644
--- a/test/SemaCXX/lambda-expressions.cpp
+++ b/test/SemaCXX/lambda-expressions.cpp
@@ -608,3 +608,18 @@ namespace ConversionOperatorDoesNotHaveDeducedReturnType {
// This used to crash in return type deduction for the conversion opreator.
struct A { int n; void f() { +[](decltype(n)) {}; } };
}
+
+namespace TypoCorrection {
+template <typename T> struct X {};
+// expected-note@-1 {{template parameter is declared here}}
+
+template <typename T>
+void Run(const int& points) {
+// expected-note@-1 {{'points' declared here}}
+ auto outer_lambda = []() {
+ auto inner_lambda = [](const X<Points>&) {};
+ // expected-error@-1 {{use of undeclared identifier 'Points'; did you mean 'points'?}}
+ // expected-error@-2 {{template argument for template type parameter must be a type}}
+ };
+}
+}