[clang] 7e52ad3 - Fix a warning for #91455 [-Wc++20-extensions]

2024-05-10 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-05-10T16:00:16+09:00 New Revision: 7e52ad3b5b9509d0873965e8492ab01141342822 URL: https://github.com/llvm/llvm-project/commit/7e52ad3b5b9509d0873965e8492ab01141342822 DIFF: https://github.com/llvm/llvm-project/commit/7e52ad3b5b9509d0873965e8492ab01141342822.dif

[clang] 2a61eeb - Cleanup asserts in BranchParameters and DecisionParameters

2024-05-10 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-05-10T16:00:16+09:00 New Revision: 2a61eebc66c0903cf3834a520b1f975ac3cdf92b URL: https://github.com/llvm/llvm-project/commit/2a61eebc66c0903cf3834a520b1f975ac3cdf92b DIFF: https://github.com/llvm/llvm-project/commit/2a61eebc66c0903cf3834a520b1f975ac3cdf92b.dif

[clang] 6ce4c4c - [clang-format][NFC] Drop a redundant clang::format::

2024-05-10 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-05-10T00:05:16-07:00 New Revision: 6ce4c4ca2bb846c2b8d64dc2b3d3496785c9edff URL: https://github.com/llvm/llvm-project/commit/6ce4c4ca2bb846c2b8d64dc2b3d3496785c9edff DIFF: https://github.com/llvm/llvm-project/commit/6ce4c4ca2bb846c2b8d64dc2b3d3496785c9edff.diff LOG:

