[clang] [X86]Add support for __outbyte/word/dword and __inbyte/word/dword (PR #93774)

2024-06-20 Thread Malay Sanghi via cfe-commits
https://github.com/MalaySanghi updated https://github.com/llvm/llvm-project/pull/93774 >From 17c3fc95c0753ec013b22ce0c539992b24b21055 Mon Sep 17 00:00:00 2001 From: Malay Sanghi Date: Wed, 29 May 2024 22:40:47 -0700 Subject: [PATCH 1/5] Add support for _outp{|w|d} --- clang/lib/Headers/intrin

[clang] [clang][Sema] Refine unused-member-function diagnostic message for constructors (PR #84515)

2024-06-20 Thread via cfe-commits
guillem-bartina-sonarsource wrote: Ping https://github.com/llvm/llvm-project/pull/84515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Update ExternalPreprocessorSource.h (PR #96144)

2024-06-20 Thread Danial Klimkin via cfe-commits
https://github.com/dklimkin created https://github.com/llvm/llvm-project/pull/96144 Add missing includes. >From bd4f6d50b57680f520ed22b5c5108ae6d9506ca3 Mon Sep 17 00:00:00 2001 From: Danial Klimkin Date: Thu, 20 Jun 2024 09:18:18 +0200 Subject: [PATCH] Update ExternalPreprocessorSource.h Add

[clang] Update ExternalPreprocessorSource.h (PR #96144)

2024-06-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Danial Klimkin (dklimkin) Changes Add missing includes. --- Full diff: https://github.com/llvm/llvm-project/pull/96144.diff 1 Files Affected: - (modified) clang/include/clang/Lex/ExternalPreprocessorSource.h (+3) ``diff diff

[clang] 1134424 - Update ExternalPreprocessorSource.h (#96144)

2024-06-20 Thread via cfe-commits
Author: Danial Klimkin Date: 2024-06-20T09:19:27+02:00 New Revision: 11344249e1e8360e75490733660ee1439d571228 URL: https://github.com/llvm/llvm-project/commit/11344249e1e8360e75490733660ee1439d571228 DIFF: https://github.com/llvm/llvm-project/commit/11344249e1e8360e75490733660ee1439d571228.diff

[clang] Update ExternalPreprocessorSource.h (PR #96144)

2024-06-20 Thread Danial Klimkin via cfe-commits
https://github.com/dklimkin closed https://github.com/llvm/llvm-project/pull/96144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-20 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/94717 >From eeb334620df72c395a5ad27f44a864a6a0c194a5 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Thu, 6 Jun 2024 23:18:12 -0400 Subject: [PATCH 01/20] [clang][clang-doc] add asset path --- .../clang-doc/tool/C

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-20 Thread via cfe-commits
@@ -1,2 +1,2 @@ // RUN: clang-doc --format=html --executor=standalone %s -output=%t/docs | FileCheck %s -// CHECK: Using default asset: {{.*}}..\share\clang \ No newline at end of file +// CHECK: Using default asset: {{.*}}{{[\\/]}}share{{[\\/]}}clang PeterChou1

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-20 Thread via cfe-commits
https://github.com/PeterChou1 edited https://github.com/llvm/llvm-project/pull/94717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Emit int TBAA metadata on FP math libcalls (PR #96025)

2024-06-20 Thread via cfe-commits
https://github.com/vfdff updated https://github.com/llvm/llvm-project/pull/96025 >From ed6292fd0e9119322c39e5f37e2225c76e324101 Mon Sep 17 00:00:00 2001 From: zhongyunde 00443407 Date: Tue, 18 Jun 2024 09:21:07 -0400 Subject: [PATCH 1/2] [TBAA] Emit int TBAA metadata on FP math libcalls Base on

[clang] [TBAA] Emit int TBAA metadata on FP math libcalls (PR #96025)

2024-06-20 Thread via cfe-commits
@@ -707,7 +707,38 @@ static RValue emitLibraryCall(CodeGenFunction &CGF, const FunctionDecl *FD, const CallExpr *E, llvm::Constant *calleeValue) { CodeGenFunction::CGFPOptionsRAII FPOptsRAII(CGF, E); CGCallee callee = CGCallee::forDirect(calle

[clang] [TBAA] Emit int TBAA metadata on FP math libcalls (PR #96025)

2024-06-20 Thread via cfe-commits
https://github.com/vfdff edited https://github.com/llvm/llvm-project/pull/96025 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [MinGW] Set a predefined __GXX_TYPEINFO_EQUALITY_INLINE=0 for… (PR #96062)

2024-06-20 Thread Fangrui Song via cfe-commits
@@ -926,6 +926,12 @@ static void InitializePredefinedMacros(const TargetInfo &TI, if (LangOpts.GNUCVersion && LangOpts.CPlusPlus11) Builder.defineMacro("__GXX_EXPERIMENTAL_CXX0X__"); + if (TI.getTriple().isWindowsGNUEnvironment() && LangOpts.CPlusPlus) { --

[clang] [clang] [MinGW] Set a predefined __GXX_TYPEINFO_EQUALITY_INLINE=0 for… (PR #96062)

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

[clang] [clang] [MinGW] Set a predefined __GXX_TYPEINFO_EQUALITY_INLINE=0 for… (PR #96062)

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

[clang-tools-extra] [compiler-rt] [nsan] Fix style issue (PR #96142)

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

[clang-tools-extra] [compiler-rt] [nsan] Fix style issue (PR #96142)

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

[clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-20 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 approved this pull request. https://github.com/llvm/llvm-project/pull/93903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b9ad0b6 - [clang] Fix `static_cast` to array of unknown bound (#96041)

2024-06-20 Thread via cfe-commits
Author: Mariya Podchishchaeva Date: 2024-06-20T10:03:27+02:00 New Revision: b9ad0b6875950a0e161ad31447f796562f55a83a URL: https://github.com/llvm/llvm-project/commit/b9ad0b6875950a0e161ad31447f796562f55a83a DIFF: https://github.com/llvm/llvm-project/commit/b9ad0b6875950a0e161ad31447f796562f55a8

[clang] [clang] Fix `static_cast` to array of unknown bound (PR #96041)

2024-06-20 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/96041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [MinGW] Set a predefined __GXX_TYPEINFO_EQUALITY_INLINE=0 for… (PR #96062)

2024-06-20 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo updated https://github.com/llvm/llvm-project/pull/96062 From 7e6050d7e6274fe2f9b66ebecc92152f6363f025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 19 Jun 2024 14:34:12 +0300 Subject: [PATCH] [clang] [MinGW] Set a predefined __GXX_TYPEI

[clang] [clang] [MinGW] Set a predefined __GXX_TYPEINFO_EQUALITY_INLINE=0 for… (PR #96062)

2024-06-20 Thread Martin Storsjö via cfe-commits
@@ -926,6 +926,12 @@ static void InitializePredefinedMacros(const TargetInfo &TI, if (LangOpts.GNUCVersion && LangOpts.CPlusPlus11) Builder.defineMacro("__GXX_EXPERIMENTAL_CXX0X__"); + if (TI.getTriple().isWindowsGNUEnvironment() && LangOpts.CPlusPlus) { --

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-20 Thread Kristóf Umann via cfe-commits
Szelethus wrote: > The intention of the patch makes sense to me. However, I believe that the bug > is inside the Store. It should not say it's `Undefined` if actually an > existing binding overlaps (actually completely covers) the requested region. > So, that said, the checker does the right t

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-20 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus updated https://github.com/llvm/llvm-project/pull/95408 From d717b412749f10b45a9387044e97da6981f3cad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Thu, 25 Apr 2024 17:31:24 +0200 Subject: [PATCH 1/4] [analyzer] Check the correct first and la

[clang-tools-extra] [clang-tidy] add option to avoid "no checks enabled" error (PR #96122)

2024-06-20 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/96122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add option to avoid "no checks enabled" error (PR #96122)

2024-06-20 Thread Piotr Zegar via cfe-commits
@@ -125,6 +125,9 @@ Improvements to clang-tidy - Added argument `--exclude-header-filter` and config option `ExcludeHeaderFilterRegex` to exclude headers from analysis via a RegEx. +- Added argument `--allow-empty-checks` and config option `AllowEmptyCheckList`

[clang-tools-extra] [clang-tidy] add option to avoid "no checks enabled" error (PR #96122)

2024-06-20 Thread Piotr Zegar via cfe-commits
@@ -125,6 +125,9 @@ Improvements to clang-tidy - Added argument `--exclude-header-filter` and config option `ExcludeHeaderFilterRegex` to exclude headers from analysis via a RegEx. +- Added argument `--allow-empty-checks` and config option `AllowEmptyCheckList`

[clang-tools-extra] [clang-tidy] add option to avoid "no checks enabled" error (PR #96122)

2024-06-20 Thread Piotr Zegar via cfe-commits
@@ -125,6 +125,9 @@ Improvements to clang-tidy - Added argument `--exclude-header-filter` and config option `ExcludeHeaderFilterRegex` to exclude headers from analysis via a RegEx. +- Added argument `--allow-empty-checks` and config option `AllowEmptyCheckList`

[clang-tools-extra] [clang-tidy] add option to avoid "no checks enabled" error (PR #96122)

2024-06-20 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. if a reason for this parameter is not to fail wrapper scripts, then maybe run-clang-tidy.py / run-clang-tidy-diff.py should also be updated. https://github.com/llvm/llvm-project/pull/96122

[clang] [clang-tools-extra] Reland [clang][Sema, Lex, Parse] Preprocessor embed in C and C++ (PR #95802)

2024-06-20 Thread Mariya Podchishchaeva via cfe-commits
@@ -0,0 +1,98 @@ +// RUN: %clang_cc1 %s -fsyntax-only --embed-dir=%S/Inputs -verify=expected,cxx -Wno-c23-extensions +// RUN: %clang_cc1 -x c -std=c23 %s -fsyntax-only --embed-dir=%S/Inputs -verify=expected,c +#embed +; + +void f (unsigned char x) { (void)x;} +void g () {} +voi

[clang] [clang][dataflow] Add a callback run on the pre-transfer state. (PR #96140)

2024-06-20 Thread via cfe-commits
https://github.com/martinboehme updated https://github.com/llvm/llvm-project/pull/96140 >From de2f3bb0b554b316731fe38f5f4394f81561f7d0 Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Thu, 20 Jun 2024 09:06:08 + Subject: [PATCH] [clang][dataflow] Add a callback run on the pre-transfer s

[clang] [clang][dataflow] Add a callback run on the pre-transfer state. (PR #96140)

2024-06-20 Thread via cfe-commits
https://github.com/martinboehme edited https://github.com/llvm/llvm-project/pull/96140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remove preprocessor guards and global feature checks for NEON (PR #95224)

2024-06-20 Thread Maciej Gabka via cfe-commits
@@ -8086,23 +8086,21 @@ static void HandleNeonVectorTypeAttr(QualType &CurType, const ParsedAttr &Attr, // Target must have NEON (or MVE, whose vectors are similar enough // not to need a separate attribute) - if (!(S.Context.getTargetInfo().hasFeature("neon") || -

[clang] [clang-tools-extra] Reland [clang][Sema, Lex, Parse] Preprocessor embed in C and C++ (PR #95802)

2024-06-20 Thread via cfe-commits
@@ -0,0 +1,98 @@ +// RUN: %clang_cc1 %s -fsyntax-only --embed-dir=%S/Inputs -verify=expected,cxx -Wno-c23-extensions +// RUN: %clang_cc1 -x c -std=c23 %s -fsyntax-only --embed-dir=%S/Inputs -verify=expected,c +#embed +; + +void f (unsigned char x) { (void)x;} +void g () {} +voi

[clang] [llvm] [polly] [LLVM] Add InsertPosition union-type to remove overloads of Instruction-creation (PR #94226)

2024-06-20 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer closed https://github.com/llvm/llvm-project/pull/94226 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Add a callback run on the pre-transfer state. (PR #96140)

2024-06-20 Thread Dmitri Gribenko via cfe-commits
https://github.com/gribozavr approved this pull request. https://github.com/llvm/llvm-project/pull/96140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add option to avoid "no checks enabled" error (PR #96122)

2024-06-20 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > if a reason for this parameter is not to fail wrapper scripts, then maybe > run-clang-tidy.py / run-clang-tidy-diff.py should also be updated. Both of them is fine because they only count the failed file and don't do any check about failure. https://github.com/llvm/llvm-p

[clang-tools-extra] [clang-tidy] add option to avoid "no checks enabled" error (PR #96122)

2024-06-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/96122 >From 41993ea6903668c41eef8a4477f5914c894f7109 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 19 Jun 2024 23:20:09 + Subject: [PATCH 1/2] [clang-tidy] add option to avoid "no checks enabled" erro

[clang] [llvm] [AArch64][TargetParser] Split FMV and extensions (PR #92882)

2024-06-20 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm updated https://github.com/llvm/llvm-project/pull/92882 >From b3e9e2f313d3c3a51b7b6690a5cca67a3ec87dd6 Mon Sep 17 00:00:00 2001 From: Tomas Matheson Date: Tue, 18 Jun 2024 22:23:11 +0100 Subject: [PATCH 1/4] [AArch64][TargetParser] Split FMV and extensions ---

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-20 Thread Balázs Kéri via cfe-commits
balazske wrote: > > I did not find a similar test for `MallocChecker` but there could be one > > with similar test functions. > > I'm not sure what tests you are referring to. I did fix your other > observations. I meant another test file where the `NoStateChangeFuncVisitor` is tested (if the

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-20 Thread Balázs Kéri via cfe-commits
https://github.com/balazske approved this pull request. At least the `StreamChecker` part looks correct, Probably we can test on the opensource projects if there appear too many bad results (but probably not many resource leak cases are found). https://github.com/llvm/llvm-project/pull/94957 _

[clang] [llvm] [AArch64][TargetParser] Split FMV and extensions (PR #92882)

2024-06-20 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm updated https://github.com/llvm/llvm-project/pull/92882 >From b3e9e2f313d3c3a51b7b6690a5cca67a3ec87dd6 Mon Sep 17 00:00:00 2001 From: Tomas Matheson Date: Tue, 18 Jun 2024 22:23:11 +0100 Subject: [PATCH 1/4] [AArch64][TargetParser] Split FMV and extensions ---

[clang] [serialization] No transitive type change (PR #92511)

2024-06-20 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/92511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [serialization] No transitive type change (PR #92511)

2024-06-20 Thread Ilya Biryukov via cfe-commits
@@ -44,10 +44,6 @@ export inline int getA() { return 43; } -export inline int getA2(int) { ilya-biryukov wrote: I am not sure why we update the tests here. Could you clarify this, maybe in the final commit description too? (I suspect something along the

[clang] [serialization] No transitive type change (PR #92511)

2024-06-20 Thread Ilya Biryukov via cfe-commits
@@ -3262,17 +3262,18 @@ void ASTWriter::WritePragmaDiagnosticMappings(const DiagnosticsEngine &Diag, /// Write the representation of a type to the AST stream. void ASTWriter::WriteType(QualType T) { TypeIdx &IdxRef = TypeIdxs[T]; - if (IdxRef.getIndex() == 0) // we haven't

[clang] [serialization] No transitive type change (PR #92511)

2024-06-20 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov commented: Thanks! With all the explanation, the patch makes a lot of sense. Generally LG, I just have a few more NITs and feel it's good to go. I am surprised to hear we have less TypeIDs than DeclIDs. My mental model was that for every type Decl we introduce,

[clang] [serialization] No transitive type change (PR #92511)

2024-06-20 Thread Ilya Biryukov via cfe-commits
@@ -6659,13 +6655,22 @@ void ASTWriter::MacroRead(serialization::MacroID ID, MacroInfo *MI) { } void ASTWriter::TypeRead(TypeIdx Idx, QualType T) { - // Always take the highest-numbered type index. This copes with an interesting + // Always take the type index that comes i

[clang] [serialization] No transitive type change (PR #92511)

2024-06-20 Thread Ilya Biryukov via cfe-commits
@@ -70,38 +71,51 @@ using DeclID = DeclIDBase::DeclID; /// An ID number that refers to a type in an AST file. /// -/// The ID of a type is partitioned into two parts: the lower -/// three bits are used to store the const/volatile/restrict -/// qualifiers (as with QualType) and

[clang] [serialization] No transitive type change (PR #92511)

2024-06-20 Thread Ilya Biryukov via cfe-commits
@@ -7392,27 +7388,28 @@ QualType ASTReader::GetType(TypeID ID) { return TypesLoaded[Index].withFastQualifiers(FastQuals); } -QualType ASTReader::getLocalType(ModuleFile &F, unsigned LocalID) { +QualType ASTReader::getLocalType(ModuleFile &F, TypeID LocalID) { ---

[clang] [serialization] No transitive type change (PR #92511)

2024-06-20 Thread Ilya Biryukov via cfe-commits
@@ -70,38 +71,51 @@ using DeclID = DeclIDBase::DeclID; /// An ID number that refers to a type in an AST file. /// -/// The ID of a type is partitioned into two parts: the lower -/// three bits are used to store the const/volatile/restrict -/// qualifiers (as with QualType) and

[clang] [serialization] No transitive type change (PR #92511)

2024-06-20 Thread Ilya Biryukov via cfe-commits
@@ -7151,15 +7135,45 @@ TypeSourceInfo *ASTRecordReader::readTypeSourceInfo() { return TInfo; } +static unsigned getIndexForTypeID(serialization::TypeID ID) { + return (ID & llvm::maskTrailingOnes(32)) >> Qualifiers::FastWidth; + ; ilya-biryukov wrote: NI

[clang] [serialization] No transitive type change (PR #92511)

2024-06-20 Thread Ilya Biryukov via cfe-commits
@@ -7151,15 +7135,45 @@ TypeSourceInfo *ASTRecordReader::readTypeSourceInfo() { return TInfo; } +static unsigned getIndexForTypeID(serialization::TypeID ID) { + return (ID & llvm::maskTrailingOnes(32)) >> Qualifiers::FastWidth; + ; +} + +static unsigned getModuleFileIndexF

[clang] [serialization] No transitive type change (PR #92511)

2024-06-20 Thread Ilya Biryukov via cfe-commits
@@ -0,0 +1,68 @@ +// Testing that changing a type in an unused module file won't change +// the BMI of the current module file. +// +// RUN: rm -rf %t +// RUN: split-file %s %t +// +// RUN: %clang_cc1 -std=c++20 %t/m-partA.cppm -emit-reduced-module-interface -o %t/m-partA.pcm +/

[clang] [llvm] [PAC][ELF][AArch64] Encode signed GOT flag in PAuth core info (PR #96159)

2024-06-20 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 created https://github.com/llvm/llvm-project/pull/96159 Depends on #96158 Treat 7th bit of version value for llvm_linux platform as signed GOT flag. - clang: define `PointerAuthELFGOT` LangOption and set 7th bit of `aarch64-elf-pauthabi-version` LLVM module flag co

[clang] [PAC][clang][Driver] Add signed GOT flag (PR #96160)

2024-06-20 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 created https://github.com/llvm/llvm-project/pull/96160 Depends on #96159 Add `-fptrauth-elf-got` clang driver flag and set `ptrauth_elf_got` preprocessor feature and `PointerAuthELFGOT` LangOption correspondingly. For non-ELF triples, the driver flag is ignored an

[clang] [llvm] security check cookie execute only when needed (PR #95904)

2024-06-20 Thread via cfe-commits
https://github.com/mahesh-attarde updated https://github.com/llvm/llvm-project/pull/95904 >From 6d6619f8f7a37906ac45791487a4d63b51a48ad1 Mon Sep 17 00:00:00 2001 From: mahesh-attarde Date: Wed, 12 Jun 2024 06:15:51 -0700 Subject: [PATCH 1/5] added regcall strct by reg support --- clang/lib/Co

[clang] [llvm] [runtimes] remove workaround for old CMake when setting `--unwindlib=none` (PR #93429)

2024-06-20 Thread via cfe-commits
https://github.com/h-vetinari updated https://github.com/llvm/llvm-project/pull/93429 >From c8a0b127ade4330151951144f6d4841beaf66d23 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 26 May 2024 13:21:46 +1100 Subject: [PATCH 1/2] [runtimes] remove workaround for old CMake when setting `

[clang] [llvm] [runtimes] remove workaround for old CMake when setting `--unwindlib=none` (PR #93429)

2024-06-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (h-vetinari) Changes Noticed a left-over for old CMake, irrelevant now that the baseline version moved to 3.20. --- Full diff: https://github.com/llvm/llvm-project/pull/93429.diff 6 Files Affected: - (modified) clang/tools/driver/

[clang] [llvm] security check cookie execute only when needed (PR #95904)

2024-06-20 Thread via cfe-commits
mahesh-attarde wrote: @efriedma-quic do you have any more comments? https://github.com/llvm/llvm-project/pull/95904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] security check cookie execute only when needed (PR #95904)

2024-06-20 Thread via cfe-commits
mahesh-attarde wrote: @phoebewang My current PR is MachineFunctionPass, this addressed limitations of SelectionDAG based approach. https://github.com/llvm/llvm-project/pull/95904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [serialization] No transitive type change (PR #92511)

2024-06-20 Thread Chuanqi Xu via cfe-commits
@@ -70,38 +71,51 @@ using DeclID = DeclIDBase::DeclID; /// An ID number that refers to a type in an AST file. /// -/// The ID of a type is partitioned into two parts: the lower -/// three bits are used to store the const/volatile/restrict -/// qualifiers (as with QualType) and

[clang] [serialization] No transitive type change (PR #92511)

2024-06-20 Thread Chuanqi Xu via cfe-commits
@@ -44,10 +44,6 @@ export inline int getA() { return 43; } -export inline int getA2(int) { ChuanqiXu9 wrote: Previously, in `m-partA.v1.cppm`, we add a new declaration `int getA(int);`. And what we want to test is, the BMI of `useBOnly.cppm` shouldn't ch

[clang] [serialization] No transitive type change (PR #92511)

2024-06-20 Thread Chuanqi Xu via cfe-commits
@@ -70,38 +71,51 @@ using DeclID = DeclIDBase::DeclID; /// An ID number that refers to a type in an AST file. /// -/// The ID of a type is partitioned into two parts: the lower -/// three bits are used to store the const/volatile/restrict -/// qualifiers (as with QualType) and

[clang] [serialization] No transitive type change (PR #92511)

2024-06-20 Thread Chuanqi Xu via cfe-commits
@@ -6659,13 +6655,22 @@ void ASTWriter::MacroRead(serialization::MacroID ID, MacroInfo *MI) { } void ASTWriter::TypeRead(TypeIdx Idx, QualType T) { - // Always take the highest-numbered type index. This copes with an interesting + // Always take the type index that comes i

[clang] [serialization] No transitive type change (PR #92511)

2024-06-20 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,68 @@ +// Testing that changing a type in an unused module file won't change +// the BMI of the current module file. +// +// RUN: rm -rf %t +// RUN: split-file %s %t +// +// RUN: %clang_cc1 -std=c++20 %t/m-partA.cppm -emit-reduced-module-interface -o %t/m-partA.pcm +/

[clang] [serialization] No transitive type change (PR #92511)

2024-06-20 Thread Chuanqi Xu via cfe-commits
@@ -7151,15 +7135,45 @@ TypeSourceInfo *ASTRecordReader::readTypeSourceInfo() { return TInfo; } +static unsigned getIndexForTypeID(serialization::TypeID ID) { + return (ID & llvm::maskTrailingOnes(32)) >> Qualifiers::FastWidth; + ; ChuanqiXu9 wrote: Done

[clang] [serialization] No transitive type change (PR #92511)

2024-06-20 Thread Chuanqi Xu via cfe-commits
@@ -44,10 +44,6 @@ export inline int getA() { return 43; } -export inline int getA2(int) { ChuanqiXu9 wrote: Previously, in `m-partA.v1.cppm`, we add a new declaration `int getA(int);`. And what we want to test is, the BMI of `useBOnly.cppm` shouldn't ch

[clang] [serialization] No transitive type change (PR #92511)

2024-06-20 Thread Chuanqi Xu via cfe-commits
@@ -7392,27 +7388,28 @@ QualType ASTReader::GetType(TypeID ID) { return TypesLoaded[Index].withFastQualifiers(FastQuals); } -QualType ASTReader::getLocalType(ModuleFile &F, unsigned LocalID) { +QualType ASTReader::getLocalType(ModuleFile &F, TypeID LocalID) { ---

[clang] [serialization] No transitive type change (PR #92511)

2024-06-20 Thread Chuanqi Xu via cfe-commits
@@ -7151,15 +7135,45 @@ TypeSourceInfo *ASTRecordReader::readTypeSourceInfo() { return TInfo; } +static unsigned getIndexForTypeID(serialization::TypeID ID) { + return (ID & llvm::maskTrailingOnes(32)) >> Qualifiers::FastWidth; + ; +} + +static unsigned getModuleFileIndexF

[clang] [serialization] No transitive type change (PR #92511)

2024-06-20 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/92511 >From e8f756ec7f8ea7e5bf18cc122a965fb2f258fd15 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 14 May 2024 15:33:12 +0800 Subject: [PATCH 1/5] [Serialization] No transitive identifier change --- .../cla

[clang] [serialization] No transitive type change (PR #92511)

2024-06-20 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Thanks! With all the explanation, the patch makes a lot of sense. Generally > LG, I just have a few more NITs and feel it's good to go. Thanks. > > I am surprised to hear we have less TypeIDs than DeclIDs. My mental model was > that for every type Decl we introduce, we'd

[clang] [llvm] [PAC][ELF][AArch64] Encode signed GOT flag in PAuth core info (PR #96159)

2024-06-20 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/96159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [runtimes] remove workaround for old CMake when setting `--unwindlib=none` (PR #93429)

2024-06-20 Thread via cfe-commits
https://github.com/h-vetinari updated https://github.com/llvm/llvm-project/pull/93429 >From c8a0b127ade4330151951144f6d4841beaf66d23 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 26 May 2024 13:21:46 +1100 Subject: [PATCH 1/3] [runtimes] remove workaround for old CMake when setting `

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [runtimes] remove workaround for old CMake when setting `--unwindlib=none` (PR #93429)

2024-06-20 Thread via cfe-commits
https://github.com/h-vetinari updated https://github.com/llvm/llvm-project/pull/93429 >From c8a0b127ade4330151951144f6d4841beaf66d23 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 26 May 2024 13:21:46 +1100 Subject: [PATCH 1/3] [runtimes] remove workaround for old CMake when setting `

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-20 Thread Donát Nagy via cfe-commits
@@ -461,7 +446,7 @@ ProgramStateRef CStringChecker::checkInit(CheckerContext &C, if (!ER) return State; - const TypedValueRegion *Orig = getOriginRegion(ER); + const auto *Orig = ER->getSuperRegion()->getAs(); NagyDonat wrote: Nitpick: also change the

[clang] [clang] Add test for CWG2811 "Clarify "use" of main" (PR #96168)

2024-06-20 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/96168 This patch covers [CWG2811](https://cplusplus.github.io/CWG/issues/2811.html) "Clarify "use" of main", basically adding a test for `-Wmain`, focusing on usages of `main` in unevaluated contexts. To my understan

[clang] [clang] Add test for CWG2811 "Clarify "use" of main" (PR #96168)

2024-06-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch covers [CWG2811](https://cplusplus.github.io/CWG/issues/2811.html) "Clarify "use" of main", basically adding a test for `-Wmain`, focusing on usages of `main` in unevaluated contexts. To my

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [runtimes] remove workaround for old CMake when setting `--unwindlib=none` (PR #93429)

2024-06-20 Thread via cfe-commits
h-vetinari wrote: Found some more CMake cruft... Unfortunately, it doesn't improve the situation with libunwind, but at least that means I should be able to break this out into a separate PR. https://github.com/llvm/llvm-project/pull/93429 ___ cfe-co

[clang] [llvm] [PAC][ELF][AArch64] Encode signed GOT flag in PAuth core info (PR #96159)

2024-06-20 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 ready_for_review https://github.com/llvm/llvm-project/pull/96159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PAC][ELF][AArch64] Encode signed GOT flag in PAuth core info (PR #96159)

2024-06-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-llvm-binary-utilities Author: Daniil Kovalev (kovdan01) Changes Treat 7th bit of version value for llvm_linux platform as signed GOT flag. - clang: define `PointerAuthELFGOT` LangOption and set 7th bit of `aarch64-elf

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-06-20 Thread via cfe-commits
https://github.com/h-vetinari created https://github.com/llvm/llvm-project/pull/96171 Broken out from #93429 Somewhat closing the loop opened by https://github.com/llvm/llvm-project/commit/7017e6c9cfd2de3122ce9528f338a97d61e96373 >From 1df587efeb71fb1929667f008d7e9b251863d9d8 Mon Sep 17 00:00

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-06-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libcxx Author: None (h-vetinari) Changes Broken out from #93429 Somewhat closing the loop opened by https://github.com/llvm/llvm-project/commit/7017e6c9cfd2de3122ce9528f338a97d61e96373 --- Full diff: https://github.com/llvm/llvm-project/pull/96171.dif

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-06-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (h-vetinari) Changes Broken out from #93429 Somewhat closing the loop opened by https://github.com/llvm/llvm-project/commit/7017e6c9cfd2de3122ce9528f338a97d61e96373 --- Full diff: https://github.com/llvm/llvm-project/pull/96171.diff

[clang] [PAC][clang][Driver] Add signed GOT flag (PR #96160)

2024-06-20 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 ready_for_review https://github.com/llvm/llvm-project/pull/96160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC][clang][Driver] Add signed GOT flag (PR #96160)

2024-06-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Daniil Kovalev (kovdan01) Changes Depends on #96159 Add `-fptrauth-elf-got` clang driver flag and set `ptrauth_elf_got` preprocessor feature and `PointerAuthELFGOT` LangOption correspondingly. For non-ELF triples, the driver flag is igno

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [runtimes] remove workaround for old CMake when setting `--unwindlib=none` (PR #93429)

2024-06-20 Thread via cfe-commits
h-vetinari wrote: I think the riddle may be explained by @mstorsjo's excellent commit message from https://github.com/llvm/llvm-project/commit/4169b5251f58cc0eb2ac6c3b4b9990a51728aac6 (which I just found): > If the CMake requirement is bumped to 3.14, we could use `CMAKE_REQUIRED_LINK_OPTIONS`

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [runtimes] remove workaround for old CMake when setting `--unwindlib=none` (PR #93429)

2024-06-20 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > Hm, this seems to affect some feature detection (and constraints) later on, > though I don't see why/how removing the specification of `--unwindlib=none` > to the driver (leaving it only to the linker) would cause that: > > https://github.com/llvm/llvm-project/blob/1c046ca3f3

[clang] [clang-tools-extra] Reland [clang][Sema, Lex, Parse] Preprocessor embed in C and C++ (PR #95802)

2024-06-20 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,98 @@ +// RUN: %clang_cc1 %s -fsyntax-only --embed-dir=%S/Inputs -verify=expected,cxx -Wno-c23-extensions +// RUN: %clang_cc1 -x c -std=c23 %s -fsyntax-only --embed-dir=%S/Inputs -verify=expected,c +#embed +; + +void f (unsigned char x) { (void)x;} +void g () {} +voi

[clang] [clang-tools-extra] Reland [clang][Sema, Lex, Parse] Preprocessor embed in C and C++ (PR #95802)

2024-06-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. Leak fix LGTM, I think it's ready to re-land and try again. https://github.com/llvm/llvm-project/pull/95802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[libunwind] [llvm] [runtimes] remove workaround for old CMake when setting `--unwindlib=none` (PR #93429)

2024-06-20 Thread via cfe-commits
https://github.com/h-vetinari updated https://github.com/llvm/llvm-project/pull/93429 >From 8c1b899aa174b107fece1edbf99eaf261bdea516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 25 Apr 2022 09:45:22 +0300 Subject: [PATCH] [runtimes] [CMake] Use CMAKE_REQUIRED_LINK

[clang] [clang] Add test for CWG2811 "Clarify "use" of main" (PR #96168)

2024-06-20 Thread via cfe-commits
cor3ntin wrote: I think I prefer the current wording, it's clearer that it's not conforming (at the very least we should say something like "clang extension". and maybe "referring to main is a clang extension". LGTM otherwise do we have test that this is fine? ``` namespace foo { int main

[clang] [llvm] [PassManager] Remove some unnecessary includes (NFC) (PR #96175)

2024-06-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/96175 SmallPtrSet.h and TimeProfiler.h are unused. CommandLine.h is only needed for the UseNewDbgInfoFormat declare, which can be moved to the places that need it. >From 09446aad3123c3051267fd3311ffc9ad2fb99486 Mon Sep 1

[clang] [llvm] [PassManager] Remove some unnecessary includes (NFC) (PR #96175)

2024-06-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-analysis Author: Nikita Popov (nikic) Changes SmallPtrSet.h and TimeProfiler.h are unused. CommandLine.h is only needed for the UseNewDbgInfoFormat declare, which can be moved to the places that need it. --- Full diff: https://github.com/llvm/llvm

[clang-tools-extra] [clang-tidy] add option to avoid "no checks enabled" error (PR #96122)

2024-06-20 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/96122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add option to avoid "no checks enabled" error (PR #96122)

2024-06-20 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti commented: ´run-clang-tidy.py` and `clang-tidy-diff.py` should probably expose an option to enable this option via the script (maybe with an adjustment to the release notes). https://github.com/llvm/llvm-project/pull/96122 ___

[clang-tools-extra] [clang-tidy] add option to avoid "no checks enabled" error (PR #96122)

2024-06-20 Thread Julian Schmidt via cfe-commits
@@ -651,7 +659,7 @@ int clangTidyMain(int argc, const char **argv) { return 0; } - if (EnabledChecks.empty()) { + if (EnabledChecks.empty() && !AllowNoChecks) { llvm::errs() << "Error: no checks enabled.\n"; llvm::cl::PrintHelpMessage(/*Hidden=*/false, /*Cate

[libunwind] [llvm] [runtimes] remove workaround for old CMake when setting `--unwindlib=none` (PR #93429)

2024-06-20 Thread via cfe-commits
h-vetinari wrote: Haha, just when I realized the key to the whole thing - luckily my comment won the race condition at least. ;-) Thanks a lot for the fix, I've pulled it into the PR (also rebased on main while I'm at it) - and CI didn't fail as previously, so this looks great! Thank you! ht

[clang] [Clang] Clarify diagnostic notes for implicitly generated deduction guides (PR #96084)

2024-06-20 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > C++ error messages already have a reputation of being rather long; I’m > candidly doubtful as to whether this would help most users too much... I think this is more about making us more accurate when we want to point out there's something wrong with users' code. Admittedly, it

[clang] [clang] Change style of superseded issues on C++ DR status page (PR #96051)

2024-06-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, thank you, I love it! https://github.com/llvm/llvm-project/pull/96051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 993c12b - [clang] Change style of superseded issues on C++ DR status page (#96051)

2024-06-20 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-06-20T15:54:43+04:00 New Revision: 993c12b3177554d7915cde501fe5bddaa95dadae URL: https://github.com/llvm/llvm-project/commit/993c12b3177554d7915cde501fe5bddaa95dadae DIFF: https://github.com/llvm/llvm-project/commit/993c12b3177554d7915cde501fe5bddaa95dadae.

  1   2   3   4   5   >