[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-02-14 Thread Sam Tebbs via cfe-commits
https://github.com/SamTebbs33 updated https://github.com/llvm/llvm-project/pull/77936 >From 7314429a203900a8f555e1b0471fdd4cfd4d8d03 Mon Sep 17 00:00:00 2001 From: Samuel Tebbs Date: Wed, 10 Jan 2024 14:57:04 + Subject: [PATCH 01/17] [Clang][SME] Detect always_inline used with mismatched s

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-02-14 Thread Sam Tebbs via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: %clang --target=aarch64-none-linux-gnu -march=armv9-a+sme -O3 -S -Xclang -verify %s + +// Conflicting attributes when using always_inline +__attribute__((always_inline)) SamTebbs33 wrote: Done. https://github.com/llvm/llvm-project/pull

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-02-14 Thread Sam Tebbs via cfe-commits
@@ -0,0 +1,6 @@ +// RUN: %clang --target=aarch64-none-linux-gnu -march=armv9-a+sme -O3 -S -Xclang -verify %s SamTebbs33 wrote: Done. I originally didn't as the frontend bails out once it's printed all the errors for one function (-ferror-limit doesn't help here

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-02-14 Thread Sam Tebbs via cfe-commits
@@ -279,6 +279,12 @@ def err_builtin_needs_feature : Error<"%0 needs target feature %1">; def err_function_needs_feature : Error< "always_inline function %1 requires target feature '%2', but would " "be inlined into function %0 that is compiled without support for '%2'">;

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-02-14 Thread Sam Tebbs via cfe-commits
@@ -814,6 +820,49 @@ Address AArch64ABIInfo::EmitMSVAArg(CodeGenFunction &CGF, Address VAListAddr, /*allowHigherAlign*/ false); } +class SMEAttributes { +public: + bool IsStreaming = false; + bool IsStreamingCompatible = false; + bool HasNewZA = f

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-02-14 Thread Sam Tebbs via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: %clang --target=aarch64-none-linux-gnu -march=armv9-a+sme -O3 -S -Xclang -verify %s SamTebbs33 wrote: Done. https://github.com/llvm/llvm-project/pull/77936 ___ cfe-commits mailing list cfe-com

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-02-14 Thread Sam Tebbs via cfe-commits
@@ -814,6 +820,49 @@ Address AArch64ABIInfo::EmitMSVAArg(CodeGenFunction &CGF, Address VAListAddr, /*allowHigherAlign*/ false); } +class SMEAttributes { SamTebbs33 wrote: Done. https://github.com/llvm/llvm-project/pull/77936 __

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-02-14 Thread Sam Tebbs via cfe-commits
@@ -814,6 +820,49 @@ Address AArch64ABIInfo::EmitMSVAArg(CodeGenFunction &CGF, Address VAListAddr, /*allowHigherAlign*/ false); } +class SMEAttributes { +public: + bool IsStreaming = false; + bool IsStreamingCompatible = false; + bool HasNewZA = f

[clang] [-Wunsafe-buffer-usage] Fixits for unsafe arguments of function pointer calls (PR #80358)

2024-02-14 Thread via cfe-commits
@@ -282,8 +282,8 @@ isInUnspecifiedPointerContext(internal::Matcher InnerMatcher) { //(i.e., computing the distance between two pointers); or ... auto CallArgMatcher = - callExpr(forEachArgumentWithParam(InnerMatcher, - hasPointerType() /* array

[clang] [-Wunsafe-buffer-usage] Fixits for unsafe arguments of function pointer calls (PR #80358)

2024-02-14 Thread via cfe-commits
https://github.com/jkorous-apple edited https://github.com/llvm/llvm-project/pull/80358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-14 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt edited https://github.com/llvm/llvm-project/pull/80089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [clang][flang][driver] Correct program names in option group descriptions (PR #81726)

2024-02-14 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/81726 >From 101fb01100873cb69e1d3bb4e7cadf6a45e42d83 Mon Sep 17 00:00:00 2001 From: David Spickett Date: Wed, 14 Feb 2024 11:20:51 + Subject: [PATCH 1/2] [clang][flang][driver] Correct program names in option

[clang] [clang][CodeGen] Shift relink option implementation away from module cloning (PR #81693)

2024-02-14 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j edited https://github.com/llvm/llvm-project/pull/81693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-14 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/81642 >From 0834af0d1fcd2a87656fabdb7b0aee0f42b9b52f Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 9 Feb 2024 14:00:49 -0500 Subject: [PATCH 1/3] [Clang] Unify interface for accessing template argume

[clang] [clang][CodeGen] Shift relink option implementation away from module cloning (PR #81693)

2024-02-14 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. LGTM. Thanks https://github.com/llvm/llvm-project/pull/81693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-14 Thread Krystian Stasiowski via cfe-commits
@@ -285,30 +285,23 @@ template<> class SpecializationDecl; // CHECK: [[@LINE-1]]:7 | class(Gen,TS)/C++ | SpecializationDecl | c:@S@SpecializationDecl>#I | | Decl,RelSpecialization | rel: 1 // CHECK-NEXT: RelSpecialization | SpecializationDecl | c:@ST>1#T@SpecializationDecl -

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-14 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/81642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-14 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/80089 >From 7774e4036ac1de7fdf5fe4c6b3208b492853ffc5 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 23 Jan 2024 23:28:42 + Subject: [PATCH 01/11] add signed-integer-wrap sanitizer --- clang/include/cl

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-14 Thread Justin Stitt via cfe-commits
JustinStitt wrote: > I think this patch is good to go. Thanks for working on it! Thanks for the review Nick! BTW, I forgot to update the `ReleaseNotes.rst`, I've done so now (hopefully not voiding your previous review) https://github.com/llvm/llvm-project/pull/80089 _

[clang] [Clang] CGCoroutine: Skip moving parameters if the allocation decision is false (PR #81195)

2024-02-14 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/81195 >From ea809ca6744283910637d40258d2240061c6fc8d Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Wed, 7 Feb 2024 16:05:42 -0800 Subject: [PATCH] Skip moving parameters if the allocation decision is false -

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-14 Thread Erich Keane via cfe-commits
@@ -6316,6 +6310,15 @@ TEST(HasAnyTemplateArgumentLoc, BindsToSpecializationWithDoubleArgument) { hasTypeLoc(loc(asString("double"))); } +TEST(HasAnyTemplateArgumentLoc, BindsToExplicitSpecializationWithIntArgument) { + EXPECT_TRUE( + match

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-14 Thread Erich Keane via cfe-commits
@@ -2545,10 +2545,12 @@ ASTDeclReader::VisitClassTemplateSpecializationDeclImpl( } // Explicit info. - if (TypeSourceInfo *TyInfo = readTypeSourceInfo()) { -auto *ExplicitInfo = -new (C) ClassTemplateSpecializationDecl::ExplicitSpecializationInfo; -Explici

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-14 Thread Erich Keane via cfe-commits
@@ -6390,6 +6394,7 @@ TEST(HasTemplateArgumentLoc, BindsToSpecializationWithDoubleArgument) { 0, hasTypeLoc(loc(asString("double"))); } +#if 0 erichkeane wrote: Same question here :) https://github.com/llvm/llvm-projec

[clang] [flang] [clang][flang][driver] Correct program names in option group descriptions (PR #81726)

2024-02-14 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LGTM. Thanks @DavidSpickett for the fix. https://github.com/llvm/llvm-project/pull/81726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-14 Thread Jon Chesterfield via cfe-commits
@@ -0,0 +1,701 @@ +//===-- ExpandVariadicsPass.cpp *- C++ -*-=// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-14 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I think this patch is good to go. Thanks for working on it! > > cc @AaronBallman @efriedma-quic @rjmccall @nikic in case there's any last > minute concerns. I'm happy to sign off on this, but consider giving folks > some time to speak up before landing this. No concerns

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-14 Thread Jon Chesterfield via cfe-commits
JonChesterfield wrote: > I don't really like the whole "sufficiently simple function" thing. It seems > fragile. You should be able to just take a arbitrary internal varargs > function, rewrite its signature to take a va_list argument, rewrite calls to > va_start to make a copy of that va_list

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-14 Thread Jon Chesterfield via cfe-commits
JonChesterfield wrote: > High level question: Does this patch eliminate the variadic call edge, or, > does it perform inlining on very special variadic function definitions? I > thought the former but `isFunctionInlinable`, sufficiently confused me. This patch will rewrite calls to a variadic

[clang] [clang][CodeGen] Shift relink option implementation away from module cloning (PR #81693)

2024-02-14 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. Looks fine. https://github.com/llvm/llvm-project/pull/81693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Loose the cast check when emitting builtins (PR #81669)

2024-02-14 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM (It feels a little weird that the types in the clang AST don't actually match the LLVM builtin, but I guess it's not likely to actually cause any issues.) https://github.com/llvm/llvm-project/pull/81669 _

[clang] [llvm] [MC/DC] Refactor: Let MCDCConditionID int16_t with zero-origin (PR #81257)

2024-02-14 Thread Fangrui Song via cfe-commits
MaskRay wrote: Yes, zero-based numbering is more conventional in LLVM. https://github.com/llvm/llvm-project/pull/81257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-14 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for this! Please be sure to also add a release note and documentation (https://clang.llvm.org/docs/LanguageExtensions.html#type-trait-primitives). https://github.com/llvm/llvm-project/pull/81506 ___

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-14 Thread Aaron Ballman via cfe-commits
@@ -1558,6 +1558,89 @@ void is_standard_layout() int t71[F(__is_standard_layout(HasEmptyIndirectBaseAsSecondUnionMember))]; } +struct CStruct2 { + int one; + int two; +}; + +struct CEmptyStruct2 {}; + +struct CppEmptyStruct2 : CStruct2 {}; +struct CppStructStandard2 : CEmp

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-14 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/81506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-14 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan commented: Some initial comments for now. https://github.com/llvm/llvm-project/pull/80069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-14 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan edited https://github.com/llvm/llvm-project/pull/80069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-14 Thread Amy Kwan via cfe-commits
@@ -10347,6 +10347,8 @@ def err_x86_builtin_tile_arg_duplicate : Error< def err_builtin_target_unsupported : Error< "builtin is not supported on this target">; +def err_builtin_aix_os_unsupported : Error< + "this builtin is available only on AIX 7.2 and later operating syst

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-14 Thread Amy Kwan via cfe-commits
@@ -16542,12 +16542,64 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, Intrinsic::ID ID = Intrinsic::not_intrinsic; + // The lambda function converts builtin_cpu_is function into directly + // returning false or true, or it gets and checks the informati

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-14 Thread Amy Kwan via cfe-commits
@@ -16542,12 +16542,64 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, Intrinsic::ID ID = Intrinsic::not_intrinsic; + // The lambda function converts builtin_cpu_is function into directly + // returning false or true, or it gets and checks the informati

[clang] [llvm] [clang] Add fixed point precision macros (PR #81207)

2024-02-14 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/81207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add fixed point precision macros (PR #81207)

2024-02-14 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/81207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add fixed point precision macros (PR #81207)

2024-02-14 Thread Fangrui Song via cfe-commits
@@ -768,6 +768,59 @@ void InitializeOpenCLFeatureTestMacros(const TargetInfo &TI, Builder.defineMacro("__opencl_c_int64"); } +std::string ConstructFixedPointLiteral(llvm::APFixedPoint Val, + llvm::StringRef Suffix) { + if (Val.isSigned

[clang] [clang][CodeGen] Shift relink option implementation away from module cloning (PR #81693)

2024-02-14 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/81693 >From aff288af78b94dbd7ef317ce368f25a305798adc Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 13 Feb 2024 17:30:21 -0800 Subject: [PATCH 1/3] [clang][CodeGen] Shift relink option implementation away from

[clang] 630f82e - [Clang][CodeGen] Loose the cast check when emitting builtins (#81669)

2024-02-14 Thread via cfe-commits
Author: Shilei Tian Date: 2024-02-14T12:59:59-05:00 New Revision: 630f82ec0c61b772711355fad08ed0d0adce922d URL: https://github.com/llvm/llvm-project/commit/630f82ec0c61b772711355fad08ed0d0adce922d DIFF: https://github.com/llvm/llvm-project/commit/630f82ec0c61b772711355fad08ed0d0adce922d.diff L

[clang] [Clang][CodeGen] Loose the cast check when emitting builtins (PR #81669)

2024-02-14 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/81669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-14 Thread John McCall via cfe-commits
https://github.com/rjmccall commented: Yeah, LGTM. https://github.com/llvm/llvm-project/pull/80089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-14 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/80908 >From 784670dd98c3727d8d8aa25f865b7b299f114bf4 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Wed, 14 Feb 2024 13:11:01 -0500 Subject: [PATCH] [RFC][WIP][AMDGPU] Use `bf16` instead of `i16` for bfloat Current

[clang] [HIP] Allow partial linking for `-fgpu-rdc` (PR #81700)

2024-02-14 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/81700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] Allow partial linking for `-fgpu-rdc` (PR #81700)

2024-02-14 Thread Artem Belevich via cfe-commits
@@ -36,6 +47,146 @@ static std::string normalizeForBundler(const llvm::Triple &T, : T.normalize(); } +// Collect undefined __hip_fatbin* and __hip_gpubin_handle* symbols from all +// input object or archive files. +class HIPUndefinedFatBinSymbols { +publi

[clang] [HIP] Allow partial linking for `-fgpu-rdc` (PR #81700)

2024-02-14 Thread Artem Belevich via cfe-commits
@@ -36,6 +47,146 @@ static std::string normalizeForBundler(const llvm::Triple &T, : T.normalize(); } +// Collect undefined __hip_fatbin* and __hip_gpubin_handle* symbols from all +// input object or archive files. +class HIPUndefinedFatBinSymbols { +publi

[clang] [HIP] Allow partial linking for `-fgpu-rdc` (PR #81700)

2024-02-14 Thread Artem Belevich via cfe-commits
@@ -36,6 +47,146 @@ static std::string normalizeForBundler(const llvm::Triple &T, : T.normalize(); } +// Collect undefined __hip_fatbin* and __hip_gpubin_handle* symbols from all +// input object or archive files. +class HIPUndefinedFatBinSymbols { +publi

[clang] [HIP] Allow partial linking for `-fgpu-rdc` (PR #81700)

2024-02-14 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. Overall LGTM. Please wait for @jhuber6's to double check the partial linking mechanics details. https://github.com/llvm/llvm-project/pull/81700 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-14 Thread Danny Mösch via cfe-commits
@@ -0,0 +1,127 @@ +//===--- UseDesignatedInitializersCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-14 Thread Danny Mösch via cfe-commits
@@ -0,0 +1,127 @@ +//===--- UseDesignatedInitializersCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [HIP] Allow partial linking for `-fgpu-rdc` (PR #81700)

2024-02-14 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 commented: This makes sense overall, though it's very complicated. Generally we just need to make sure these things are private to one group of files. There's a lot more to parse here compared to the `linker-wrapper`. Do any of these tests check when called with `-r`

[clang] 6d4ffbd - [clang][CodeGen] Shift relink option implementation away from module cloning (#81693)

2024-02-14 Thread via cfe-commits
Author: Jacob Lambert Date: 2024-02-14T10:39:21-08:00 New Revision: 6d4ffbdfa8ff90e4ee6081ad8dbb8ec24e982a02 URL: https://github.com/llvm/llvm-project/commit/6d4ffbdfa8ff90e4ee6081ad8dbb8ec24e982a02 DIFF: https://github.com/llvm/llvm-project/commit/6d4ffbdfa8ff90e4ee6081ad8dbb8ec24e982a02.diff

[clang] [clang][CodeGen] Shift relink option implementation away from module cloning (PR #81693)

2024-02-14 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j closed https://github.com/llvm/llvm-project/pull/81693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add support for renaming ObjC properties and implicit properties (PR #81775)

2024-02-14 Thread David Goldman via cfe-commits
https://github.com/DavidGoldman created https://github.com/llvm/llvm-project/pull/81775 Add support for renaming Objective-C properties. These are special since a single property decl could generate 3 different decls - a getter method, a setter method, and an instance variable. In addition, su

[clang-tools-extra] [clangd] Add support for renaming ObjC properties and implicit properties (PR #81775)

2024-02-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: David Goldman (DavidGoldman) Changes Add support for renaming Objective-C properties. These are special since a single property decl could generate 3 different decls - a getter method, a setter method, and an instance variable. In additi

[clang] [clang] Fix isInStdNamespace for Decl flagged extern c++ (PR #81776)

2024-02-14 Thread Fred Tingaud via cfe-commits
https://github.com/frederic-tingaud-sonarsource created https://github.com/llvm/llvm-project/pull/81776 The MSVC STL implementation declares multiple classes using: ```cpp namespace std { extern "C++" class locale { ... }; } ``` `isInStdNamespace` uses the first DeclContext to check wh

[clang] [clang] Fix isInStdNamespace for Decl flagged extern c++ (PR #81776)

2024-02-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fred Tingaud (frederic-tingaud-sonarsource) Changes The MSVC STL implementation declares multiple classes using: ```cpp namespace std { extern "C++" class locale { ... }; } ``` `isInStdNamespace` uses the first DeclContext to chec

[clang-tools-extra] [clangd] Add support for renaming ObjC properties and implicit properties (PR #81775)

2024-02-14 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 8b485070844d03cda467e75aa8c924184ba671cf 36f1457e235b687c31e308c496fb67b6a477c3ea --

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-14 Thread Danny Mösch via cfe-commits
@@ -0,0 +1,127 @@ +//===--- UseDesignatedInitializersCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang][CodeGen] Add missing error check (PR #81777)

2024-02-14 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j created https://github.com/llvm/llvm-project/pull/81777 Add missing error check. This resolves "error: variable 'Err' set but not used" warnings >From b802c3456e44d5cc39ce6d5bf93fc549e38a7a12 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Wed, 14 Feb 2024 11:04:0

[clang] [clang][CodeGen] Add missing error check (PR #81777)

2024-02-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Jacob Lambert (lamb-j) Changes Add missing error check. This resolves "error: variable 'Err' set but not used" warnings --- Full diff: https://github.com/llvm/llvm-project/pull/81777.diff 1 Files Affec

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread via cfe-commits
https://github.com/akshaykumars614 updated https://github.com/llvm/llvm-project/pull/81670 >From c2f716ee5f787ec3df63511fd5f565a3deee4d6e Mon Sep 17 00:00:00 2001 From: akshaykumars614 Date: Tue, 13 Feb 2024 16:29:51 -0500 Subject: [PATCH 1/2] issue: #18079 (bad errwqor message on incorrect str

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 4e005515ec5ecedf2cd986097e45cab59f9914da ac8b99309b07b6c7114dfbf784a46d2fb5d9dcc4 --

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread Jon Roelofs via cfe-commits
@@ -102,6 +102,9 @@ def err_raw_delim_too_long : Error< def err_invalid_char_raw_delim : Error< "invalid newline character in raw string delimiter" "; use PREFIX( )PREFIX to delimit raw string">; +def err_invalid_nexline_raw_delim : Error< jroelofs wrote:

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,5 @@ +// RUN: not %clang_cc1 -E %s 2>&1 | grep 'error: invalid newline character in raw string delimiter; use PREFIX( )PREFIX to delimit raw string' jroelofs wrote: Please use `-fsyntax-only -verify` instead of `grep` for checking diagnostics. There

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread Jon Roelofs via cfe-commits
@@ -2270,10 +2270,12 @@ bool Lexer::LexRawStringLiteral(Token &Result, const char *CurPtr, const char *PrefixEnd = &CurPtr[PrefixLen]; if (PrefixLen == 16) { Diag(PrefixEnd, diag::err_raw_delim_too_long); - } else { + } else if (*PrefixEnd != '\n'

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread via cfe-commits
@@ -0,0 +1,5 @@ +// RUN: not %clang_cc1 -E %s 2>&1 | grep 'error: invalid newline character in raw string delimiter; use PREFIX( )PREFIX to delimit raw string' akshaykumars614 wrote: Great! I will change that. https://github.com/llvm/llvm-project/pull/81670 __

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-14 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Why not just enforce -fsanitize=signed-integer-overflow with -fwrapv? I suspect it's just overlook, and not intentional behavior. https://github.com/llvm/llvm-project/pull/80089 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread via cfe-commits
https://github.com/akshaykumars614 updated https://github.com/llvm/llvm-project/pull/81670 >From c2f716ee5f787ec3df63511fd5f565a3deee4d6e Mon Sep 17 00:00:00 2001 From: akshaykumars614 Date: Tue, 13 Feb 2024 16:29:51 -0500 Subject: [PATCH 1/3] issue: #18079 (bad errwqor message on incorrect str

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread via cfe-commits
https://github.com/akshaykumars614 updated https://github.com/llvm/llvm-project/pull/81670 >From c2f716ee5f787ec3df63511fd5f565a3deee4d6e Mon Sep 17 00:00:00 2001 From: akshaykumars614 Date: Tue, 13 Feb 2024 16:29:51 -0500 Subject: [PATCH 1/4] issue: #18079 (bad errwqor message on incorrect str

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,5 @@ +// RUN: not %clang_cc1 -E %s 2>&1 | grep 'error: invalid newline character in raw string delimiter; use PREFIX( )PREFIX to delimit raw string' jroelofs wrote: mind also adding a test for the `err_invalid_char_raw_delim` case while you're here?

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-14 Thread Krystian Stasiowski via cfe-commits
@@ -6316,6 +6310,15 @@ TEST(HasAnyTemplateArgumentLoc, BindsToSpecializationWithDoubleArgument) { hasTypeLoc(loc(asString("double"))); } +TEST(HasAnyTemplateArgumentLoc, BindsToExplicitSpecializationWithIntArgument) { + EXPECT_TRUE( + match

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread Jon Roelofs via cfe-commits
@@ -2270,9 +2270,11 @@ bool Lexer::LexRawStringLiteral(Token &Result, const char *CurPtr, const char *PrefixEnd = &CurPtr[PrefixLen]; if (PrefixLen == 16) { Diag(PrefixEnd, diag::err_raw_delim_too_long); - } else { + } else if (*PrefixEnd != '\n')

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread Jon Roelofs via cfe-commits
@@ -100,7 +100,10 @@ def err_raw_delim_too_long : Error< "raw string delimiter longer than 16 characters" "; use PREFIX( )PREFIX to delimit raw string">; def err_invalid_char_raw_delim : Error< - "invalid character '%0' character in raw string delimiter" + "invalid newlin

[clang] [clang][CodeGen] Add missing error check (PR #81777)

2024-02-14 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/81777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-14 Thread Lei Huang via cfe-commits
@@ -10347,6 +10347,8 @@ def err_x86_builtin_tile_arg_duplicate : Error< def err_builtin_target_unsupported : Error< "builtin is not supported on this target">; +def err_builtin_aix_os_unsupported : Error< + "this builtin is available only on AIX 7.2 and later operating syst

[clang] 7d28f19 - [clang][CodeGen] Add missing error check (#81777)

2024-02-14 Thread via cfe-commits
Author: Jacob Lambert Date: 2024-02-14T11:25:58-08:00 New Revision: 7d28f19f68c82b65cf1180b170f33d6f82422d64 URL: https://github.com/llvm/llvm-project/commit/7d28f19f68c82b65cf1180b170f33d6f82422d64 DIFF: https://github.com/llvm/llvm-project/commit/7d28f19f68c82b65cf1180b170f33d6f82422d64.diff

[clang] [clang][CodeGen] Add missing error check (PR #81777)

2024-02-14 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j closed https://github.com/llvm/llvm-project/pull/81777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread via cfe-commits
@@ -2270,9 +2270,11 @@ bool Lexer::LexRawStringLiteral(Token &Result, const char *CurPtr, const char *PrefixEnd = &CurPtr[PrefixLen]; if (PrefixLen == 16) { Diag(PrefixEnd, diag::err_raw_delim_too_long); - } else { + } else if (*PrefixEnd != '\n')

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-14 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread via cfe-commits
https://github.com/akshaykumars614 updated https://github.com/llvm/llvm-project/pull/81670 >From c2f716ee5f787ec3df63511fd5f565a3deee4d6e Mon Sep 17 00:00:00 2001 From: akshaykumars614 Date: Tue, 13 Feb 2024 16:29:51 -0500 Subject: [PATCH 1/5] issue: #18079 (bad errwqor message on incorrect str

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread Jon Roelofs via cfe-commits
@@ -2270,9 +2270,11 @@ bool Lexer::LexRawStringLiteral(Token &Result, const char *CurPtr, const char *PrefixEnd = &CurPtr[PrefixLen]; if (PrefixLen == 16) { Diag(PrefixEnd, diag::err_raw_delim_too_long); - } else { + } else if (*PrefixEnd != '\n')

[clang] [HLSL] Expose `half` types and intrinsics always (PR #81782)

2024-02-14 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/81782 We previously made an implmenetation error when adding `half` overloads for HLSL library functionalitly. The `half` type is always defined in HLSL and `half` intrinsics should not be conditionally included.

[clang-tools-extra] 9b80ab4 - [clang-tidy] Removed redundant-inline-specifier warning on static data members (#81423)

2024-02-14 Thread via cfe-commits
Author: Félix-Antoine Constantin Date: 2024-02-14T20:30:21+01:00 New Revision: 9b80ab4332bbe336ab8b9f2082eadf6b8d223150 URL: https://github.com/llvm/llvm-project/commit/9b80ab4332bbe336ab8b9f2082eadf6b8d223150 DIFF: https://github.com/llvm/llvm-project/commit/9b80ab4332bbe336ab8b9f2082eadf6b8d2

[clang-tools-extra] [clang-tidy] Removed redundant-inline-specifier warning on static data members (PR #81423)

2024-02-14 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/81423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [HLSL] Expose `half` types and intrinsics always (PR #81782)

2024-02-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl @llvm/pr-subscribers-backend-x86 Author: Chris B (llvm-beanz) Changes We previously made an implmenetation error when adding `half` overloads for HLSL library functionalitly. The `half` type is always defined in HLSL and `half` intrinsics should n

[clang] [HLSL] Expose `half` types and intrinsics always (PR #81782)

2024-02-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris B (llvm-beanz) Changes We previously made an implmenetation error when adding `half` overloads for HLSL library functionalitly. The `half` type is always defined in HLSL and `half` intrinsics should not be conditionally included. W

[clang-tools-extra] [clangd] Clean formatting modernize-use-override (PR #81435)

2024-02-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/81435 >From db2c4ee74ffb0592ec7f3fd5557dbb5399ef998d Mon Sep 17 00:00:00 2001 From: Kevin Joseph Date: Sun, 11 Feb 2024 13:39:51 -0800 Subject: [PATCH 1/3] [clangd] Clean formatting modernize-use-override When applyi

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread via cfe-commits
@@ -2270,9 +2270,11 @@ bool Lexer::LexRawStringLiteral(Token &Result, const char *CurPtr, const char *PrefixEnd = &CurPtr[PrefixLen]; if (PrefixLen == 16) { Diag(PrefixEnd, diag::err_raw_delim_too_long); - } else { + } else if (*PrefixEnd != '\n')

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread via cfe-commits
https://github.com/akshaykumars614 edited https://github.com/llvm/llvm-project/pull/81670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread Jon Roelofs via cfe-commits
@@ -2270,9 +2270,11 @@ bool Lexer::LexRawStringLiteral(Token &Result, const char *CurPtr, const char *PrefixEnd = &CurPtr[PrefixLen]; if (PrefixLen == 16) { Diag(PrefixEnd, diag::err_raw_delim_too_long); - } else { + } else if (*PrefixEnd != '\n')

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread via cfe-commits
@@ -2270,9 +2270,11 @@ bool Lexer::LexRawStringLiteral(Token &Result, const char *CurPtr, const char *PrefixEnd = &CurPtr[PrefixLen]; if (PrefixLen == 16) { Diag(PrefixEnd, diag::err_raw_delim_too_long); - } else { + } else if (*PrefixEnd != '\n')

[clang] [clang-format] Support of TableGen basic format restrictions. (PR #81611)

2024-02-14 Thread Björn Schäpers via cfe-commits
@@ -55,5 +59,271 @@ TEST_F(FormatTestTableGen, NoSpacesInSquareBracketLists) { verifyFormat("def flag : Flag<[\"-\", \"--\"], \"foo\">;"); } +TEST_F(FormatTestTableGen, LiteralsAndIdentifiers) { + verifyFormat("def LiteralAndIdentifiers {\n" + " let someInteg

[clang-tools-extra] 5992b32 - [clangd] Clean formatting modernize-use-override (#81435)

2024-02-14 Thread via cfe-commits
Author: Kevin Joseph Date: 2024-02-14T20:59:21+01:00 New Revision: 5992b3272b29e071f6f5a4807a4e0c23e88c310d URL: https://github.com/llvm/llvm-project/commit/5992b3272b29e071f6f5a4807a4e0c23e88c310d DIFF: https://github.com/llvm/llvm-project/commit/5992b3272b29e071f6f5a4807a4e0c23e88c310d.diff

[clang-tools-extra] [clangd] Clean formatting modernize-use-override (PR #81435)

2024-02-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/81435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Clean formatting modernize-use-override (PR #81435)

2024-02-14 Thread via cfe-commits
github-actions[bot] wrote: @kevinjoseph1995 Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with

<    1   2   3   4   >