[clang] 6aac30f - Update FEAT_PAuth_LR behaviour for AArch64 (#90614)

2024-05-10 Thread via cfe-commits
Author: Jack Styles Date: 2024-05-10T08:09:02+01:00 New Revision: 6aac30fa43f094ac25269bda163dc89a88cb8da7 URL: https://github.com/llvm/llvm-project/commit/6aac30fa43f094ac25269bda163dc89a88cb8da7 DIFF: https://github.com/llvm/llvm-project/commit/6aac30fa43f094ac25269bda163dc89a88cb8da7.diff L

[clang] [llvm] Update FEAT_PAuth_LR behaviour for AArch64 (PR #90614)

2024-05-10 Thread Jack Styles via cfe-commits
https://github.com/Stylie777 closed https://github.com/llvm/llvm-project/pull/90614 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][driver] Accept -fallow-argument-mismatch with a warning instead of rejecting it (PR #91611)

2024-05-10 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: Thank you for this contribution Paul! > Many autotools-utilizing projects (mpich among them) fail to complete the > configure step since it tries to invoke the (unknown to them) Fortran > compiler always with the -fallow-argument-mismatch flag. It sounds like an issue with

[clang] [flang] [flang] New -fdebug-unparse-with-modules option (PR #91660)

2024-05-10 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/91660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Pass -fseparate-named-sections from the driver (PR #91567)

2024-05-10 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek updated https://github.com/llvm/llvm-project/pull/91567 >From ca2b9d52d31866a657e2eb19585cdcd11bcad7d3 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Thu, 9 May 2024 00:28:33 -0700 Subject: [PATCH 1/2] [Clang] Pass -fseparate-named-sections from the driver This is

[clang] 5d24217 - [Clang] Pass -fseparate-named-sections from the driver (#91567)

2024-05-10 Thread via cfe-commits
Author: Petr Hosek Date: 2024-05-10T00:38:52-07:00 New Revision: 5d24217c2c1c06358168cae65d3ff8632b28cd7d URL: https://github.com/llvm/llvm-project/commit/5d24217c2c1c06358168cae65d3ff8632b28cd7d DIFF: https://github.com/llvm/llvm-project/commit/5d24217c2c1c06358168cae65d3ff8632b28cd7d.diff LO

[clang] [Clang] Pass -fseparate-named-sections from the driver (PR #91567)

2024-05-10 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek closed https://github.com/llvm/llvm-project/pull/91567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Fix handling of fields with initializers in nested anonymous unions. (PR #91692)

2024-05-10 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. LGTM, but someone else should take a look as well. https://github.com/llvm/llvm-project/pull/91692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [clang-format] Fix FormatToken::isSimpleTypeSpecifier() (PR #85564)

2024-05-10 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/85564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Processing real directories added as virtual ones (PR #91645)

2024-05-10 Thread Ivan Murashko via cfe-commits
https://github.com/ivanmurashko edited https://github.com/llvm/llvm-project/pull/91645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Processing real directories added as virtual ones (PR #91645)

2024-05-10 Thread Ivan Murashko via cfe-commits
https://github.com/ivanmurashko edited https://github.com/llvm/llvm-project/pull/91645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix FormatToken::isSimpleTypeSpecifier() (PR #91712)

2024-05-10 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/91712 Remove FormatToken::isSimpleTypeSpecifier() and call Token::isSimpleTypeSpecifier(LangOpts) instead. >From 3e0b10020d15c102e050ad3785622bef01d1c075 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 10 May 2024

[clang] [clang-format] Fix FormatToken::isSimpleTypeSpecifier() (PR #91712)

2024-05-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Remove FormatToken::isSimpleTypeSpecifier() and call Token::isSimpleTypeSpecifier(LangOpts) instead. --- Patch is 29.50 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-proje

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-10 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/87208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-10 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. https://github.com/llvm/llvm-project/pull/87208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-10 Thread kadir çetinkaya via cfe-commits
@@ -135,6 +135,21 @@ TEST(IncludeCleaner, GetUnusedHeaders) { Pointee(writtenInclusion("\"dir/unused.h\""; } +TEST(IncludeCleaner, SystemUnusedHeaders) { + auto TU = TestTU::withCode(R"cpp( +#include +#include +SystemClass x; + )c

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-10 Thread kadir çetinkaya via cfe-commits
@@ -254,6 +254,10 @@ struct Fragment { /// unused or missing. These can match any suffix of the header file in /// question. std::vector> IgnoreHeader; + + /// If false (default), unused system headers will be ignored. + /// Standard library headers

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-10 Thread kadir çetinkaya via cfe-commits
@@ -572,32 +572,43 @@ struct FragmentCompiler { #else static llvm::Regex::RegexFlags Flags = llvm::Regex::NoFlags; #endif -auto Filters = std::make_shared>(); -for (auto &HeaderPattern : F.IgnoreHeader) { - // Anchor on the right. - std::string AnchoredPat

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-10 Thread kadir çetinkaya via cfe-commits
@@ -114,6 +114,7 @@ struct Config { /// these regexes. struct { std::vector> IgnoreHeader; + bool AnalyzeSystemHeaders = false; kadircet wrote: can you move the comment about regexes near `IgnoreHeader`. Also I think `AnalyzeAngledIncludes

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-10 Thread kadir çetinkaya via cfe-commits
@@ -62,15 +64,6 @@ issueIncludeCleanerDiagnostics(ParsedAST &AST, llvm::StringRef Code, const ThreadsafeFS &TFS, HeaderFilter IgnoreHeader = {}); -/// Affects whether standard library includes should be considered

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-10 Thread kadir çetinkaya via cfe-commits
@@ -572,32 +572,43 @@ struct FragmentCompiler { #else static llvm::Regex::RegexFlags Flags = llvm::Regex::NoFlags; #endif -auto Filters = std::make_shared>(); -for (auto &HeaderPattern : F.IgnoreHeader) { - // Anchor on the right. - std::string AnchoredPat

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-10 Thread kadir çetinkaya via cfe-commits
@@ -135,6 +135,21 @@ TEST(IncludeCleaner, GetUnusedHeaders) { Pointee(writtenInclusion("\"dir/unused.h\""; } +TEST(IncludeCleaner, SystemUnusedHeaders) { + auto TU = TestTU::withCode(R"cpp( +#include +#include +SystemClass x; + )c

[clang-tools-extra] [clang-tidy] use llvm::any_of refactor getAnalyzerCheckersAndPackages [NFC] (PR #91713)

2024-05-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/91713 None >From 035363d336a9b115d5584efe01733cb1b76792c4 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 10 May 2024 16:28:06 +0800 Subject: [PATCH] [clang-tidy] use llvm::any_of refactor getAnalyzerCheck

[clang-tools-extra] [clang-tidy] use llvm::any_of refactor getAnalyzerCheckersAndPackages [NFC] (PR #91713)

2024-05-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy @llvm/pr-subscribers-clang-tools-extra Author: Congcong Cai (HerrCai0907) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/91713.diff 1 Files Affected: - (modified) clang-tools-extra/clang-tidy/ClangTidy.cpp (+5-5)

[clang] [Clang] Implement __reference_converts_from_temporary (PR #91199)

2024-05-10 Thread via cfe-commits
cor3ntin wrote: This breaks the build, I'll push a fix shortly. https://github.com/llvm/llvm-project/pull/91199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [RISCV] Support .note.gnu.property for enable Zicfiss and Zicfilp extension (PR #77414)

2024-05-10 Thread Yeting Kuo via cfe-commits
@@ -954,9 +954,18 @@ void readGnuProperty(const InputSection &sec, ObjFile &f) { continue; } -uint32_t featureAndType = config->emachine == EM_AARCH64 - ? GNU_PROPERTY_AARCH64_FEATURE_1_AND - : GN

[clang] [lld] [llvm] [RISCV] Support .note.gnu.property for enable Zicfiss and Zicfilp extension (PR #77414)

2024-05-10 Thread Yeting Kuo via cfe-commits
@@ -7884,10 +7902,11 @@ template void LLVMELFDumper::printNotes() { W.printString("Type", "Unknown (" + to_string(format_hex(Type, 10)) + ")"); +uint16_t Target = this->Obj.getHeader().e_machine; yetingk wrote: Is it better to

[clang] [lld] [llvm] [RISCV] Support .note.gnu.property for enable Zicfiss and Zicfilp extension (PR #77414)

2024-05-10 Thread Yeting Kuo via cfe-commits
@@ -7884,10 +7902,11 @@ template void LLVMELFDumper::printNotes() { W.printString("Type", "Unknown (" + to_string(format_hex(Type, 10)) + ")"); +uint16_t Target = this->Obj.getHeader().e_machine; yetingk wrote: Move this defini

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-10 Thread kadir çetinkaya via cfe-commits
kadircet wrote: thanks for the patch! this definitely LGTM at high level. as you folks also pointed out we don't want to surface analysis for angled includes in general, as include-cleaner doesn't have support for system headers yet (we wanted to have something similar to Stdlib includes, whic

[clang] [clang] Set correct FPOptions if attribute 'optnone' presents (PR #85605)

2024-05-10 Thread Stephen Tozer via cfe-commits
SLTozer wrote: It looks like this is causing crashes when including precompiled headers that contain optnone functions; this can be reproduced with a very short header file and any source file, even a completely empty one. Reproducer follows: ``` $ cat header.h __attribute__((optnone)) void foo

[clang] [Clang][Sema] Revise the transformation of CTAD parameters of nested class templates (PR #91628)

2024-05-10 Thread Haojian Wu via cfe-commits
https://github.com/hokein commented: The fix looks good to me, and thanks for the comprehensive explanation in the description. https://github.com/llvm/llvm-project/pull/91628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [Clang][Sema] Revise the transformation of CTAD parameters of nested class templates (PR #91628)

2024-05-10 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/91628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Revise the transformation of CTAD parameters of nested class templates (PR #91628)

2024-05-10 Thread Haojian Wu via cfe-commits
@@ -84,3 +84,17 @@ nested_init_list::concept_fail nil_invalid{1, ""}; // expected-note@#INIT_LIST_INNER_INVALID {{candidate template ignored: substitution failure [with F = const char *]: constraints not satisfied for class template 'concept_fail' [with F = const char *]}} //

[clang] [Clang][Sema] Revise the transformation of CTAD parameters of nested class templates (PR #91628)

2024-05-10 Thread Haojian Wu via cfe-commits
@@ -2583,11 +2580,27 @@ struct ConvertConstructorToDeductionGuideTransform { //-- The types of the function parameters are those of the constructor. for (auto *OldParam : TL.getParams()) { - ParmVarDecl *NewParam = - transformFunctionTypeParam(OldPara

[clang] [clang] Processing real directories added as virtual ones (PR #91645)

2024-05-10 Thread Ivan Murashko via cfe-commits
https://github.com/ivanmurashko edited https://github.com/llvm/llvm-project/pull/91645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [RISCV] Support .note.gnu.property for enable Zicfiss and Zicfilp extension (PR #77414)

2024-05-10 Thread Yeting Kuo via cfe-commits
@@ -188,6 +188,8 @@ struct Config { StringRef zBtiReport = "none"; StringRef zCetReport = "none"; StringRef zPauthReport = "none"; + llvm::StringRef zZicfilpReport = "none"; yetingk wrote: Use `StringRef` instead of `llvm::StringRef`. https://github.co

[clang] [lld] [llvm] [RISCV] Support .note.gnu.property for enable Zicfiss and Zicfilp extension (PR #77414)

2024-05-10 Thread Yeting Kuo via cfe-commits
yetingk wrote: I am sorry that I missed the commit for a long time. Very sorry about it. https://github.com/llvm/llvm-project/pull/77414 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e6d29be - [clang] fix FMV test for Win x Arm builds (#91490)

2024-05-10 Thread Tomas Matheson via cfe-commits
Author: Tomas Matheson Date: 2024-05-10T09:57:06+01:00 New Revision: e6d29be566d19a6558597ed1ede4783e85485749 URL: https://github.com/llvm/llvm-project/commit/e6d29be566d19a6558597ed1ede4783e85485749 DIFF: https://github.com/llvm/llvm-project/commit/e6d29be566d19a6558597ed1ede4783e85485749.diff

[clang] [Clang] Fix Undefined Behavior introduced by #91199 (PR #91718)

2024-05-10 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/91718 We stacked allocated an OpaqueExpr that woukd be used after it was destroyed. >From fe25f0455d84ea3fd0d8dd988be6ae907f6661c2 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Fri, 10 May 2024 10:55:20 +0200 S

[clang] [Clang] Fix Undefined Behavior introduced by #91199 (PR #91718)

2024-05-10 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/91718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix Undefined Behavior introduced by #91199 (PR #91718)

2024-05-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes We stack allocated an OpaqueExpr that woukd be used after it was destroyed. --- Full diff: https://github.com/llvm/llvm-project/pull/91718.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaExprCXX.cpp (+

[clang] [Clang] Fix Undefined Behavior introduced by #91199 (PR #91718)

2024-05-10 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 5d24217c2c1c06358168cae65d3ff8632b28cd7d fe25f0455d84ea3fd0d8dd988be6ae907f6661c2 --

[clang] [Clang] Fix Undefined Behavior introduced by #91199 (PR #91718)

2024-05-10 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. LGTM You should leave a link in the description to the buildbot failure you're addressing. https://github.com/llvm/llvm-project/pull/91718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [Clang] Fix Undefined Behavior introduced by #91199 (PR #91718)

2024-05-10 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/91718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix Undefined Behavior introduced by #91199 (PR #91718)

2024-05-10 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/91718 >From fe25f0455d84ea3fd0d8dd988be6ae907f6661c2 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Fri, 10 May 2024 10:55:20 +0200 Subject: [PATCH 1/2] [Clang] Fix Undefined Behavior introduced by #91199 We sta

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder'. (PR #91445)

2024-05-10 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/91445 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder'. (PR #91445)

2024-05-10 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/91445 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix Undefined Behavior introduced by #91199 (PR #91718)

2024-05-10 Thread via cfe-commits
cor3ntin wrote: Merging that now to fix CI (hopefully) https://github.com/llvm/llvm-project/pull/91718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fc57f88 - [Clang] Fix Undefined Behavior introduced by #91199 (#91718)

2024-05-10 Thread via cfe-commits
Author: cor3ntin Date: 2024-05-10T11:15:26+02:00 New Revision: fc57f88f007497a4ead0ec8607ac66e1847b02d6 URL: https://github.com/llvm/llvm-project/commit/fc57f88f007497a4ead0ec8607ac66e1847b02d6 DIFF: https://github.com/llvm/llvm-project/commit/fc57f88f007497a4ead0ec8607ac66e1847b02d6.diff LOG:

[clang] [Clang] Fix Undefined Behavior introduced by #91199 (PR #91718)

2024-05-10 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/91718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder'. (PR #91445)

2024-05-10 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/91445 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder'. (PR #91445)

2024-05-10 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,196 @@ +//===-- SetgidSetuidOrderChecker.cpp - check privilege revocation calls ---===// +// +// 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 checker 'security.SetgidSetuidOrder'. (PR #91445)

2024-05-10 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: You forgot to add `CDM::CLibrary` in the definition of `SetuidDesc` and `SetgidDesc` (see the new inline comment). There are also several inline comments from my previous review where I'm expecting an answer (not necessarily a code change -- in each case

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder'. (PR #91445)

2024-05-10 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,197 @@ +//===-- SetgidSetuidOrderChecker.cpp - check privilege revocation calls ---===// +// +// 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] [analyzer] Refactor recognition of the errno getter functions (PR #91531)

2024-05-10 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/91531 From 07dc4dd5c60c8a04637cce686b379e195deb5b67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Wed, 8 May 2024 20:01:57 +0200 Subject: [PATCH 1/2] [analyzer] Refactor recognition of the errno

[clang] [llvm] [AArch64] Add intrinsics for bfloat16 min/max/minnm/maxnm (PR #90105)

2024-05-10 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov commented: LGTM, cheers! https://github.com/llvm/llvm-project/pull/90105 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Refactor recognition of the errno getter functions (PR #91531)

2024-05-10 Thread Donát Nagy via cfe-commits
@@ -39,10 +39,15 @@ namespace { // Name of the "errno" variable. // FIXME: Is there a system where it is not called "errno" but is a variable? const char *ErrnoVarName = "errno"; + // Names of functions that return a location of the "errno" value. // FIXME: Are there other si

[clang] [analyzer] Refactor recognition of the errno getter functions (PR #91531)

2024-05-10 Thread Donát Nagy via cfe-commits
@@ -54,16 +59,10 @@ class ErrnoModeling void checkLiveSymbols(ProgramStateRef State, SymbolReaper &SR) const; bool evalCall(const CallEvent &Call, CheckerContext &C) const; - // The declaration of an "errno" variable or "errno location" function. - mutable const Decl *Er

[clang] [analyzer] Refactor recognition of the errno getter functions (PR #91531)

2024-05-10 Thread Donát Nagy via cfe-commits
NagyDonat wrote: Thanks for the review, I updated my commit! https://github.com/llvm/llvm-project/pull/91531 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Refactor recognition of the errno getter functions (PR #91531)

2024-05-10 Thread Donát Nagy via cfe-commits
@@ -71,12 +71,9 @@ ProgramStateRef setErrnoState(ProgramStateRef State, ErrnoCheckState EState); /// Clear state of errno (make it irrelevant). ProgramStateRef clearErrnoState(ProgramStateRef State); -/// Determine if a `Decl` node related to 'errno'. -/// This is true if the

[clang] [Clang] Add support for [[msvc::noinline]] attribute. (PR #91720)

2024-05-10 Thread Xu Zhang via cfe-commits
https://github.com/simonzgx created https://github.com/llvm/llvm-project/pull/91720 None >From d0cde98f5e933c6f88703a55986f6cc508721fdc Mon Sep 17 00:00:00 2001 From: Xu Zhang Date: Fri, 10 May 2024 01:24:24 +0800 Subject: [PATCH 1/2] [Clang] Add support for [[msvc::noinline]] attribute. (#90

[clang] [Clang] Add support for [[msvc::noinline]] attribute. (PR #91720)

2024-05-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Xu Zhang (simonzgx) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/91720.diff 3 Files Affected: - (modified) clang/include/clang/Basic/Attr.td (+4-1) - (added) clang/test/CodeGen/attr-ms-noinline.cpp (+53) - (added)

[clang] [Clang] Add support for [[msvc::noinline]] attribute. (PR #91720)

2024-05-10 Thread Xu Zhang via cfe-commits
https://github.com/simonzgx converted_to_draft https://github.com/llvm/llvm-project/pull/91720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add support for [[msvc::noinline]] attribute. (PR #91720)

2024-05-10 Thread Xu Zhang via cfe-commits
https://github.com/simonzgx updated https://github.com/llvm/llvm-project/pull/91720 >From d0cde98f5e933c6f88703a55986f6cc508721fdc Mon Sep 17 00:00:00 2001 From: Xu Zhang Date: Fri, 10 May 2024 01:24:24 +0800 Subject: [PATCH 1/2] [Clang] Add support for [[msvc::noinline]] attribute. (#90941)

[clang] [llvm] [AArch64] Add intrinsics for 16-bit non-widening FMLA/FMLS (PR #88553)

2024-05-10 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov closed https://github.com/llvm/llvm-project/pull/88553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix FormatToken::isSimpleTypeSpecifier() (PR #91712)

2024-05-10 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. I think this will stop people introducing extra arguments to function ...isCpp,isThis,isThat) LGTM https://github.com/llvm/llvm-project/pull/91712 ___ cfe-commits mailing list cfe-commits@

[clang] [llvm] [RemoveDIs] Print IR with debug records by default (PR #91724)

2024-05-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-debuginfo Author: Stephen Tozer (SLTozer) Changes This patch makes the final major change of the RemoveDIs project, changing the default IR output from debug intrinsics to debug records. This is expected to break a large number of tests: every single o

[clang] 2371a64 - [AArch64] Add intrinsics for non-widening FMOPA/FMOPS (#88105)

2024-05-10 Thread via cfe-commits
Author: Momchil Velikov Date: 2024-05-10T11:57:08+01:00 New Revision: 2371a6410dd83e82862e1c4dce1f7411efbe6b1c URL: https://github.com/llvm/llvm-project/commit/2371a6410dd83e82862e1c4dce1f7411efbe6b1c DIFF: https://github.com/llvm/llvm-project/commit/2371a6410dd83e82862e1c4dce1f7411efbe6b1c.dif

[clang] [llvm] [AArch64] Add intrinsics for non-widening FMOPA/FMOPS (PR #88105)

2024-05-10 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov closed https://github.com/llvm/llvm-project/pull/88105 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Refactor recognition of the errno getter functions (PR #91531)

2024-05-10 Thread Balázs Kéri via cfe-commits
@@ -74,9 +73,13 @@ REGISTER_TRAIT_WITH_PROGRAMSTATE(ErrnoRegion, const MemRegion *) REGISTER_TRAIT_WITH_PROGRAMSTATE(ErrnoState, errno_modeling::ErrnoCheckState) -/// Search for a variable called "errno" in the AST. -/// Return nullptr if not found. -static const VarDecl *ge

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-10 Thread Julian Schmidt via cfe-commits
@@ -226,6 +236,10 @@ def run_clang_tidy(self): print("--") return clang_tidy_output +def check_no_diagnosis(self, clang_tidy_output): +if clang_tidy_output != "": +sys.exit

[clang] [analyzer] Refactor recognition of the errno getter functions (PR #91531)

2024-05-10 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/91531 From 07dc4dd5c60c8a04637cce686b379e195deb5b67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Wed, 8 May 2024 20:01:57 +0200 Subject: [PATCH 1/3] [analyzer] Refactor recognition of the errno

[clang-tools-extra] [clang-tidy] use llvm::any_of refactor getAnalyzerCheckersAndPackages [NFC] (PR #91713)

2024-05-10 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. https://github.com/llvm/llvm-project/pull/91713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Refactor recognition of the errno getter functions (PR #91531)

2024-05-10 Thread Balázs Kéri via cfe-commits
@@ -136,53 +100,48 @@ void ErrnoModeling::checkBeginFunction(CheckerContext &C) const { ASTContext &ACtx = C.getASTContext(); ProgramStateRef State = C.getState(); - if (const auto *ErrnoVar = dyn_cast_or_null(ErrnoDecl)) { -// There is an external 'errno' variable.

[clang] [analyzer] Refactor recognition of the errno getter functions (PR #91531)

2024-05-10 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/91531 From 07dc4dd5c60c8a04637cce686b379e195deb5b67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Wed, 8 May 2024 20:01:57 +0200 Subject: [PATCH 1/4] [analyzer] Refactor recognition of the errno

[clang] [analyzer] Refactor recognition of the errno getter functions (PR #91531)

2024-05-10 Thread Donát Nagy via cfe-commits
@@ -136,53 +100,48 @@ void ErrnoModeling::checkBeginFunction(CheckerContext &C) const { ASTContext &ACtx = C.getASTContext(); ProgramStateRef State = C.getState(); - if (const auto *ErrnoVar = dyn_cast_or_null(ErrnoDecl)) { -// There is an external 'errno' variable.

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-05-10 Thread via cfe-commits
@@ -520,6 +524,18 @@ class alignas(IdentifierInfoAlignment) IdentifierInfo { RecomputeNeedsHandleIdentifier(); } + /// Determine whether this is the contextual keyword \c module. + bool isModulesDecl() const { return IsModulesDecl; } yronglin wrote:

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-05-10 Thread via cfe-commits
@@ -1329,6 +1341,100 @@ bool Preprocessor::LexAfterModuleImport(Token &Result) { return true; } +/// Lex a token following the 'module' contextual keyword. +/// +/// [cpp.module]/p2: +/// The pp-tokens, if any, of a pp-module shall be of the form: +/// pp-module-name p

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-10 Thread Sam McCall via cfe-commits
sam-mccall wrote: This commit did three things: A) changed the implementation, B) changed the flag default, and C) deprecated the flag. Since clang now crashes on widely-used, real-world code, can we at least revert C, and ideally B until the crashes are fixed? (It would also have been helpfu

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-05-10 Thread via cfe-commits
@@ -1329,6 +1341,100 @@ bool Preprocessor::LexAfterModuleImport(Token &Result) { return true; } +/// Lex a token following the 'module' contextual keyword. +/// +/// [cpp.module]/p2: +/// The pp-tokens, if any, of a pp-module shall be of the form: +/// pp-module-name p

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-05-10 Thread via cfe-commits
@@ -932,6 +932,12 @@ def warn_module_conflict : Warning< InGroup; // C++20 modules +def err_module_decl_cannot_be_macros : Error< + "the module name in a module%select{| partition}0 declaration cannot contain " + "an object-like macro %1, it's consists of one or more iden

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-05-10 Thread via cfe-commits
@@ -520,6 +524,18 @@ class alignas(IdentifierInfoAlignment) IdentifierInfo { RecomputeNeedsHandleIdentifier(); } + /// Determine whether this is the contextual keyword \c module. + bool isModulesDecl() const { return IsModulesDecl; } + + /// Set whether this identif

[clang] 200f3bd - [Clang][Sema] access checking of friend declaration should not be delayed (#91430)

2024-05-10 Thread via cfe-commits
Author: Qizhi Hu Date: 2024-05-10T20:14:08+08:00 New Revision: 200f3bd39562f4d605f13567398025d30fa27d61 URL: https://github.com/llvm/llvm-project/commit/200f3bd39562f4d605f13567398025d30fa27d61 DIFF: https://github.com/llvm/llvm-project/commit/200f3bd39562f4d605f13567398025d30fa27d61.diff LOG:

[clang] [Clang][Sema] access checking of friend declaration should not be delayed (PR #91430)

2024-05-10 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/91430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-10 Thread via cfe-commits
cor3ntin wrote: I don't think there is motivation to revert anything at this point (we should avoid churn), however I do agree this is a regression that we should fix quickly @mizvekov. (Even if it's not a new bug, it is a newly exposed bug, the pain for users is the same) If the fix takes a

[clang] [Clang] No longer require complete types with __builtin_launder (PR #91070)

2024-05-10 Thread Erich Keane via cfe-commits
erichkeane wrote: This patch doesn't really make sense to me. Why would we want `__builtin_launder` to work on incomplete types? https://github.com/llvm/llvm-project/pull/91070 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [llvm] [AArch64] Add intrinsics for multi-vector to ZA array vector accumulators (PR #91606)

2024-05-10 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov updated https://github.com/llvm/llvm-project/pull/91606 >From d3e381ac645d08b6f3b01283d47344556a163605 Mon Sep 17 00:00:00 2001 From: Momchil Velikov Date: Thu, 9 May 2024 15:56:31 +0100 Subject: [PATCH] [AArch64] Add intrinsics for multi-vector to ZA array ve

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-10 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: It'd also be nice if someone can share a reproducer that crashes on trunk but not on 18.1.0 without names reduced to 1-2 letters. Definitely would speed up the work towards the fix. https://github.com/llvm/llvm-project/pull/89807 ___ c

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-10 Thread via cfe-commits
cor3ntin wrote: Having a clean reduction to decide whether the code is supposed to compile or not is indeed a good first step. Clang 18 was not conforming and people might have relied on it. There is a  -fno-relaxed-template-template-args that can be used as a workaround for now https://gith

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-10 Thread Erich Keane via cfe-commits
erichkeane wrote: I agree with @sam-mccall : I think "crashes on some widely-used real-world code" means we should revert `B` until we can make that case work. Yes, it is a pre-existing issue, however it means that we aren't "ready" to change the flag default. However, we DEFINITELY need a u

[clang] [Clang][Sema] Revise the transformation of CTAD parameters of nested class templates (PR #91628)

2024-05-10 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/91628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-10 Thread Erich Keane via cfe-commits
erichkeane wrote: > If you're using `creduce`, this set of arguments disables all renaming > passes: `--remove-pass pass_clang rename-fun --remove-pass pass_clang > rename-param --remove-pass pass_clang rename-var --remove-pass pass_clang > rename-class --remove-pass pass_clang rename-cxx-meth

[clang] [Clang] No longer require complete types with __builtin_launder (PR #91070)

2024-05-10 Thread via cfe-commits
cor3ntin wrote: The committee says so Because launder is just adding a fence on a pointer to T, we need not know what T is. I don't know whether there are scenarios where calling launder on an incomplete type would be useful (as presumably you would new an object right before which would req

[clang] [Clang][HIP] Warn when __AMDGCN_WAVEFRONT_SIZE is used in host code (PR #91478)

2024-05-10 Thread Fabian Ritter via cfe-commits
@@ -0,0 +1,55 @@ +/*=== __clang_hip_device_macro_guards.h - guards for HIP device macros -=== + * + * 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: Apach

[clang] [Clang] No longer require complete types with __builtin_launder (PR #91070)

2024-05-10 Thread Erich Keane via cfe-commits
erichkeane wrote: > The committee says so > > Because launder is just adding a fence on a pointer to T, we need not know > what T is. > > I don't know whether there are scenarios where calling launder on an > incomplete type would be useful (as presumably you would new an object right > befo

[clang] [Clang] No longer require complete types with __builtin_launder (PR #91070)

2024-05-10 Thread Erich Keane via cfe-commits
erichkeane wrote: > Should we try to force an instantiation in codegen for > complete-but-not-yet-instantiated classes? I think we have to here. I believe we can do this by changing the `RequireCompleteType` to pass a null `diagnoser`. See this overload: https://clang.llvm.org/doxygen/cla

[clang] [Clang][Sema] Revise the transformation of CTAD parameters of nested class templates (PR #91628)

2024-05-10 Thread Younan Zhang via cfe-commits
@@ -2583,11 +2580,27 @@ struct ConvertConstructorToDeductionGuideTransform { //-- The types of the function parameters are those of the constructor. for (auto *OldParam : TL.getParams()) { - ParmVarDecl *NewParam = - transformFunctionTypeParam(OldPara

  1   2   3   4   >