[llvm-branch-commits] [clang] ReleaseNotes.rst: Fix typo "my" for "may" (PR #101251)
https://github.com/hubert-reinterpretcast created https://github.com/llvm/llvm-project/pull/101251 Replace typo for "may" with "can". >From 20320854d647630b1022b6bc4a1671e85c93a287 Mon Sep 17 00:00:00 2001 From: Hubert Tong Date: Tue, 30 Jul 2024 17:56:55 -0400 Subject: [PATCH] ReleaseNotes.rst: Fix typo "my" for "may" Replace typo for "may" with "can". --- clang/docs/ReleaseNotes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 610061406a1ec..b4ef1e9672a5d 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -147,7 +147,7 @@ Clang Frontend Potentially Breaking Changes that ``none`` means that there is no operating system. As opposed to an unknown type of operating system. - This change my cause clang to not find libraries, or libraries to be built at + This change can cause clang to not find libraries, or libraries to be built at different file system locations. This can be fixed by changing your builds to use the new normalized triple. However, we recommend instead getting the normalized triple from clang itself, as this will make your builds more ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] release/19.x: [AIX]export function descriptor symbols related to template functions. (#101920) (PR #102407)
https://github.com/hubert-reinterpretcast approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/102407 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang] f635bcd - NFC: Pre-commit test: -Wpointer-sign with plain char to [un]signed char
Author: Hubert Tong Date: 2021-01-11T18:41:14-05:00 New Revision: f635bcd16105a0a01eefa2c69a71cd103dedaddd URL: https://github.com/llvm/llvm-project/commit/f635bcd16105a0a01eefa2c69a71cd103dedaddd DIFF: https://github.com/llvm/llvm-project/commit/f635bcd16105a0a01eefa2c69a71cd103dedaddd.diff LOG: NFC: Pre-commit test: -Wpointer-sign with plain char to [un]signed char Add tests with bad message text for `-Wpointer-sign` and run them with both signed and unsigned versions of plain `char`. Added: clang/test/Sema/incompatible-sign.cpp Modified: clang/test/Sema/incompatible-sign.c Removed: diff --git a/clang/test/Sema/incompatible-sign.c b/clang/test/Sema/incompatible-sign.c index 6249feb6b1e7..74e8b5dcc1fc 100644 --- a/clang/test/Sema/incompatible-sign.c +++ b/clang/test/Sema/incompatible-sign.c @@ -1,5 +1,23 @@ // RUN: %clang_cc1 %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only -fno-signed-char int a(int* x); // expected-note{{passing argument to parameter 'x' here}} int b(unsigned* y) { return a(y); } // expected-warning {{passing 'unsigned int *' to parameter of type 'int *' converts between pointers to integer types with diff erent sign}} +signed char *plainCharToSignedChar(signed char *arg) { // expected-note{{passing argument to parameter}} + extern char c; + signed char *p = &c; // expected-warning {{converts between pointers to integer types with diff erent sign}} + struct { signed char *p; } s = { &c }; // expected-warning {{converts between pointers to integer types with diff erent sign}} + p = &c; // expected-warning {{converts between pointers to integer types with diff erent sign}} + plainCharToSignedChar(&c); // expected-warning {{converts between pointers to integer types with diff erent sign}} + return &c; // expected-warning {{converts between pointers to integer types with diff erent sign}} +} + +char *unsignedCharToPlainChar(char *arg) { // expected-note{{passing argument to parameter}} + extern unsigned char uc[]; + char *p = uc; // expected-warning {{converts between pointers to integer types with diff erent sign}} + (void) (char *[]){ [42] = uc }; // expected-warning {{converts between pointers to integer types with diff erent sign}} + p = uc; // expected-warning {{converts between pointers to integer types with diff erent sign}} + unsignedCharToPlainChar(uc); // expected-warning {{converts between pointers to integer types with diff erent sign}} + return uc; // expected-warning {{converts between pointers to integer types with diff erent sign}} +} diff --git a/clang/test/Sema/incompatible-sign.cpp b/clang/test/Sema/incompatible-sign.cpp new file mode 100644 index ..ebe7585b81e0 --- /dev/null +++ b/clang/test/Sema/incompatible-sign.cpp @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only -fno-signed-char + +void plainToSigned() { + extern char c; + signed char *p; + p = &c; // expected-error {{converts between pointers to integer types with diff erent sign}} +} + +void unsignedToPlain() { + extern unsigned char uc; + char *p; + p = &uc; // expected-error {{converts between pointers to integer types with diff erent sign}} +} ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang] c6ffe4d - [clang] Fix message text for `-Wpointer-sign` to account for plain char
Author: Hubert Tong Date: 2021-01-11T18:41:14-05:00 New Revision: c6ffe4d76fbf6ae505c0abccaf29017414265e32 URL: https://github.com/llvm/llvm-project/commit/c6ffe4d76fbf6ae505c0abccaf29017414265e32 DIFF: https://github.com/llvm/llvm-project/commit/c6ffe4d76fbf6ae505c0abccaf29017414265e32.diff LOG: [clang] Fix message text for `-Wpointer-sign` to account for plain char The `-Wpointer-sign` warning text is inappropriate for describing the incompatible pointer conversion between plain `char` and explicitly `signed`/`unsigned` `char` (whichever plain `char` has the same range as) and vice versa. Specifically, in part, it reads "converts between pointers to integer types with different sign". This patch changes that portion to read instead as "converts between pointers to integer types where one is of the unique plain 'char' type and the other is not" when one of the types is plain `char`. C17 subclause 6.5.16.1 indicates that the conversions resulting in `-Wpointer-sign` warnings in assignment-like contexts are constraint violations. This means that strict conformance requires a diagnostic for the case where the message text is wrong before this patch. The lack of an even more specialized warning group is consistent with GCC. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D93999 Added: Modified: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaExpr.cpp clang/test/Sema/incompatible-sign.c clang/test/Sema/incompatible-sign.cpp clang/test/SemaObjC/objc-cf-audited-warning.m Removed: diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index c048fc89813f..19b003398b02 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -7814,21 +7814,11 @@ def ext_typecheck_convert_incompatible_pointer_sign : ExtWarn< "|% diff {sending $ to parameter of type $|" "sending to parameter of diff erent type}0,1" "|% diff {casting $ to type $|casting between types}0,1}2" - " converts between pointers to integer types with diff erent sign">, + " converts between pointers to integer types %select{with diff erent sign|" + "where one is of the unique plain 'char' type and the other is not}3">, InGroup>; -def err_typecheck_convert_incompatible_pointer_sign : Error< - "%select{% diff {assigning to $ from $|assigning to diff erent types}0,1" - "|% diff {passing $ to parameter of type $|" - "passing to parameter of diff erent type}0,1" - "|% diff {returning $ from a function with result type $|" - "returning from function with diff erent return type}0,1" - "|% diff {converting $ to type $|converting between types}0,1" - "|% diff {initializing $ with an expression of type $|" - "initializing with expression of diff erent type}0,1" - "|% diff {sending $ to parameter of type $|" - "sending to parameter of diff erent type}0,1" - "|% diff {casting $ to type $|casting between types}0,1}2" - " converts between pointers to integer types with diff erent sign">; +def err_typecheck_convert_incompatible_pointer_sign : + Error; def ext_typecheck_convert_incompatible_pointer : ExtWarn< "incompatible pointer types " "%select{% diff {assigning to $ from $|assigning to diff erent types}0,1" diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index da555c95eaf0..571c4fb091ab 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -15962,6 +15962,16 @@ bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, else FDiag << FirstType << SecondType << Action << SrcExpr->getSourceRange(); + if (DiagKind == diag::ext_typecheck_convert_incompatible_pointer_sign || + DiagKind == diag::err_typecheck_convert_incompatible_pointer_sign) { +auto isPlainChar = [](const clang::Type *Type) { + return Type->isSpecificBuiltinType(BuiltinType::Char_S) || + Type->isSpecificBuiltinType(BuiltinType::Char_U); +}; +FDiag << (isPlainChar(FirstType->getPointeeOrArrayElementType()) || + isPlainChar(SecondType->getPointeeOrArrayElementType())); + } + // If we can fix the conversion, suggest the FixIts. if (!ConvHints.isNull()) { for (FixItHint &H : ConvHints.Hints) diff --git a/clang/test/Sema/incompatible-sign.c b/clang/test/Sema/incompatible-sign.c index 74e8b5dcc1fc..64c93d1e5920 100644 --- a/clang/test/Sema/incompatible-sign.c +++ b/clang/test/Sema/incompatible-sign.c @@ -6,18 +6,18 @@ int b(unsigned* y) { return a(y); } // expected-warning {{passing 'unsigned int signed char *plainCharToSignedChar(signed char *arg) { // expected-note{{passing argument to parameter}} extern char c; - signed char *p = &c; // expected-warning {{converts between pointers to integer types with diff erent sign}} - struct { signed ch
[llvm-branch-commits] [clang] release/20.x: [Clang][ReleaseNotes] Document -fclang-abi-compat=19 re: #110503 (PR #125368)
https://github.com/hubert-reinterpretcast created https://github.com/llvm/llvm-project/pull/125368 #110503 updates the scope of `-fclang-abi-compat` but did not make that clear in the release notes. This PR addresses that problem. >From 4b3e4d5f38cf0f58ee8e8384455c0a235041315c Mon Sep 17 00:00:00 2001 From: Hubert Tong Date: Sat, 1 Feb 2025 19:52:32 -0400 Subject: [PATCH] Document -fclang-abi-compat=19 re: #110503 #110503 updates the scope of `-fclang-abi-compat` but did not make that clear in the release notes. This PR addresses that problem. --- clang/docs/ReleaseNotes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 88c9fc8f95e4a1..53534d821b2c9a 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -252,7 +252,7 @@ ABI Changes in This Version - Fixed Microsoft name mangling of placeholder, auto and decltype(auto), return types for MSVC 1920+. This change resolves incompatibilities with code compiled by MSVC 1920+ but will introduce incompatibilities with code compiled by earlier versions of Clang unless such code is built with the compiler option -fms-compatibility-version=19.14 to imitate the MSVC 1914 mangling behavior. - Fixed the Itanium mangling of the construction vtable name. This change will introduce incompatibilities with code compiled by Clang 19 and earlier versions, unless the -fclang-abi-compat=19 option is used. (#GH108015) -- Mangle member-like friend function templates as members of the enclosing class. (#GH110247, #GH110503) +- Mangle member-like friend function templates as members of the enclosing class. This can be disabled using -fclang-abi-compat=19. (#GH110247, #GH110503) AST Dumping Potentially Breaking Changes ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang] [llvm] [PowerPC] Update LLVM 20.1.0 Release Notes (PR #128764)
@@ -478,6 +494,10 @@ Changes to the LLVM tools * llvm-objcopy now prints the correct file path in the error message when the output file specified by `--dump-section` cannot be opened. +* llvm-cxxfilt now supports demangling call expressions encoded using `cp` instead of `cl`. + +* llvm-objdump now supports printing the file header, load section header and auxillary header for XCOFF object files under the ``--private-headers`` option. hubert-reinterpretcast wrote: ```suggestion * llvm-objdump now supports printing the file header, load section header and auxiliary header for XCOFF object files under the ``--private-headers`` option. ``` https://github.com/llvm/llvm-project/pull/128764 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang] [llvm] [PowerPC] Update LLVM 20.1.0 Release Notes (PR #128764)
https://github.com/hubert-reinterpretcast updated https://github.com/llvm/llvm-project/pull/128764 >From d8479f20064d7043bf3caf466968fadab2ccb45e Mon Sep 17 00:00:00 2001 From: Amy Kwan Date: Tue, 25 Feb 2025 13:21:45 -0600 Subject: [PATCH 1/2] [PowerPC] Update LLVM 20.1.0 Release Notes --- clang/docs/ReleaseNotes.rst | 2 ++ llvm/docs/ReleaseNotes.md | 30 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index a2518042cb5b0..153afdb3d59e3 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -1269,6 +1269,8 @@ CUDA Support AIX Support ^^^ +- Fixed the ``-print-runtime-dir`` option. +- Enable continuous profile syncing feature on AIX. NetBSD Support ^^ diff --git a/llvm/docs/ReleaseNotes.md b/llvm/docs/ReleaseNotes.md index e654509792652..f4a8ac21a8312 100644 --- a/llvm/docs/ReleaseNotes.md +++ b/llvm/docs/ReleaseNotes.md @@ -263,7 +263,23 @@ Changes to the PowerPC Backend -- * The Linux `ppc64` LLC default cpu is updated from `ppc` to `ppc64`. -* The AIX LLC default cpu is updated from `generic` to `pwr7`. +* Replaced PPCMergeStringPool with GlobalMerge. +* Disabled vsx and altivec when -msoft-float is used. +* Added support for -mcpu=pwr11 -mtune=pwr11. +* Implemented BCD assist builtins. +* Expanded global named register support. +* Updated to use tablegen's MatchRegisterName(). +* Fixed saving of Link Register when using ROP Protect. +* Fixed SUBREG_TO_REG handling in the RegisterCoalescer. +* Fixed data layout alignment of i128 to 16. +* Fixed codegen for transparent_union function parameters. +* Added an error for incorrect use of memory operands. +* Other various bug fixes and codegen improvements. + +AIX Specific: +* LLC default cpu is updated from `generic` to `pwr7`. +* Fixed handling in emitGlobalConstantImpl to emit aliases to subobjects at proper offsets. +* Enabled aggressive merging of constants to reduce TOC entries. Changes to the RISC-V Backend - @@ -478,6 +494,10 @@ Changes to the LLVM tools * llvm-objcopy now prints the correct file path in the error message when the output file specified by `--dump-section` cannot be opened. +* llvm-cxxfilt now supports demangling call expressions encoded using `cp` instead of `cl`. + +* llvm-objdump now supports printing the file header, load section header and auxillary header for XCOFF object files under the ``--private-headers`` option. + Changes to LLDB - @@ -630,6 +650,14 @@ Changes to BOLT Changes to Sanitizers - +Changes to the Profile Runtime +-- + +* On platforms where ``atexit``-registered functions are not called when + a DSO is ``dlclose``'d, a mechanism is added that implements this + missing functionality for calls to ``atexit`` in the profile runtime. + [This is currently only enabled on AIX](https://github.com/llvm/llvm-project/pull/102940). + Other Changes - >From 55b80101fd8c47f657b67d8d0b9625eddd31944e Mon Sep 17 00:00:00 2001 From: Hubert Tong Date: Tue, 25 Feb 2025 16:47:44 -0400 Subject: [PATCH 2/2] Fix spelling error; should be "auxiliary" --- llvm/docs/ReleaseNotes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/docs/ReleaseNotes.md b/llvm/docs/ReleaseNotes.md index f4a8ac21a8312..958b7adbc4c36 100644 --- a/llvm/docs/ReleaseNotes.md +++ b/llvm/docs/ReleaseNotes.md @@ -496,7 +496,7 @@ Changes to the LLVM tools * llvm-cxxfilt now supports demangling call expressions encoded using `cp` instead of `cl`. -* llvm-objdump now supports printing the file header, load section header and auxillary header for XCOFF object files under the ``--private-headers`` option. +* llvm-objdump now supports printing the file header, load section header and auxiliary header for XCOFF object files under the ``--private-headers`` option. Changes to LLDB - ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits