aboutsummaryrefslogtreecommitdiff
path: root/clang/docs
diff options
context:
space:
mode:
authorCorentin Jabot <corentinjabot@gmail.com>2022-06-17 16:23:41 +0200
committerCorentin Jabot <corentinjabot@gmail.com>2022-07-13 10:19:26 +0200
commitd4892a168f51dabdba255af3a8d23049fcb66960 (patch)
tree0597b6da4815e30e52358d543eef7d23479ccda7 /clang/docs
parent4750b62121052dd2f095502712f95cb0859a4af8 (diff)
downloadllvm-d4892a168f51dabdba255af3a8d23049fcb66960.zip
llvm-d4892a168f51dabdba255af3a8d23049fcb66960.tar.gz
llvm-d4892a168f51dabdba255af3a8d23049fcb66960.tar.bz2
[Clang] Add a warning on invalid UTF-8 in comments.
Introduce an off-by default `-Winvalid-utf8` warning that detects invalid UTF-8 code units sequences in comments. Invalid UTF-8 in other places is already diagnosed, as that cannot appear in identifiers and other grammar constructs. The warning is off by default as its likely to be somewhat disruptive otherwise. This warning allows clang to conform to the yet-to be approved WG21 "P2295R5 Support for UTF-8 as a portable source file encoding" paper. Reviewed By: aaron.ballman, #clang-language-wg Differential Revision: https://reviews.llvm.org/D128059
Diffstat (limited to 'clang/docs')
-rw-r--r--clang/docs/ReleaseNotes.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index e09a4a7..f8977d5 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -284,9 +284,11 @@ Improvements to Clang's diagnostics
unevaluated operands of a ``typeid`` expression, as they are now
modeled correctly in the CFG. This fixes
`Issue 21668 <https://github.com/llvm/llvm-project/issues/21668>`_.
-- ``-Wself-assign``, ``-Wself-assign-overloaded`` and ``-Wself-move`` will
+- ``-Wself-assign``, ``-Wself-assign-overloaded`` and ``-Wself-move`` will
suggest a fix if the decl being assigned is a parameter that shadows a data
member of the contained class.
+- Added ``-Winvalid-utf8`` which diagnoses invalid UTF-8 code unit sequences in
+ comments.
Non-comprehensive list of changes in this release
-------------------------------------------------
@@ -613,7 +615,7 @@ AST Matchers
- Added ``forEachTemplateArgument`` matcher which creates a match every
time a ``templateArgument`` matches the matcher supplied to it.
-
+
- Added ``objcStringLiteral`` matcher which matches ObjectiveC String
literal expressions.