[clang] e44600f - [X86][CFE] Support EGPR in GCCRegNames. (#91323)

2024-05-08 Thread via cfe-commits
Author: Freddy Ye Date: 2024-05-08T15:07:18+08:00 New Revision: e44600f3ab58b0e93a2a80f18e17181c2bc007a4 URL: https://github.com/llvm/llvm-project/commit/e44600f3ab58b0e93a2a80f18e17181c2bc007a4 DIFF: https://github.com/llvm/llvm-project/commit/e44600f3ab58b0e93a2a80f18e17181c2bc007a4.diff LOG

[clang] [X86][CFE] Support EGPR in GCCRegNames. (PR #91323)

2024-05-08 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf closed https://github.com/llvm/llvm-project/pull/91323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix P2564 handling of variable initializers (PR #89565)

2024-05-08 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/89565 >From 218ffb6d5a03c96d46bfecdb4490277809f5b62e Mon Sep 17 00:00:00 2001 From: Dan Katz Date: Tue, 16 Apr 2024 17:14:50 -0400 Subject: [PATCH 1/8] Fix bug with constexpr initialization. --- clang/lib/Parse/Pars

[clang] [Clang] Fix P2564 handling of variable initializers (PR #89565)

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

[clang] [Coro] Relax a debug-info test (PR #91401)

2024-05-08 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. https://github.com/llvm/llvm-project/pull/91401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] CTAD: implement the missing IsDeducible constraint for alias templates (PR #89358)

2024-05-08 Thread via cfe-commits
@@ -18,6 +18,7 @@ #include "clang/AST/ExprCXX.h" #include "clang/AST/RecursiveASTVisitor.h" #include "clang/AST/TemplateName.h" +#include "clang/AST/Type.h" cor3ntin wrote: Probably not a needed change https://github.com/llvm/llvm-project/pull/89358 _

[clang] [clang] CTAD: implement the missing IsDeducible constraint for alias templates (PR #89358)

2024-05-08 Thread via cfe-commits
@@ -3239,6 +3239,40 @@ static TemplateDeductionResult FinishTemplateArgumentDeduction( return TemplateDeductionResult::Success; } +/// Complete template argument deduction for DeduceTemplateArgumentsFromType. +/// FIXME: this is mostly duplicated with the above two versions

[clang] [clang] CTAD: implement the missing IsDeducible constraint for alias templates (PR #89358)

2024-05-08 Thread via cfe-commits
@@ -6116,6 +6116,17 @@ static bool EvaluateBinaryTypeTrait(Sema &Self, TypeTrait BTT, const TypeSourceI tok::kw___is_pointer_interconvertible_base_of); return Self.IsPointerInterconvertibleBaseOf(Lhs, Rhs); + } + case BTT_IsDeducible: { +

[clang] [clang] CTAD: implement the missing IsDeducible constraint for alias templates (PR #89358)

2024-05-08 Thread via cfe-commits
@@ -3307,6 +3341,58 @@ Sema::DeduceTemplateArguments(VarTemplatePartialSpecializationDecl *Partial, return ::DeduceTemplateArguments(*this, Partial, TemplateArgs, Info); } +TemplateDeductionResult +Sema::DeduceTemplateArgumentsFromType(TemplateDecl *TD, QualType FromType, -

[clang] [clang] CTAD: implement the missing IsDeducible constraint for alias templates (PR #89358)

2024-05-08 Thread via cfe-commits
@@ -190,13 +196,15 @@ template struct Foo { Foo(T); }; template using AFoo = Foo; template concept False = false; -template using BFoo = AFoo; +template +using BFoo = AFoo; // expected-note {{candidate template ignored: constraints not satisfied [with V = int]}} \ +

[clang] [clang] CTAD: implement the missing IsDeducible constraint for alias templates (PR #89358)

2024-05-08 Thread via cfe-commits
@@ -2774,6 +2775,41 @@ Expr *transformRequireClause(Sema &SemaRef, FunctionTemplateDecl *FTD, return E.getAs(); } +// Build the associated constraints for the alias deduction guides. +// C++ [over.match.class.deduct]p3.3: +// The associated constraints ([temp.constr.decl]

[clang] [clang] CTAD: implement the missing IsDeducible constraint for alias templates (PR #89358)

2024-05-08 Thread via cfe-commits
@@ -27,7 +27,8 @@ enum TypeTrait { , #define TYPE_TRAIT_2(Spelling, Name, Key) BTT_##Name, #include "clang/Basic/TokenKinds.def" - BTT_Last = UTT_Last // BTT_Last == last BTT_XX in the enum. + BTT_Last = UTT_Last cor3ntin wrote: Why remove the comment? ht

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

2024-05-08 Thread Balázs Kéri via cfe-commits
https://github.com/balazske created https://github.com/llvm/llvm-project/pull/91445 None From d839faf7a30851a172d812137b30635c741870f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Wed, 8 May 2024 10:10:24 +0200 Subject: [PATCH] [clang][analyzer] Add checker 'Securit

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

2024-05-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 @llvm/pr-subscribers-clang Author: Balázs Kéri (balazske) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/91445.diff 6 Files Affected: - (modified) clang/docs/analyzer/checkers.rst (+28) - (modified) clang/i

[clang] [Coverage] Rework !SystemHeadersCoverage (PR #91446)

2024-05-08 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/91446 - Introduce `LeafExprSet`, - Suppress traversing LAnd and LOr expr under system headers. - Handle LAnd and LOr as instrumented leaves to override `!isInstrumentedCondition(C)`. - Replace Loc with FileLoc if i

[clang] [Coverage] Rework !SystemHeadersCoverage (PR #91446)

2024-05-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: NAKAMURA Takumi (chapuni) Changes - Introduce `LeafExprSet`, - Suppress traversing LAnd and LOr expr under system headers. - Handle LAnd and LOr as instrumented leaves to override `!isInstrumentedCondition(C)`. - Replace Loc wi

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

2024-05-08 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/91445 From d839faf7a30851a172d812137b30635c741870f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Wed, 8 May 2024 10:10:24 +0200 Subject: [PATCH 1/2] [clang][analyzer] Add checker 'Security

[clang] [llvm] [AArch64] Add support for Qualcomm Oryon processor (PR #91022)

2024-05-08 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray dismissed https://github.com/llvm/llvm-project/pull/91022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-05-08 Thread via cfe-commits
@@ -1477,8 +1477,16 @@ static Sema::AccessResult CheckAccess(Sema &S, SourceLocation Loc, // void foo(A::private_type); cor3ntin wrote: The comment above needs tweaking https://github.com/llvm/llvm-project/pull/91430 ___

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

2024-05-08 Thread via cfe-commits
@@ -229,6 +229,8 @@ void Scope::dumpImpl(raw_ostream &OS) const { {ClassInheritanceScope, "ClassInheritanceScope"}, {CatchScope, "CatchScope"}, {OpenACCComputeConstructScope, "OpenACCComputeConstructScope"}, + {TypeAliasScope, "TypeAliasScope"}, -

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

2024-05-08 Thread via cfe-commits
@@ -1477,8 +1477,16 @@ static Sema::AccessResult CheckAccess(Sema &S, SourceLocation Loc, // void foo(A::private_type); // void B::foo(A::private_type); if (S.DelayedDiagnostics.shouldDelayDiagnostics()) { -S.DelayedDiagnostics.add(DelayedDiagnostic::makeAccess(L

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

2024-05-08 Thread via cfe-commits
cor3ntin wrote: Can you add a changelog entry? 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] Add examples from [dcl.init.aggr] to C++ conformance tests (PR #91435)

2024-05-08 Thread via cfe-commits
@@ -0,0 +1,294 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + cor3ntin wrote: For future reference, can you say this is testing c++2c and maybe quote a paper number (latest working draft?) https://github.com/llvm/llvm-project/pull/91435 ___

[clang] [clang] Add examples from [dcl.init.aggr] to C++ conformance tests (PR #91435)

2024-05-08 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/91435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Add examples from [dcl.init.aggr] to C++ conformance tests (PR #91435)

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

[clang] [clang][NFC] Add examples from [dcl.init.aggr] to C++ conformance tests (PR #91435)

2024-05-08 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/91435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Add examples from [dcl.init.aggr] to C++ conformance tests (PR #91435)

2024-05-08 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,294 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + Endilll wrote: Any reference would become outdated the moment this file is touched next time, so I added one to the PR description, so it makes it into the commit message. https://github.com/llvm/ll

[clang] 602df27 - [Flang] RFC: Add support for -w option 1/n (#90420)

2024-05-08 Thread via cfe-commits
Author: Kiran Chandramohan Date: 2024-05-08T10:00:48+01:00 New Revision: 602df270a9bfcb52980a93c85eb615c0d91eba0c URL: https://github.com/llvm/llvm-project/commit/602df270a9bfcb52980a93c85eb615c0d91eba0c DIFF: https://github.com/llvm/llvm-project/commit/602df270a9bfcb52980a93c85eb615c0d91eba0c.

[clang] [flang] [Flang] RFC: Add support for -w option 1/n (PR #90420)

2024-05-08 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan closed https://github.com/llvm/llvm-project/pull/90420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-05-08 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > Can you add a changelog entry? Ah, I forgot that! will be added when applying other reviews. https://github.com/llvm/llvm-project/pull/91430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [llvm] [MC,clang,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-08 Thread Peter Smith via cfe-commits
smithp35 wrote: I will take a look, but may take me a while to go through it. Some very quick comments: * Would `--enable-experimental-crel` be a better name than `--experimental-crel` that makes it clear that the option is just an unlock of another flag, and not a flag in of itself? * I agree

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-05-08 Thread Nick Zavaritsky via cfe-commits
@@ -1950,8 +1950,22 @@ ConstantLValueEmitter::tryEmitBase(const APValue::LValueBase &base) { if (D->hasAttr()) return CGM.GetWeakRefReference(D).getPointer(); -if (auto FD = dyn_cast(D)) - return CGM.GetAddrOfFunction(FD); +if (auto FD = dyn_cast(D)) {

[clang] Revert "Revert "[OpenMP][TR12] change property of map-type modifier."… (PR #91141)

2024-05-08 Thread Tom Weaver via cfe-commits
TomWeaver18 wrote: Greetings and hello from the UK! it looks as though this commit caused a test failure on the following build bot, is anyone able to take a look see? https://lab.llvm.org/buildbot/#/builders/139/builds/65066 Will give it an hour for a reply before looking at a revert. Have

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

2024-05-08 Thread via cfe-commits
@@ -2552,7 +2553,7 @@ DeduceTemplateArguments(Sema &S, TemplateParameterList *TemplateParams, ArrayRef As, TemplateDeductionInfo &Info, SmallVectorImpl &Deduced, -bool NumberOfArgum

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

2024-05-08 Thread via cfe-commits
@@ -2583,8 +2584,11 @@ DeduceTemplateArguments(Sema &S, TemplateParameterList *TemplateParams, return TemplateDeductionResult::MiscellaneousDeductionFailure; // Perform deduction for this Pi/Ai pair. - if (auto Result = DeduceTemplateArguments(S, TemplatePa

[clang] [Clang] Fall back to DW_TAG_typedef for instantiation dependent template aliases (PR #90032)

2024-05-08 Thread Orlando Cazalet-Hyams via cfe-commits
OCHyams wrote: Here's that issue - #91451. Carlos pointed me to [bz44884](https://bugs.llvm.org/show_bug.cgi?id=44884) (#44229) which may be related https://github.com/llvm/llvm-project/pull/90032 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

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

2024-05-08 Thread Sam McCall via cfe-commits
sam-mccall wrote: This patch introduced a crash on code that clang previously accepted (I'm not sure whether the code is correct). The code is https://github.com/nvidia/stdexec/tree/467f4a68ee04f3bb4c35e7a5dd13a3419da160cb, building `test/stdexec/algos/adaptors/test_stopped_as_optional.cpp` c

[clang-tools-extra] aefad85 - [clangd] Fix data race surfaced in clangd-tsan buildbot

2024-05-08 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2024-05-08T12:00:54+02:00 New Revision: aefad851672e6dd17592895066a39aa5b388e5db URL: https://github.com/llvm/llvm-project/commit/aefad851672e6dd17592895066a39aa5b388e5db DIFF: https://github.com/llvm/llvm-project/commit/aefad851672e6dd17592895066a39aa5b388e5db.dif

[clang] Revert "Revert "[OpenMP][TR12] change property of map-type modifier."… (PR #91141)

2024-05-08 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > Greetings and hello from the UK! > > it looks as though this commit caused a test failure on the following build > bot, is anyone able to take a look see? > > https://lab.llvm.org/buildbot/#/builders/139/builds/65066 > > Will give it an hour for a reply before looking at a

[clang] [Clang][Sema] Earlier type checking for builtin unary operators (PR #90500)

2024-05-08 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Ping @shafik https://github.com/llvm/llvm-project/pull/90500 ___ 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-08 Thread via cfe-commits
cor3ntin wrote: @sam-mccall Thanks! do you have a reduction? or at least a preprocessed source file we could reduce? https://github.com/llvm/llvm-project/pull/89807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] 341aecc - Revert "Revert "Revert "[OpenMP][TR12] change property of map-type modifier."… (#91141)"

2024-05-08 Thread via cfe-commits
Author: Weaver Date: 2024-05-08T11:12:14+01:00 New Revision: 341aecc2dd0f6debcbe9f251a6d2e8a60d327eea URL: https://github.com/llvm/llvm-project/commit/341aecc2dd0f6debcbe9f251a6d2e8a60d327eea DIFF: https://github.com/llvm/llvm-project/commit/341aecc2dd0f6debcbe9f251a6d2e8a60d327eea.diff LOG: R

[clang] Revert "Revert "[OpenMP][TR12] change property of map-type modifier."… (PR #91141)

2024-05-08 Thread Tom Weaver via cfe-commits
TomWeaver18 wrote: Reverted in https://github.com/llvm/llvm-project/commit/341aecc2dd0f6debcbe9f251a6d2e8a60d327eea https://github.com/llvm/llvm-project/pull/91141 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [Serialization] Check for stack exhaustion when reading declarations (PR #79875)

2024-05-08 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: Sorry for loosing track of this change. I will go through the comments and try to land this some time next week. https://github.com/llvm/llvm-project/pull/79875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [AST] RecursiveASTVisitor: Don't traverse the alias deduction guides in the default mode. (PR #91454)

2024-05-08 Thread Haojian Wu via cfe-commits
https://github.com/hokein created https://github.com/llvm/llvm-project/pull/91454 By default (`shouldVisitImplicitCode()` returns `false`), RAV should not traverse AST nodes that are not spelled in the source code. Deduction guides for alias templates are always synthesized, so they should not

[clang] [AST] RecursiveASTVisitor: Don't traverse the alias deduction guides in the default mode. (PR #91454)

2024-05-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haojian Wu (hokein) Changes By default (`shouldVisitImplicitCode()` returns `false`), RAV should not traverse AST nodes that are not spelled in the source code. Deduction guides for alias templates are always synthesized, so they should n

[clang] [llvm] [clang][dataflow] Make `SolverTest` a type-parameterized test. (PR #91455)

2024-05-08 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/91455 This allows the tests to be run against any implementation of `Solver` instead of begin specific to `WatchedLiteralsSolver` as they currently are. >From 84a60b093952ee397b33ddbac21febae6258a006 Mon Sep 17 0

[clang] [llvm] [clang][dataflow] Make `SolverTest` a type-parameterized test. (PR #91455)

2024-05-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (martinboehme) Changes This allows the tests to be run against any implementation of `Solver` instead of begin specific to `WatchedLiteralsSolver` as they currently are. --- Full diff: https://github.com/llvm/llvm-project/pull/91455.

[clang] [AST] RecursiveASTVisitor: Don't traverse the alias deduction guides in the default mode. (PR #91454)

2024-05-08 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 2d4acb086541577ac6ab3a140b9ceb9659ce7094 e560fe2bf2d4bdc07a71682aa4d3a4bee8730b80 --

[clang] [llvm] [clang][dataflow] Make `SolverTest` a type-parameterized test. (PR #91455)

2024-05-08 Thread via cfe-commits
https://github.com/martinboehme updated https://github.com/llvm/llvm-project/pull/91455 >From 84a60b093952ee397b33ddbac21febae6258a006 Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Wed, 8 May 2024 10:29:06 + Subject: [PATCH 1/2] [clang][dataflow] Make `SolverTest` a type-parameterized

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

2024-05-08 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: It's good to see that this checker is finished. I added several inline comments, but they are not serious issues -- most are connected to `CallDescription`s where I'm now very familiar with the available options (and I refactored the code, so others are

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

2024-05-08 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] [clang][analyzer] Add checker 'Security.SetgidSetuidOrder'. (PR #91445)

2024-05-08 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-08 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] [clang][analyzer] Add checker 'Security.SetgidSetuidOrder'. (PR #91445)

2024-05-08 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,170 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core,security.SetgidSetuidOrder -verify %s + +#include "Inputs/system-header-simulator-setgid-setuid.h" + +void correct_order() { + if (setgid(getgid()) == -1) +return; + if (setuid(getuid()) == -1) +return

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

2024-05-08 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,170 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core,security.SetgidSetuidOrder -verify %s + +#include "Inputs/system-header-simulator-setgid-setuid.h" + +void correct_order() { + if (setgid(getgid()) == -1) +return; + if (setuid(getuid()) == -1) +return

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

2024-05-08 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] [clang][analyzer] Add checker 'Security.SetgidSetuidOrder'. (PR #91445)

2024-05-08 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] [clang][analyzer] Add checker 'Security.SetgidSetuidOrder'. (PR #91445)

2024-05-08 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] [clang][analyzer] Add checker 'Security.SetgidSetuidOrder'. (PR #91445)

2024-05-08 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] [clang][analyzer] Add checker 'Security.SetgidSetuidOrder'. (PR #91445)

2024-05-08 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] [clang][analyzer] Add checker 'Security.SetgidSetuidOrder'. (PR #91445)

2024-05-08 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] [clang][analyzer] Add checker 'Security.SetgidSetuidOrder'. (PR #91445)

2024-05-08 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] [clang][analyzer] Add checker 'security.SetgidSetuidOrder'. (PR #91445)

2024-05-08 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] 6fa0961 - [analyzer] Use explicit call description mode in MIGChecker (#91331)

2024-05-08 Thread via cfe-commits
Author: Donát Nagy Date: 2024-05-08T12:38:33+02:00 New Revision: 6fa09616da7436f85eb7e1e1fd74e1ac078ddb0d URL: https://github.com/llvm/llvm-project/commit/6fa09616da7436f85eb7e1e1fd74e1ac078ddb0d DIFF: https://github.com/llvm/llvm-project/commit/6fa09616da7436f85eb7e1e1fd74e1ac078ddb0d.diff LO

[clang] [analyzer] Use explicit call description mode in MIGChecker (PR #91331)

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

[clang] [clang] CTAD: implement the missing IsDeducible constraint for alias templates (PR #89358)

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

[clang] [clang] CTAD: implement the missing IsDeducible constraint for alias templates (PR #89358)

2024-05-08 Thread Haojian Wu via cfe-commits
@@ -3239,6 +3239,40 @@ static TemplateDeductionResult FinishTemplateArgumentDeduction( return TemplateDeductionResult::Success; } +/// Complete template argument deduction for DeduceTemplateArgumentsFromType. +/// FIXME: this is mostly duplicated with the above two versions

[clang] [clang] CTAD: implement the missing IsDeducible constraint for alias templates (PR #89358)

2024-05-08 Thread Haojian Wu via cfe-commits
@@ -27,7 +27,8 @@ enum TypeTrait { , #define TYPE_TRAIT_2(Spelling, Name, Key) BTT_##Name, #include "clang/Basic/TokenKinds.def" - BTT_Last = UTT_Last // BTT_Last == last BTT_XX in the enum. + BTT_Last = UTT_Last hokein wrote: oops, this is not intended. T

[clang] [clang] CTAD: implement the missing IsDeducible constraint for alias templates (PR #89358)

2024-05-08 Thread Haojian Wu via cfe-commits
@@ -190,13 +196,15 @@ template struct Foo { Foo(T); }; template using AFoo = Foo; template concept False = false; -template using BFoo = AFoo; +template +using BFoo = AFoo; // expected-note {{candidate template ignored: constraints not satisfied [with V = int]}} \ +

[clang] [clang] CTAD: implement the missing IsDeducible constraint for alias templates (PR #89358)

2024-05-08 Thread Haojian Wu via cfe-commits
@@ -3307,6 +3341,58 @@ Sema::DeduceTemplateArguments(VarTemplatePartialSpecializationDecl *Partial, return ::DeduceTemplateArguments(*this, Partial, TemplateArgs, Info); } +TemplateDeductionResult +Sema::DeduceTemplateArgumentsFromType(TemplateDecl *TD, QualType FromType, -

[clang] [clang] CTAD: implement the missing IsDeducible constraint for alias templates (PR #89358)

2024-05-08 Thread Haojian Wu via cfe-commits
https://github.com/hokein commented: Replied some review comments. I haven't updated the code yet (plan to do it after #90961) https://github.com/llvm/llvm-project/pull/89358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [clang][dataflow] Allow `DataflowAnalysisContext` to use a non-owned `Solver`. (PR #91316)

2024-05-08 Thread Mehdi Amini via cfe-commits
joker-eph wrote: CI failure wasn't unrelated actually: the CI is consistently broken after this patch (you have got an email about it?), I'll revert for now. https://github.com/llvm/llvm-project/pull/91316 ___ cfe-commits mailing list cfe-commits@list

[clang] [clang][dataflow] Allow `DataflowAnalysisContext` to use a non-owned `Solver`. (PR #91316)

2024-05-08 Thread Mehdi Amini via cfe-commits
joker-eph wrote: Actually your premerge failure here was an infra issue, but the CI is still broken after this PR somehow: https://lab.llvm.org/buildbot/#/builders/271/builds/7420 https://github.com/llvm/llvm-project/pull/91316 ___ cfe-commits mailin

[clang] [Clang][OpenMP][Tile] Ensure AST node uniqueness. (PR #91325)

2024-05-08 Thread Michael Kruse via cfe-commits
Meinersbur wrote: Test failure is from unrelated test `DataFlowSanitizer-x86_64 :: release_shadow_space.c` https://github.com/llvm/llvm-project/pull/91325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [Clang][OpenMP][Tile] Ensure AST node uniqueness. (PR #91325)

2024-05-08 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur ready_for_review https://github.com/llvm/llvm-project/pull/91325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenMP][Tile] Ensure AST node uniqueness. (PR #91325)

2024-05-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michael Kruse (Meinersbur) Changes One of the constraints of an AST is that every node object must appear at most once, hence we define lamdas that create a new AST node at every use. --- Full diff: https://github.com/llvm/llvm-project/pu

[clang] [Clang][OpenMP][Tile] Ensure AST node uniqueness. (PR #91325)

2024-05-08 Thread Alexander Batashev via cfe-commits
alexbatashev wrote: I think I'm the wrong person to review this PR. Is @alexey-bataev a more appropriate reviewer? https://github.com/llvm/llvm-project/pull/91325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [Clang][AArch64] Require SVE or SSVE for scalable types. (PR #91356)

2024-05-08 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm requested changes to this pull request. As discussed offline, I don't think we want to be this strict. As demonstrated by the changes to the ACLE tests, this change makes it impossible to distribute a library in binary form that can work for both SVE and InStr

[clang] [clang][dataflow] Allow `DataflowAnalysisContext` to use a non-owned `Solver`. (PR #91316)

2024-05-08 Thread via cfe-commits
martinboehme wrote: > Actually your premerge failure here was an infra issue, but the CI is still > broken after this PR somehow: > https://lab.llvm.org/buildbot/#/builders/271/builds/7420 > > ``` > # .---command stderr > # | error: 'expected-error' diagnostics seen but not expecte

[clang] [clang][dataflow] Allow `DataflowAnalysisContext` to use a non-owned `Solver`. (PR #91316)

2024-05-08 Thread via cfe-commits
martinboehme wrote: @joker-eph PS I don't see a revert of this PR, but I do see a revert of a different PR [here](https://github.com/llvm/llvm-project/commit/341aecc2dd0f6debcbe9f251a6d2e8a60d327eea), and that PR does look as if it could be the culprit. Maybe you commented on this PR by mist

[clang] 943617d - Typo fix; NFC

2024-05-08 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-05-08T08:03:22-04:00 New Revision: 943617d12ccbd3cf317f0bbec03d9efc700f3953 URL: https://github.com/llvm/llvm-project/commit/943617d12ccbd3cf317f0bbec03d9efc700f3953 DIFF: https://github.com/llvm/llvm-project/commit/943617d12ccbd3cf317f0bbec03d9efc700f3953.diff

[clang] [clang] CTAD: implement the missing IsDeducible constraint for alias templates (PR #89358)

2024-05-08 Thread via cfe-commits
@@ -190,13 +196,15 @@ template struct Foo { Foo(T); }; template using AFoo = Foo; template concept False = false; -template using BFoo = AFoo; +template +using BFoo = AFoo; // expected-note {{candidate template ignored: constraints not satisfied [with V = int]}} \ +

[clang] [llvm] [clang][dataflow] Make `SolverTest` a type-parameterized test. (PR #91455)

2024-05-08 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/91455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c5509fe - [HLSL] Support packoffset attribute in AST (#89836)

2024-05-08 Thread via cfe-commits
Author: Xiang Li Date: 2024-05-08T05:26:34-07:00 New Revision: c5509fedc5757fffece385d9d068e36b26793ade URL: https://github.com/llvm/llvm-project/commit/c5509fedc5757fffece385d9d068e36b26793ade DIFF: https://github.com/llvm/llvm-project/commit/c5509fedc5757fffece385d9d068e36b26793ade.diff LOG:

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-05-08 Thread Xiang Li via cfe-commits
https://github.com/python3kgae closed https://github.com/llvm/llvm-project/pull/89836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Distinguish between record kind for display and for RTTI (PR #91466)

2024-05-08 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/91466 rdar://127732562 >From d1118a8552d84e044cd0f22cd8b46e5e65b43cae Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Wed, 8 May 2024 11:55:15 +0100 Subject: [PATCH] [clang][ExtractAPI] Distinguish betwee

[clang] [clang][ExtractAPI] Distinguish between record kind for display and for RTTI (PR #91466)

2024-05-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Daniel Grumberg (daniel-grumberg) Changes rdar://127732562 --- Full diff: https://github.com/llvm/llvm-project/pull/91466.diff 3 Files Affected: - (modified) clang/include/clang/ExtractAPI/API.h (+4-2) - (modified) clang/include/clang/

[clang] [Serialization] Check for stack exhaustion when reading declarations (PR #79875)

2024-05-08 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I think we should apply @ChuanqiXu9 suggestion and merge that without tests. > At worse it's harmless, at best it solves an actual issue for users. We have > precedent for not being able to test resource exhaustion fixes. I would not be opposed to landing with a test, but

[clang] [clang][ExtractAPI] Distinguish between record kind for display and for RTTI (PR #91466)

2024-05-08 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 01e91a2dde497b71b0b85d5ec0f101a21e9c892c d1118a8552d84e044cd0f22cd8b46e5e65b43cae --

[clang] Revise the modules document for clarity (PR #90237)

2024-05-08 Thread Aaron Ballman via cfe-commits
@@ -8,109 +8,91 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The im

[clang] [llvm] [AArch64] Fix feature flags dependecies (PR #90612)

2024-05-08 Thread via cfe-commits
@@ -291,18 +290,17 @@ inline constexpr ExtensionInfo Extensions[] = { {"tme", AArch64::AEK_TME, "+tme", "-tme", FEAT_INIT, "", 0}, {"wfxt", AArch64::AEK_NONE, {}, {}, FEAT_WFXT, "+wfxt", 550}, {"gcs", AArch64::AEK_GCS, "+gcs", "-gcs", FEAT_INIT, "", 0}, -{"fpmr"

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

2024-05-08 Thread Jack Styles via cfe-commits
https://github.com/Stylie777 updated https://github.com/llvm/llvm-project/pull/90614 >From 59bc10d7418ed86f2fd94c8db5e34896164ef8e6 Mon Sep 17 00:00:00 2001 From: Jack Styles Date: Wed, 17 Apr 2024 14:17:51 +0100 Subject: [PATCH 1/4] [NFC] Add Extension Lookup to AArch64TargetParser Currently,

[clang] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

2024-05-08 Thread Anastasia Stulova via cfe-commits
AnastasiaStulova wrote: > From what I can tell, no-one except libclc is actually using this attribute? > At least on github, the only matches I’ve found for > __attribute__((assume("omp are in LLVM and various forks thereof. Given that > it’s not particularly widely used, I don’t think removal

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

2024-05-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/91430 >From a4eee6db746e8de0743369f701d1b6a3fcc84754 Mon Sep 17 00:00:00 2001 From: Qizhi Hu <836744...@qq.com> Date: Tue, 7 May 2024 22:32:39 +0800 Subject: [PATCH 1/2] [Clang][Sema] access checking of friend declaratio

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

2024-05-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/91430 >From ec4f21b7823a89a793b0799b22c6bbdb0bfb4c52 Mon Sep 17 00:00:00 2001 From: Qizhi Hu <836744...@qq.com> Date: Tue, 7 May 2024 22:32:39 +0800 Subject: [PATCH 1/2] [Clang][Sema] access checking of friend declaratio

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

2024-05-08 Thread Qizhi Hu via cfe-commits
@@ -1477,8 +1477,16 @@ static Sema::AccessResult CheckAccess(Sema &S, SourceLocation Loc, // void foo(A::private_type); jcsxky wrote: Done. https://github.com/llvm/llvm-project/pull/91430 ___ cfe-commits mailing

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

2024-05-08 Thread Qizhi Hu via cfe-commits
@@ -229,6 +229,8 @@ void Scope::dumpImpl(raw_ostream &OS) const { {ClassInheritanceScope, "ClassInheritanceScope"}, {CatchScope, "CatchScope"}, {OpenACCComputeConstructScope, "OpenACCComputeConstructScope"}, + {TypeAliasScope, "TypeAliasScope"}, -

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

2024-05-08 Thread Qizhi Hu via cfe-commits
@@ -1477,8 +1477,16 @@ static Sema::AccessResult CheckAccess(Sema &S, SourceLocation Loc, // void foo(A::private_type); // void B::foo(A::private_type); if (S.DelayedDiagnostics.shouldDelayDiagnostics()) { -S.DelayedDiagnostics.add(DelayedDiagnostic::makeAccess(L

[clang] [Coro] Relax a debug-info test (PR #91401)

2024-05-08 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 closed https://github.com/llvm/llvm-project/pull/91401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   >