[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-02-26 Thread Mariya Podchishchaeva via cfe-commits
@@ -8569,6 +8571,37 @@ static bool checkForConflictWithNonVisibleExternC(Sema &S, const T *ND, return false; } +static bool CheckC23ConstexprVarType(Sema &SemaRef, SourceLocation VarLoc, + QualType T) { + + if (T->isVariableArrayType())

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-02-26 Thread Mariya Podchishchaeva via cfe-commits
@@ -5140,6 +5140,8 @@ Decl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS, Diag(DS.getConstexprSpecLoc(), diag::err_constexpr_tag) << GetDiagnosticTypeSpecifierID(DS) << static_cast(DS.getConstexprSpecifier()); +else if (getLangOpt

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-02-26 Thread Mariya Podchishchaeva via cfe-commits
@@ -13823,7 +13869,9 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) { VDecl->setStorageClass(SC_Extern); // C99 6.7.8p4. All file scoped initializers need to be constant. -if (!getLangOpts().CPlusPlus && !VDecl->isInvalidDecl())

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-02-26 Thread Mariya Podchishchaeva via cfe-commits
@@ -8569,6 +8571,37 @@ static bool checkForConflictWithNonVisibleExternC(Sema &S, const T *ND, return false; } +static bool CheckC23ConstexprVarType(Sema &SemaRef, SourceLocation VarLoc, + QualType T) { + + if (T->isVariableArrayType())

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-26 Thread Balázs Kéri via cfe-commits
https://github.com/balazske edited https://github.com/llvm/llvm-project/pull/82476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-26 Thread Balázs Kéri via cfe-commits
@@ -65,12 +65,24 @@ void check_fseek(void) { fclose(fp); } +void check_fseeko(void) { balazske wrote: If we have these null pointer tests for all functions, `vfprintf` and `vfscanf` could be added too. https://github.com/llvm/llvm-project/pull/82476 _

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-26 Thread Balázs Kéri via cfe-commits
https://github.com/balazske commented: I have only small observations. https://github.com/llvm/llvm-project/pull/82476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-26 Thread Balázs Kéri via cfe-commits
@@ -5,7 +5,7 @@ // suppressed. #pragma clang system_header -typedef struct __sFILE { balazske wrote: This change looks not needed. https://github.com/llvm/llvm-project/pull/82476 ___ cfe-commits mailing list cfe-co

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-02-26 Thread Mariya Podchishchaeva via cfe-commits
@@ -1862,6 +1862,17 @@ class StringLiteral final llvm_unreachable("Unsupported character width!"); } + // Get code unit but preserve sign info. + int64_t getCodeUnitS(size_t I, uint64_t BitWidth) const { Fznamznon wrote: FYI https://github.com/llvm/l

[clang] [clang][dataflow] Correctly treat empty initializer lists for unions. (PR #82986)

2024-02-26 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/82986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Correctly treat empty initializer lists for unions. (PR #82986)

2024-02-26 Thread Gábor Horváth via cfe-commits
@@ -685,9 +685,22 @@ class TransferVisitor : public ConstStmtVisitor { // `S->inits()` contains all the initializer expressions, including the // ones for direct base classes. -auto Inits = S->inits(); +ArrayRef Inits = S->inits(); size_t InitIdx = 0; +

[clang] [clang][dataflow] Correctly treat empty initializer lists for unions. (PR #82986)

2024-02-26 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/82986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-02-26 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/73099 >From 1d70b7726e7d1f11622a6d5c8246b0737e024c8d Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Tue, 19 Sep 2023 08:37:18 -0700 Subject: [PATCH 01/13] [C23] Implement N3018: The constexpr specifier

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-02-26 Thread Mariya Podchishchaeva via cfe-commits
@@ -0,0 +1,86 @@ +// RUN: %clang_cc1 -std=c2x -verify -triple x86_64 -pedantic -Wno-conversion -Wno-constant-conversion %s Fznamznon wrote: Done. https://github.com/llvm/llvm-project/pull/73099 ___ cfe-commits mailing

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-02-26 Thread Mariya Podchishchaeva via cfe-commits
@@ -14277,6 +14325,113 @@ StmtResult Sema::ActOnCXXForRangeIdentifier(Scope *S, SourceLocation IdentLoc, : IdentLoc); } +static ImplicitConversionKind GetConversionKind(QualType FromType, Fznamznon wrote:

[clang] 78275ef - [clang][Interp] Pick the right APInt constructor on Windows

2024-02-26 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-26T18:23:41+01:00 New Revision: 78275ef0a33a808d30285603585300ce57d7ef26 URL: https://github.com/llvm/llvm-project/commit/78275ef0a33a808d30285603585300ce57d7ef26 DIFF: https://github.com/llvm/llvm-project/commit/78275ef0a33a808d30285603585300ce57d7ef26.diff LO

[clang] be02430 - Thread safety analysis: provide printSCFG definition. (#80277)

2024-02-26 Thread via cfe-commits
Author: Haojian Wu Date: 2024-02-26T18:24:53+01:00 New Revision: be024307075c37f057fd51d4de0e9c2443b51686 URL: https://github.com/llvm/llvm-project/commit/be024307075c37f057fd51d4de0e9c2443b51686 DIFF: https://github.com/llvm/llvm-project/commit/be024307075c37f057fd51d4de0e9c2443b51686.diff LO

[clang] Thread safety analysis: provide printSCFG definition. (PR #80277)

2024-02-26 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/80277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][PAC] Support ptrauth builtins and -fptrauth-intrinsics. (PR #65996)

2024-02-26 Thread Ahmed Bougacha via cfe-commits
https://github.com/ahmedbougacha updated https://github.com/llvm/llvm-project/pull/65996 >From c5cde09a5ea4a4cfcf3287f7462c38335493c02d Mon Sep 17 00:00:00 2001 From: Ahmed Bougacha Date: Wed, 16 Aug 2023 09:17:12 -0700 Subject: [PATCH] [AArch64][PAC] Support and document ptrauth builtins and

[clang] [llvm] [AArch64][PAC] Support ptrauth builtins and -fptrauth-intrinsics. (PR #65996)

2024-02-26 Thread Ahmed Bougacha via cfe-commits
@@ -0,0 +1,265 @@ +Pointer Authentication +== + +.. contents:: + :local: + +Introduction + + +Pointer authentication is a technology which offers strong probabilistic protection against exploiting a broad class of memory bugs to take control of

[clang] [llvm] [AArch64][PAC] Support ptrauth builtins and -fptrauth-intrinsics. (PR #65996)

2024-02-26 Thread Ahmed Bougacha via cfe-commits
@@ -0,0 +1,265 @@ +Pointer Authentication +== + +.. contents:: + :local: + +Introduction + + +Pointer authentication is a technology which offers strong probabilistic protection against exploiting a broad class of memory bugs to take control of

[clang] [llvm] [AArch64][PAC] Support ptrauth builtins and -fptrauth-intrinsics. (PR #65996)

2024-02-26 Thread Ahmed Bougacha via cfe-commits
@@ -0,0 +1,265 @@ +Pointer Authentication +== + +.. contents:: + :local: + +Introduction + + +Pointer authentication is a technology which offers strong probabilistic protection against exploiting a broad class of memory bugs to take control of

[clang] [llvm] [AArch64][PAC] Support ptrauth builtins and -fptrauth-intrinsics. (PR #65996)

2024-02-26 Thread Ahmed Bougacha via cfe-commits
ahmedbougacha wrote: Updated, tried to address all the comments; let me know if I missed something! https://github.com/llvm/llvm-project/pull/65996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] b876596 - [Driver] Improve error when a compiler-rt library is not found (#81037)

2024-02-26 Thread via cfe-commits
Author: Fangrui Song Date: 2024-02-26T09:55:02-08:00 New Revision: b876596a76cdc183439b36455d26883b67f8ee51 URL: https://github.com/llvm/llvm-project/commit/b876596a76cdc183439b36455d26883b67f8ee51 DIFF: https://github.com/llvm/llvm-project/commit/b876596a76cdc183439b36455d26883b67f8ee51.diff

[clang] [Driver] Improve error when a compiler-rt library is not found (PR #81037)

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

[clang] [HIP] fix host min/max in header (PR #82956)

2024-02-26 Thread Yaxun Liu via cfe-commits
@@ -1306,14 +1306,50 @@ float min(float __x, float __y) { return __builtin_fminf(__x, __y); } __DEVICE__ double min(double __x, double __y) { return __builtin_fmin(__x, __y); } +// Define host min/max functions. + #if !defined(__HIPCC_RTC__) && !defined(__OPENMP_AMDGCN__) -_

[clang] [Driver] Unify InstalledDir and Dir (PR #80527)

2024-02-26 Thread Fangrui Song via cfe-commits
MaskRay wrote: Ping:) https://github.com/llvm/llvm-project/pull/80527 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement __builtin_popcountg (PR #82359)

2024-02-26 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: Looks like the linter is upset with pre-existing changes. ok2land. Are you able to merge this @overmighty or do you need us to? https://github.com/llvm/llvm-project/pull/82359 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

2024-02-26 Thread via cfe-commits
https://github.com/gulfemsavrun updated https://github.com/llvm/llvm-project/pull/75425 >From 904957a034582f2d8805530bc51dad3df0f6 Mon Sep 17 00:00:00 2001 From: Gulfem Savrun Yeniceri Date: Thu, 14 Dec 2023 03:40:57 + Subject: [PATCH] [InstrProf] Single byte counters in coverage This

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-26 Thread Nikita Popov via cfe-commits
nikic wrote: FYI this change adds some overhead (about 0.2% for O0) builds (http://llvm-compile-time-tracker.com/compare.php?from=046682ef88a254443e8620bfd48b35bfa0a83809&to=440b1743ee0c8bfb7bf0c4b503bde5ab9af88dc0&stat=instructions:u). Is it possible to avoid it for people not using API notes?

[clang] Issue #63106: [сlang] Representation of ellipsis in AST (PR #80976)

2024-02-26 Thread Shahid Iqbal via cfe-commits
https://github.com/shahidiqbal13 updated https://github.com/llvm/llvm-project/pull/80976 >From b6bfb18e25c111baf6c95a0a4a1c3d667bb25b6d Mon Sep 17 00:00:00 2001 From: Shahid Iqbal Date: Thu, 16 Nov 2023 11:26:43 -0500 Subject: [PATCH 1/4] TESTING infra --- clang/NOTES.txt | 2 ++ 1 file chang

[clang] Issue #63106: [сlang] Representation of ellipsis in AST (PR #80976)

2024-02-26 Thread Shahid Iqbal via cfe-commits
shahidiqbal13 wrote: Hi @cor3ntin to review the updated fix, will format it later https://github.com/llvm/llvm-project/pull/80976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] fix host min/max in header (PR #82956)

2024-02-26 Thread Artem Belevich via cfe-commits
@@ -1306,15 +1306,68 @@ float min(float __x, float __y) { return __builtin_fminf(__x, __y); } __DEVICE__ double min(double __x, double __y) { return __builtin_fmin(__x, __y); } -#if !defined(__HIPCC_RTC__) && !defined(__OPENMP_AMDGCN__) -__host__ inline static int min(int __a

[clang] [Driver] Allow -fbasic-block-address-map for AArch64 ELF (PR #82662)

2024-02-26 Thread Daniel Hoekwater via cfe-commits
https://github.com/dhoekwater updated https://github.com/llvm/llvm-project/pull/82662 >From 07316bfed280a3c2ab46864ff1f2d9e50e7b170d Mon Sep 17 00:00:00 2001 From: Daniel Hoekwater Date: Thu, 22 Feb 2024 17:39:15 + Subject: [PATCH] [Driver] Allow -fbasic-block-address-map for AArch64 ELF E

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-26 Thread Haojian Wu via cfe-commits
@@ -2612,44 +2671,309 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList *TemplateParams,

[clang] [flang] [flang] Fixes for LIT testing of FLANG_RUNTIME_F128_MATH_LIB build. (PR #82832)

2024-02-26 Thread Slava Zakharin via cfe-commits
https://github.com/vzakhari closed https://github.com/llvm/llvm-project/pull/82832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6398baa - [flang] Fixes for LIT testing of FLANG_RUNTIME_F128_MATH_LIB build. (#82832)

2024-02-26 Thread via cfe-commits
Author: Slava Zakharin Date: 2024-02-26T10:54:08-08:00 New Revision: 6398baa425349ce67f39aaa67af86ec2aec96c7c URL: https://github.com/llvm/llvm-project/commit/6398baa425349ce67f39aaa67af86ec2aec96c7c DIFF: https://github.com/llvm/llvm-project/commit/6398baa425349ce67f39aaa67af86ec2aec96c7c.diff

[clang] [flang] [flang] Fixes for LIT testing of FLANG_RUNTIME_F128_MATH_LIB build. (PR #82832)

2024-02-26 Thread Slava Zakharin via cfe-commits
vzakhari wrote: I do not think the Windows CI failure has anything to do with my changes. I am going to merge this. https://github.com/llvm/llvm-project/pull/82832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [clang] Use getDefaultArgRange instead of getDefaultArg to retrieve the (PR #79296)

2024-02-26 Thread Haojian Wu via cfe-commits
hokein wrote: > Sorry for missing this! > > Would be nice to have a testcase but I see it's hard to get into the crashing > state (maybe even not possible via clang). Seems worthwhile to be robust to > such conditions and getDefaultArgRange appears less fragile. This fix was needed for the in

[clang] [clang-tools-extra] [compiler-rt] [flang] [libclc] [libcxx] [lld] [lldb] [llvm] [NFC] Remove trailing whitespace across all non-test related files (PR #82838)

2024-02-26 Thread Felipe de Azevedo Piovezan via cfe-commits
felipepiovezan wrote: > > This seems akin to running clang-format on the entire project, which last > > time we talked about still faced opposition > > My impression (I admit I haven't reviewed the whole thread lately) is that > the opposition has mostly to do with how clang-format mangles som

[clang] ce4740d - [Clang][Sema] Fix crash when MS dependent base class lookup occurs in an incomplete context (#83024)

2024-02-26 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-02-26T14:01:48-05:00 New Revision: ce4740d3e31e936aa93c115f63bf223c74c9dc20 URL: https://github.com/llvm/llvm-project/commit/ce4740d3e31e936aa93c115f63bf223c74c9dc20 DIFF: https://github.com/llvm/llvm-project/commit/ce4740d3e31e936aa93c115f63bf223c74c9dc20

[clang] [Clang][Sema] Fix crash when MS dependent base class lookup occurs in an incomplete context (PR #83024)

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

[clang] [HIP] fix host min/max in header (PR #82956)

2024-02-26 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/82956 >From c8331bffa27011b953747d3ad4f7b423cf73b4a4 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Sun, 25 Feb 2024 11:13:40 -0500 Subject: [PATCH] [HIP] fix host min/max in header CUDA defines min/max funct

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-26 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/77890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-26 Thread Erich Keane via cfe-commits
@@ -10598,10 +10598,36 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer( if (TemplateName.isDependent()) return SubstAutoTypeDependent(TSInfo->getType()); - // We can only perform deduction for class templates. + // We can only perform deduction for class

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-26 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: We probably need an entry in ReleaseNotes.rst here as well. https://github.com/llvm/llvm-project/pull/77890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-26 Thread Erich Keane via cfe-commits
@@ -10598,10 +10598,36 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer( if (TemplateName.isDependent()) return SubstAutoTypeDependent(TSInfo->getType()); - // We can only perform deduction for class templates. + // We can only perform deduction for class

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-26 Thread Erich Keane via cfe-commits
@@ -2258,6 +2258,94 @@ class ExtractTypeForDeductionGuide } }; +// Build a deduction guide with the specified parameter types. +FunctionTemplateDecl * +buildDeductionGuide(Sema &SemaRef, TemplateDecl *OriginalTemplate, +TemplateParameterList *TemplatePara

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-26 Thread Erich Keane via cfe-commits
@@ -10598,10 +10598,36 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer( if (TemplateName.isDependent()) return SubstAutoTypeDependent(TSInfo->getType()); - // We can only perform deduction for class templates. + // We can only perform deduction for class

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-26 Thread Erich Keane via cfe-commits
@@ -2612,44 +2669,313 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList *TemplateParams,

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] fix host min/max in header (PR #82956)

2024-02-26 Thread Yaxun Liu via cfe-commits
@@ -1306,15 +1306,68 @@ float min(float __x, float __y) { return __builtin_fminf(__x, __y); } __DEVICE__ double min(double __x, double __y) { return __builtin_fmin(__x, __y); } -#if !defined(__HIPCC_RTC__) && !defined(__OPENMP_AMDGCN__) -__host__ inline static int min(int __a

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
@@ -337,12 +350,77 @@ CharUnits PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const { return CharUnits::fromQuantity(4); } +ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(QualType Ty, + uint64_t &TypeSize) const { + + asse

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
@@ -271,22 +271,33 @@ namespace { class PPC32_SVR4_ABIInfo : public DefaultABIInfo { bool IsSoftFloatABI; bool IsRetSmallStructInRegABI; + bool isComplexInRegABI; + // Size of GPR in bits + unsigned RLen; + static const int NumArgGPRs = 8; CharUnits getParamTypeAli

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [asan][windows] Eliminate the static asan runtime on windows (PR #81677)

2024-02-26 Thread Charlie Barto via cfe-commits
barcharcraz wrote: > Is it feasible to create a migration path from the static runtime to the > dynamic runtime? As written, this requires users to update their ASan builds > at the same time that they take this update. Is it possible to leave the > static runtime behind, create a migration pa

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-26 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Clang changes look fine, but I don't have the expertise to review the LLVM changes, so whoever reviews LLVM feel free to 'approve' when you're ready. https://github.com/llvm/llvm-project/pull/79035 ___ cfe-comm

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] fix host min/max in header (PR #82956)

2024-02-26 Thread Artem Belevich via cfe-commits
@@ -1306,15 +1306,68 @@ float min(float __x, float __y) { return __builtin_fminf(__x, __y); } __DEVICE__ double min(double __x, double __y) { return __builtin_fmin(__x, __y); } -#if !defined(__HIPCC_RTC__) && !defined(__OPENMP_AMDGCN__) -__host__ inline static int min(int __a

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-26 Thread Egor Zhdan via cfe-commits
egorzhdan wrote: Oh, thanks @nikic for that data point. Let me try to avoid the overhead, I'll put up a patch tomorrow morning. https://github.com/llvm/llvm-project/pull/78445 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [clang-format][NFC] Skip ObjCHeaderStyleGuesser for empty code (PR #82957)

2024-02-26 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/82957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add AlignConsecutiveTableGenDefinitions option. (PR #83008)

2024-02-26 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/83008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Better bitfield access units (PR #65742)

2024-02-26 Thread Nathan Sidwell via cfe-commits
@@ -132,6 +132,7 @@ class LLVM_LIBRARY_VISIBILITY LoongArch64TargetInfo : LoongArchTargetInfo(Triple, Opts) { LongWidth = LongAlign = PointerWidth = PointerAlign = 64; IntMaxType = Int64Type = SignedLong; +HasCheapUnalignedBitfieldAccess = true; --

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [attributes][analyzer] Generalize [[clang::suppress]] to declarations. (PR #80371)

2024-02-26 Thread David Blaikie via cfe-commits
dwblaikie wrote: Commit without precommit review is fine, especially from a code owner - if you only wanted the PR for automated precommit checking, you can add the `skip-precommit-approval` to indicate that the PR isn't intended for precommit review. But, yeah, otherwise it's good that if som

[clang] [clang] Better bitfield access units (PR #65742)

2024-02-26 Thread Nathan Sidwell via cfe-commits
urnathan wrote: > Yeah, LLVM supports changing subtarget options on a per-function basis. We > would presumably make the query based on the global setting. > > Anyway, getting this information from LLVM doesn't seem tractable in the > short-to-medium term; it's just unfortunate. Thinking furt

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-26 Thread Jun Wang via cfe-commits
@@ -8069,6 +8069,67 @@ static void handleAMDGPUNumVGPRAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) AMDGPUNumVGPRAttr(S.Context, AL, NumVGPR)); } +// Returns true if error jwanggit86 wrote: (1) Updated `ReleaseNotes.rst` (2) A

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-26 Thread Jun Wang via cfe-commits
@@ -8069,6 +8069,67 @@ static void handleAMDGPUNumVGPRAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) AMDGPUNumVGPRAttr(S.Context, AL, NumVGPR)); } +// Returns true if error +static bool +checkAMDGPUMaxNumWorkGroupsArguments(Sema &S, Expr *XExpr,

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-26 Thread Jun Wang via cfe-commits
@@ -607,6 +607,29 @@ static void instantiateDependentAMDGPUWavesPerEUAttr( S.addAMDGPUWavesPerEUAttr(New, Attr, MinExpr, MaxExpr); } +static void instantiateDependentAMDGPUMaxNumWorkGroupsAttr( +Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, +const AMDG

[clang] [clang][analyzer]Add C++ polymorphic ptr arithmetic checker (PR #82977)

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

[clang] [clang][analyzer]Add C++ polymorphic ptr arithmetic checker (PR #82977)

2024-02-26 Thread via cfe-commits
@@ -0,0 +1,178 @@ +//=== PolymorphicPtrArithmetic.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: Ap

[clang] [clang][analyzer]Add C++ polymorphic ptr arithmetic checker (PR #82977)

2024-02-26 Thread via cfe-commits
@@ -0,0 +1,178 @@ +//=== PolymorphicPtrArithmetic.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: Ap

[clang] [clang][analyzer]Add C++ polymorphic ptr arithmetic checker (PR #82977)

2024-02-26 Thread via cfe-commits
https://github.com/NagyDonat commented: (First review round, I'll probably add more suggestions later.) https://github.com/llvm/llvm-project/pull/82977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [clang][analyzer]Add C++ polymorphic ptr arithmetic checker (PR #82977)

2024-02-26 Thread via cfe-commits
@@ -0,0 +1,178 @@ +//=== PolymorphicPtrArithmetic.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: Ap

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
@@ -372,11 +453,12 @@ Address PPC32_SVR4_ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAList, if (getTarget().getTriple().isOSDarwin()) { auto TI = getContext().getTypeInfoInChars(Ty); TI.Align = getParamTypeAlignment(Ty); +int ArgGPRs = NumArgGPRs; Ch

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-02-26 Thread Timothy Herchen via cfe-commits
https://github.com/anematode updated https://github.com/llvm/llvm-project/pull/82966 >From ef4c372a4d9364e6457c88a940c9af8666de0b74 Mon Sep 17 00:00:00 2001 From: Timothy Herchen Date: Mon, 26 Feb 2024 00:01:27 -0800 Subject: [PATCH] Add noinline check for __builtin_frame_address and __builtin

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
@@ -337,12 +350,77 @@ CharUnits PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const { return CharUnits::fromQuantity(4); } +ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(QualType Ty, + uint64_t &TypeSize) const { + + asse

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-26 Thread Jun Wang via cfe-commits
jwanggit86 wrote: @arsenm Any comments on the LLVM side? https://github.com/llvm/llvm-project/pull/79035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Define SwiftInfo for RISCVTargetCodeGenInfo (PR #82152)

2024-02-26 Thread Kuba Mracek via cfe-commits
https://github.com/kubamracek updated https://github.com/llvm/llvm-project/pull/82152 >From 97e2f9c1c635310da19f89f44a8085c16c3feb94 Mon Sep 17 00:00:00 2001 From: Kuba Mracek Date: Sat, 17 Feb 2024 22:26:21 -0800 Subject: [PATCH] [clang] Define SwiftInfo for RISCVTargetCodeGenInfo --- clang/

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-02-26 Thread Timothy Herchen via cfe-commits
https://github.com/anematode updated https://github.com/llvm/llvm-project/pull/82966 >From cd68484e851040fc84e66933454f6fd910566b81 Mon Sep 17 00:00:00 2001 From: Timothy Herchen Date: Mon, 26 Feb 2024 12:21:40 -0800 Subject: [PATCH] Add noinline check for __builtin_frame_address and __builtin

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-02-26 Thread Timothy Herchen via cfe-commits
https://github.com/anematode updated https://github.com/llvm/llvm-project/pull/82966 >From e5646f3f4967847ef68d428c84b30dbd4d2e8e49 Mon Sep 17 00:00:00 2001 From: Timothy Herchen Date: Mon, 26 Feb 2024 12:21:40 -0800 Subject: [PATCH] Add noinline check for __builtin_frame_address and __builtin

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
https://github.com/diggerlin deleted https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CLANG][DWARF] Do not emit -ggnu-pubnames for split dwarf version 5. (PR #82840)

2024-02-26 Thread Alexander Yermolovich via cfe-commits
https://github.com/ayermolo updated https://github.com/llvm/llvm-project/pull/82840 >From 1ac054cc8d5ee99169547ae09da0411b6e8e48e8 Mon Sep 17 00:00:00 2001 From: Alexander Yermolovich Date: Fri, 23 Feb 2024 14:52:04 -0800 Subject: [PATCH 1/2] [CLANG][DWARF] Do not emit -ggnu-pubnames for split

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
https://github.com/diggerlin deleted https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
@@ -78,6 +78,13 @@ class CodeGenOptions : public CodeGenOptionsBase { SRCK_InRegs// Small structs in registers (-freg-struct-return). }; + enum ComplexArgumentConventionKind { +CMPLX_Default, +CMPLX_OnStack, diggerlin wrote: it looks you de

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
@@ -271,22 +271,33 @@ namespace { class PPC32_SVR4_ABIInfo : public DefaultABIInfo { bool IsSoftFloatABI; bool IsRetSmallStructInRegABI; + bool isComplexInRegABI; + // Size of GPR in bits + unsigned RLen; + static const int NumArgGPRs = 8; CharUnits getParamTypeAli

[clang-tools-extra] [clang-tidy] Fix `cppcoreguidelines-missing-std-forward` false positive for deleted functions (PR #83055)

2024-02-26 Thread via cfe-commits
https://github.com/AMS21 created https://github.com/llvm/llvm-project/pull/83055 A definition like this: ```cpp template void f(T &&) = delete; ``` would previously generate the the following output: ```sh :2:12: warning: forwarding reference parameter '' is never forwarded inside the functi

[clang-tools-extra] [clang-tidy] Fix `cppcoreguidelines-missing-std-forward` false positive for deleted functions (PR #83055)

2024-02-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (AMS21) Changes A definition like this: ```cpp template void f(T &&) = delete; ``` would previously generate the the following output: ```sh :2:12: warning: forwarding reference parameter '' is never

[clang] [clang] Implement __builtin_popcountg (PR #82359)

2024-02-26 Thread via cfe-commits
overmighty wrote: @nickdesaulniers I need someone to merge this for me, I don't have write/push access. Thanks. https://github.com/llvm/llvm-project/pull/82359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-02-26 Thread Timothy Herchen via cfe-commits
https://github.com/anematode ready_for_review https://github.com/llvm/llvm-project/pull/82966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Fix a few accidental refactoring artifacts (PR #83057)

2024-02-26 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan created https://github.com/llvm/llvm-project/pull/83057 This fixes a few breakages introduced during upstreaming – please see each commit for details. >From dae96657bee753a96bc41e8cde3ca81e082d82cb Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Mon, 26 Feb 2024 2

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-02-26 Thread Timothy Herchen via cfe-commits
https://github.com/anematode edited https://github.com/llvm/llvm-project/pull/82966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Fix a few accidental refactoring artifacts (PR #83057)

2024-02-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Egor Zhdan (egorzhdan) Changes This fixes a few breakages introduced during upstreaming – please see each commit for details. --- Full diff: https://github.com/llvm/llvm-project/pull/83057.diff 2 Files Affected: - (modified) clang/lib/

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-02-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timothy Herchen (anematode) Changes Will resolve https://github.com/llvm/llvm-project/issues/66059 . GCC's behavior in the case of inlining (https://gcc.gnu.org/onlinedocs/gcc/Return-Address.html) is that a caller's return/frame address

<    1   2   3   4   5   >