[clang] [clang-format] Correctly annotate braces in macro definition (PR #107352)

2024-09-04 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. https://github.com/llvm/llvm-project/pull/107352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Analysis] Avoid repeated hash lookups (NFC) (PR #107357)

2024-09-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-analysis Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/107357.diff 1 Files Affected: - (modified) clang/lib/Analysis/ThreadSafety.cpp (+1-2) ``diff d

[clang] [Analysis] Avoid repeated hash lookups (NFC) (PR #107357)

2024-09-04 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/107357 None >From 2385bef72ae9c9808fdaeab9b83b61e9b27c4238 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 4 Sep 2024 23:35:12 -0700 Subject: [PATCH] [Analysis] Avoid repeated hash lookups (NFC) --- cla

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-04 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovichtec updated https://github.com/llvm/llvm-project/pull/105479 From 43e5fedef6b1bcabe0dae3e58affd9b2e47f7179 Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Fri, 5 Apr 2024 15:20:37 +0200 Subject: [PATCH] [clang] Catch missing format attribute

[clang] [clang-tools-extra] [llvm] [clang-format] Add support for BasedOnStyle referencing an arbitrary file (PR #107312)

2024-09-04 Thread Björn Schäpers via cfe-commits
@@ -109,6 +110,9 @@ class ChangeNamespaceTool : public ast_matchers::MatchFinder::MatchCallback { }; std::string FallbackStyle; + // Specifies the list of paths to be searched when FormatStyle or a BasedOnStyle + // in a .clang-format file specifies an arbitrary file t

[clang] [clang-tools-extra] [llvm] [clang-format] Add support for BasedOnStyle referencing an arbitrary file (PR #107312)

2024-09-04 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks commented: You are touching a lot of projects. I don't know how others feel about that, but my preference would be to tackle one project per PR. https://github.com/llvm/llvm-project/pull/107312 ___ cfe-commits mai

[clang] [clang-tools-extra] [llvm] [clang-format] Add support for BasedOnStyle referencing an arbitrary file (PR #107312)

2024-09-04 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks edited https://github.com/llvm/llvm-project/pull/107312 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [docs] Add a section on AI-generated content to the developer policy (PR #91014)

2024-09-04 Thread via cfe-commits
@@ -1301,4 +1303,28 @@ to move code from (e.g.) libc++ to the LLVM core without concern, but that code cannot be moved from the LLVM core to libc++ without the copyright owner's permission. -.. _LLVM Discourse forums: https://discourse.llvm.org +.. _ai contributions: + +AI g

[clang] [llvm] [docs] Add a section on AI-generated content to the developer policy (PR #91014)

2024-09-04 Thread via cfe-commits
@@ -1301,4 +1303,28 @@ to move code from (e.g.) libc++ to the LLVM core without concern, but that code cannot be moved from the LLVM core to libc++ without the copyright owner's permission. -.. _LLVM Discourse forums: https://discourse.llvm.org +.. _ai contributions: + +AI g

[clang] [llvm] [docs] Add a section on AI-generated content to the developer policy (PR #91014)

2024-09-04 Thread via cfe-commits
https://github.com/maflcko approved this pull request. https://github.com/llvm/llvm-project/pull/91014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly annotate braces in macro definition (PR #107352)

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

[clang] [clang][RISCV] Fix typo of vector crypto in SemaRISCV.cpp. NFC (PR #106485)

2024-09-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux` running on `sanitizer-buildbot7` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/3375 Here is the relevant piece of the

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-04 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: The problem is that I am not sure yet whether this is a breakage that is intended by this patch, and so SPEC should be fixed, or if that is otherwise something that could be fixed in this patch. It's bedtime now, my shift for today is over, so I'll only be able to take a look

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-04 Thread Madhur Amilkanthwar via cfe-commits
madhur13490 wrote: @mizvekov Is it possible to revert this until you work on the solution? SPEC is failing since this patch is landed. https://github.com/llvm/llvm-project/pull/100692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-04 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Thanks for the reduction. I can work with this reduction, but keep in mind that it's better to disable the c-reduce pass which renames things. The reason is that if this is a problem in SPEC that needs to be fixed, then having the names preserved would help locate which part o

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-04 Thread Yashwant Singh via cfe-commits
yashssh wrote: We at grace cpu are also facing same crashes on SPEC FP https://github.com/llvm/llvm-project/pull/100692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RISCV] Recognize unsupport target feature by supporting isValidFeatureName (PR #106495)

2024-09-04 Thread Piyou Chen via cfe-commits
BeMg wrote: ping https://github.com/llvm/llvm-project/pull/106495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/107160 >From 337a9ed1d5e7c71fb5be5741afe7726f5b76af7b Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 3 Sep 2024 15:30:50 -0700 Subject: [PATCH 1/5] [HLSL] Apply resource attributes to the resource type rather t

[clang] [clang][RISCV] Fix typo of vector crypto in SemaRISCV.cpp. NFC (PR #106485)

2024-09-04 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat closed https://github.com/llvm/llvm-project/pull/106485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] da8fb7f - [clang][RISCV] Fix typo of vector crypto in SemaRISCV.cpp. NFC (#106485)

2024-09-04 Thread via cfe-commits
Author: Brandon Wu Date: 2024-09-05T12:47:00+08:00 New Revision: da8fb7f4dddf48b2395f80dc09efffe38efa3d2f URL: https://github.com/llvm/llvm-project/commit/da8fb7f4dddf48b2395f80dc09efffe38efa3d2f DIFF: https://github.com/llvm/llvm-project/commit/da8fb7f4dddf48b2395f80dc09efffe38efa3d2f.diff LO

[clang] [clang-format] Correctly annotate braces in macro definition (PR #107352)

2024-09-04 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/107352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-04 Thread Helena Kotas via cfe-commits
@@ -556,46 +562,120 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } -void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) { - if (!AL.isArgIdent(0)) { -Diag(AL.getLoc(), diag::err_attribute_argument_type) -

[clang] [clang-format] Correctly annotate braces in macro definition (PR #107352)

2024-09-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Also add a test case for #106418. Fixes #107096. --- Full diff: https://github.com/llvm/llvm-project/pull/107352.diff 2 Files Affected: - (modified) clang/lib/Format/UnwrappedLineParser.cpp (+2-1) - (m

[clang] [clang-format] Correctly annotate braces in macro definition (PR #107352)

2024-09-04 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/107352 Also add a test case for #106418. Fixes #107096. >From 8b359c9ab7e2b119383235c042f9804136ee172e Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 4 Sep 2024 21:41:28 -0700 Subject: [PATCH] [clang-format] Corre

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-04 Thread Helena Kotas via cfe-commits
@@ -2062,6 +2066,7 @@ void TypePrinter::printBTFTagAttributedAfter(const BTFTagAttributedType *T, void TypePrinter::printHLSLAttributedResourceBefore( const HLSLAttributedResourceType *T, raw_ostream &OS) { printBefore(T->getWrappedType(), OS); + printAfter(T->getWrappe

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-04 Thread Helena Kotas via cfe-commits
@@ -556,46 +562,120 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } -void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) { - if (!AL.isArgIdent(0)) { -Diag(AL.getLoc(), diag::err_attribute_argument_type) -

[clang] [HLSL] Remove variables that are used only in assert (PR #107299)

2024-09-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/107299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 41c11ea - [HLSL] Remove variables that are used only in assert (#107299)

2024-09-04 Thread via cfe-commits
Author: Helena Kotas Date: 2024-09-04T21:15:48-07:00 New Revision: 41c11ea2af743051013dfcc0fced5a450e2dc9b8 URL: https://github.com/llvm/llvm-project/commit/41c11ea2af743051013dfcc0fced5a450e2dc9b8 DIFF: https://github.com/llvm/llvm-project/commit/41c11ea2af743051013dfcc0fced5a450e2dc9b8.diff

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-04 Thread Luke Lau via cfe-commits
lukel97 wrote: @mizvekov I'm not sure if it's possible to share SPEC sources due to the license, but creduce was able to get it down to this which passed with -fsyntax-only before aa7497a. ```c++ template class a; template class b; class c { template void h(const a &, const e &, const

[clang] [flang] [flang][driver] Add pre-processing type for Fortran pre-processed files (PR #104664)

2024-09-04 Thread Kareem Ergawy via cfe-commits
@@ -79,7 +79,14 @@ TYPE("c++-module-cpp-output",PP_CXXModule, INVALID, "iim",phases TYPE("ada", Ada, INVALID, nullptr, phases::Compile, phases::Backend, phases::Assemble, phases::Link) TYPE("assembler",PP_A

[clang] [flang] [flang][driver] Add pre-processing type for Fortran pre-processed files (PR #104664)

2024-09-04 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/104664 >From 5dadb7acc6741f69c139855c7a7e1b9cc0c4290b Mon Sep 17 00:00:00 2001 From: ergawy Date: Sat, 17 Aug 2024 00:20:11 -0500 Subject: [PATCH] [flang][driver] Add pre-processing type to `.i` files This diff allows

[clang] [clang] Fix FnInfoOpts::operator&= and FnInfoOpts::operator|= not updating assigned operands (PR #107050)

2024-09-04 Thread Ming-Yi Lai via cfe-commits
https://github.com/mylai-mtk updated https://github.com/llvm/llvm-project/pull/107050 >From e542003d82acfad40e1a3174ca23edf6e08a753f Mon Sep 17 00:00:00 2001 From: Ming-Yi Lai Date: Wed, 19 Jun 2024 11:28:52 +0800 Subject: [PATCH] [clang] Fix bug of FnInfoOpts::operator&= and FnInfoOpts::opera

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-09-04 Thread via cfe-commits
JinjinLi868 wrote: > The vector tests should still be added sorry. if i remove the change of the vector. i have to remove the testcase. because, for the current code convert between vector type of half and bfloat16, it has a bug. And it will be Assert "Invalid cast!"" `CastInst *CastInst::Crea

[clang] [Clang] [Driver] Support `-fjmc` for `*-windows-msvc` target in non cl driver modes (PR #107177)

2024-09-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux` running on `sanitizer-buildbot7` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/3369 Here is the relevant piece of the

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-04 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/107292 >From f1ca0a6070aa34bcce92d76df3a2e897d44e5f9c Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 3 Sep 2024 19:06:22 + Subject: [PATCH 1/2] Adding `asuint` implementation to hlsl --- clang/includ

[clang] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-09-04 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp requested changes to this pull request. It would be good to have some test coverage to go along with this. https://github.com/llvm/llvm-project/pull/104856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] b2048de - [Clang] [Driver] Support `-fjmc` for `*-windows-msvc` target in non cl driver modes (#107177)

2024-09-04 Thread via cfe-commits
Author: Max Winkler Date: 2024-09-04T18:52:39-07:00 New Revision: b2048de55ea934b70902864767b0cc8dfada8be0 URL: https://github.com/llvm/llvm-project/commit/b2048de55ea934b70902864767b0cc8dfada8be0 DIFF: https://github.com/llvm/llvm-project/commit/b2048de55ea934b70902864767b0cc8dfada8be0.diff L

[clang] [Clang] [Driver] Support `-fjmc` for `*-windows-msvc` target in non cl driver modes (PR #107177)

2024-09-04 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 closed https://github.com/llvm/llvm-project/pull/107177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-04 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/107292 >From f1ca0a6070aa34bcce92d76df3a2e897d44e5f9c Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 3 Sep 2024 19:06:22 + Subject: [PATCH 1/2] Adding `asuint` implementation to hlsl --- clang/includ

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-04 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/107292 >From f1ca0a6070aa34bcce92d76df3a2e897d44e5f9c Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 3 Sep 2024 19:06:22 + Subject: [PATCH 1/2] Adding `asuint` implementation to hlsl --- clang/includ

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-09-04 Thread Jun Wang via cfe-commits
@@ -433,6 +433,13 @@ struct AAAMDAttributesFunction : public AAAMDAttributes { indicatePessimisticFixpoint(); return; } + +for (Instruction &I : instructions(F)) { + if (isa(I) || isa(I)) { jwanggit86 wrote: Thanks. This has been updat

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-09-04 Thread Jun Wang via cfe-commits
@@ -677,6 +687,36 @@ struct AAAMDAttributesFunction : public AAAMDAttributes { return !A.checkForAllCallLikeInstructions(DoesNotRetrieve, *this, UsedAssumedInformation); } + + // Returns true if FlatScratchInit is needed, i.e

[clang] [Clang] Implement type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

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

[clang] [Clang] Implement type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-09-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: Justin Stitt (JustinStitt) Changes [Related RFC](https://discourse.llvm.org/t/rfc-support-globpattern-add-operator-to-invert-matches/80683/5?u=justinstitt) ### Summary Implement type-based filtering via

[clang] [Clang] Implement type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-09-04 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt created https://github.com/llvm/llvm-project/pull/107332 [Related RFC](https://discourse.llvm.org/t/rfc-support-globpattern-add-operator-to-invert-matches/80683/5?u=justinstitt) ### Summary Implement type-based filtering via [Sanitizer Special Case Lists](https

[clang] 2345796 - Revert "[-Wunsafe-buffer-usage] Warning Libc functions (#101583)"

2024-09-04 Thread via cfe-commits
Author: ziqingluo-90 Date: 2024-09-04T16:26:44-07:00 New Revision: 23457964392d00fc872fa6021763859024fb38da URL: https://github.com/llvm/llvm-project/commit/23457964392d00fc872fa6021763859024fb38da DIFF: https://github.com/llvm/llvm-project/commit/23457964392d00fc872fa6021763859024fb38da.diff

[clang] [-Wunsafe-buffer-usage] Warning Libc functions (PR #101583)

2024-09-04 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: > There needs to be a flag to opt out of this to not break everybody who is > currently using unsafe-buffer-usage. #105383 seems to do that, but it really > should be in this same PR. Can this be reverted and relanded with the flag? ok, will do https://github.com/llvm/llvm

[clang] [HLSL] Remove variables that are used only in assert (PR #107299)

2024-09-04 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/107299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-09-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/104544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9efe377 - [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (#104544)

2024-09-04 Thread via cfe-commits
Author: Helena Kotas Date: 2024-09-04T16:03:13-07:00 New Revision: 9efe377307694be0c92f7cb3b02fd1d090fdbeb8 URL: https://github.com/llvm/llvm-project/commit/9efe377307694be0c92f7cb3b02fd1d090fdbeb8 DIFF: https://github.com/llvm/llvm-project/commit/9efe377307694be0c92f7cb3b02fd1d090fdbeb8.diff

[clang] [HLSL] Remove variables that are used only in assert (PR #107299)

2024-09-04 Thread Helena Kotas via cfe-commits
@@ -834,17 +834,10 @@ static void ValidateMultipleRegisterAnnotations(Sema &S, Decl *TheDecl, static void DiagnoseHLSLRegisterAttribute(Sema &S, SourceLocation &ArgLoc, Decl *TheDecl, RegisterType regType) { - // Samplers, UAVs, and

[clang] [HLSL] Remove variables that are used only in assert (PR #107299)

2024-09-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/107299 >From 038e47d8ec75c03b895eb8bb5540f1fee9f4b936 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 4 Sep 2024 12:55:43 -0700 Subject: [PATCH 1/2] [HLSL] Remove variables used only in assert --- clang/lib/Sem

[clang] [llvm] [Clang] Add env var for nvptx-arch/amdgpu-arch timeout (PR #102521)

2024-09-04 Thread Joel E. Denny via cfe-commits
@@ -116,6 +116,16 @@ ToolChain::executeToolChainProgram(StringRef Executable, }; std::string ErrorMessage; + int SecondsToWait = 60; + if (std::optional Str = + llvm::sys::Process::GetEnv("CLANG_TOOLCHAIN_PROGRAM_TIMEOUT")) { +if (!llvm::to_integer(*Str, Sec

[clang] 7c4eb60 - [Clang] Fix CLANG_TOOLCHAIN_PROGRAM_TIMEOUT logic

2024-09-04 Thread Joel E. Denny via cfe-commits
Author: Joel E. Denny Date: 2024-09-04T18:43:54-04:00 New Revision: 7c4eb60c9509c3a750961eac2dbcaad369d911f2 URL: https://github.com/llvm/llvm-project/commit/7c4eb60c9509c3a750961eac2dbcaad369d911f2 DIFF: https://github.com/llvm/llvm-project/commit/7c4eb60c9509c3a750961eac2dbcaad369d911f2.diff

[clang] [clang-tools-extra] [NFC] Add explicit #include llvm-config.h where its macros are used, clang part. (PR #107301)

2024-09-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Daniil Fukalov (dfukalov) Changes (this is clang related part) Without these explicit includes, removing other headers, who implicitly include llvm-config.h, may have non-trivial side effects. For example, `clagd` may report

[clang] [clang-tools-extra] [NFC] Add explicit #include llvm-config.h where its macros are used, clang part. (PR #107301)

2024-09-04 Thread Daniil Fukalov via cfe-commits
https://github.com/dfukalov updated https://github.com/llvm/llvm-project/pull/107301 >From f955f992b39bfcbdd7d200664678d4c1884c2fd4 Mon Sep 17 00:00:00 2001 From: dfukalov Date: Wed, 4 Sep 2024 22:11:24 +0200 Subject: [PATCH] [NFC] Add explicit #include llvm-config.h where its macros are used,

[clang] [clang-tools-extra] [NFC] Add explicit #include llvm-config.h where its macros are used, clang part. (PR #107301)

2024-09-04 Thread Daniil Fukalov via cfe-commits
https://github.com/dfukalov ready_for_review https://github.com/llvm/llvm-project/pull/107301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] [polly] [NFC] Add explicit #include llvm-config.h where its macros are used. (PR #106810)

2024-09-04 Thread Daniil Fukalov via cfe-commits
https://github.com/dfukalov updated https://github.com/llvm/llvm-project/pull/106810 >From 7e9c4b1d0da02cf923a790c8025ac1e1a333094e Mon Sep 17 00:00:00 2001 From: dfukalov Date: Sat, 31 Aug 2024 01:45:27 +0200 Subject: [PATCH 1/3] [NFC] Add explicit #include llvm-config.h where its macros are

[clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] [polly] [NFC] Add explicit #include llvm-config.h where its macros are used. (PR #106810)

2024-09-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-pgo Author: Daniil Fukalov (dfukalov) Changes This is the second part. Without these explicit includes, removing other headers, who implicitly include llvm-config.h, may have non-trivial side effects. For example, `clagd` may report `llvm-config.h` as

[clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] [polly] [NFC] Add explicit #include llvm-config.h where its macros are used. (PR #106810)

2024-09-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-platform-windows @llvm/pr-subscribers-debuginfo Author: Daniil Fukalov (dfukalov) Changes This is the second part. Without these explicit includes, removing other headers, who implicitly include llvm-config.h, may have non-trivial side effects. For exa

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-09-04 Thread Jun Wang via cfe-commits
@@ -1054,12 +1054,6 @@ GCNUserSGPRUsageInfo::GCNUserSGPRUsageInfo(const Function &F, const CallingConv::ID CC = F.getCallingConv(); const bool IsKernel = CC == CallingConv::AMDGPU_KERNEL || CC == CallingConv::SPIR_KERNEL; - // FIXME: Should have analysis or somethin

[clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] [polly] [NFC] Add explicit #include llvm-config.h where its macros are used. (PR #106810)

2024-09-04 Thread Daniil Fukalov via cfe-commits
https://github.com/dfukalov ready_for_review https://github.com/llvm/llvm-project/pull/106810 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][HLSL] Add sign intrinsic part 3 (PR #101989)

2024-09-04 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/101989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-04 Thread via cfe-commits
https://github.com/joaosaffran edited https://github.com/llvm/llvm-project/pull/107292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Warning Libc functions (PR #101583)

2024-09-04 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: There needs to be a flag to opt out of this to not break everybody who is currently using unsafe-buffer-usage. #105383 seems to do that, but it really should be in this same PR. Can this be reverted and relanded with the flag? https://github.com/llvm/llvm-project/pull/101583 __

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-04 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/107292 >From f1ca0a6070aa34bcce92d76df3a2e897d44e5f9c Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 3 Sep 2024 19:06:22 + Subject: [PATCH 1/2] Adding `asuint` implementation to hlsl --- clang/includ

[clang] [llvm] Add step builtins and step HLSL function to DirectX and SPIR-V backend (PR #106471)

2024-09-04 Thread Xiang Li via cfe-commits
https://github.com/python3kgae approved this pull request. https://github.com/llvm/llvm-project/pull/106471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Prevent crash due to missing EventDispatch in corner case (PR #107294)

2024-09-04 Thread via cfe-commits
https://github.com/vabridgers updated https://github.com/llvm/llvm-project/pull/107294 >From e8b71519145c710d01734ce01bd6360979a1e577 Mon Sep 17 00:00:00 2001 From: Vince Bridgers Date: Wed, 4 Sep 2024 20:36:06 +0200 Subject: [PATCH] [analyzer] Prevent crash due to missing EventDispatch in cor

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-04 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/107292 >From f1ca0a6070aa34bcce92d76df3a2e897d44e5f9c Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 3 Sep 2024 19:06:22 + Subject: [PATCH 1/2] Adding `asuint` implementation to hlsl --- clang/includ

[clang] [Clang] Remove 3-element vector load and store special handling (PR #104661)

2024-09-04 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/104661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remove 3-element vector load and store special handling (PR #104661)

2024-09-04 Thread Shilei Tian via cfe-commits
@@ -45,7 +45,7 @@ void test3(packedfloat3 *p) { *p = (packedfloat3) { 3.2f, 2.3f, 0.1f }; } // CHECK: @test3( -// CHECK: store <4 x float> {{.*}}, align 4 +// CHECK: store <3 x float> {{.*}}, align 4 shiltian wrote: Then I guess this can be more general: add

[clang] [clang-tools-extra] [llvm] [clang-format] Add support for BasedOnStyle referencing an arbitrary file (PR #107312)

2024-09-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-support Author: Ryan Saunders (jediry) Changes At present, the ```BasedOnStyle``` directive can reference a predefined style name, or ```InheritFromParent```, instructing clang-format to search upward in the directory hierarchy for a .clang-format

[clang] [clang-tools-extra] [llvm] [clang-format] Add support for BasedOnStyle referencing an arbitrary file (PR #107312)

2024-09-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Ryan Saunders (jediry) Changes At present, the ```BasedOnStyle``` directive can reference a predefined style name, or ```InheritFromParent```, instructing clang-format to search upward in the directory hierarchy for a .clang-format f

[clang] [clang-tools-extra] [llvm] [clang-format] Add support for BasedOnStyle referencing an arbitrary file (PR #107312)

2024-09-04 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [clang-tools-extra] [llvm] [clang-format] Add support for BasedOnStyle referencing an arbitrary file (PR #107312)

2024-09-04 Thread Ryan Saunders via cfe-commits
https://github.com/jediry created https://github.com/llvm/llvm-project/pull/107312 At present, the ```BasedOnStyle``` directive can reference a predefined style name, or ```InheritFromParent```, instructing clang-format to search upward in the directory hierarchy for a .clang-format file. This

[clang] [Parser][NFC] Move the core parsing of an attribute into a separate method (PR #107300)

2024-09-04 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/107300 >From c30c6c11686cc95ba20eb7000d210b17757fbfe3 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 4 Sep 2024 12:49:04 -0700 Subject: [PATCH 1/2] [Parser][NFC] Move the core parsing of an attribute into a

[clang] [clang] Check inline defs when emitting speculative vtable (PR #100785)

2024-09-04 Thread Fabian Parzefall via cfe-commits
FPar wrote: @efriedma-quic Thank you for being patient. I do not have write permissions, can you please merge this for me? https://github.com/llvm/llvm-project/pull/100785 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-09-04 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/86618 >From 06250aa308d1662848726528bd31395fb2ad3ea0 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 5 Mar 2024 03:14:49 + Subject: [PATCH] implement wraps attribute Signed-off-by: Justin Stitt --- cl

[clang] [clang] Diagnose dangling issues for the "Container" case. (PR #107213)

2024-09-04 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 d21e731c42d6b967e29dbe2edc16c1b86885df0d fe0ca71b1d5cc3ff696e374b5b5bd03f748944aa --e

[clang] [HLSL] Remove variables that are used only in assert (PR #107299)

2024-09-04 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/107299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-04 Thread Doug Wyatt via cfe-commits
@@ -0,0 +1,1566 @@ +//=== SemaFunctionEffects.cpp - Sema handling of function effects -===// +// +// 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: A

[clang] [clang] Diagnose dangling issues for the "Container" case. (PR #107213)

2024-09-04 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/107213 >From 0d9a5971121bf66608625de3514db346876d9091 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Wed, 28 Aug 2024 09:59:41 +0200 Subject: [PATCH 1/2] [clang] Diagnose dangling issues for "Container" case. We teac

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-04 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/107292 >From f1ca0a6070aa34bcce92d76df3a2e897d44e5f9c Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 3 Sep 2024 19:06:22 + Subject: [PATCH 1/2] Adding `asuint` implementation to hlsl --- clang/includ

[clang] [Parser][NFC] Move the core parsing of an attribute into a separate method (PR #107300)

2024-09-04 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 34f2c9a9ce73a61b27d75dab7e1eed256491afcc c30c6c11686cc95ba20eb7000d210b17757fbfe3 --e

[clang] [clang-tools-extra] [NFC] Add explicit #include llvm-config.h where its macros are used, clang part. (PR #107301)

2024-09-04 Thread Daniil Fukalov via cfe-commits
https://github.com/dfukalov created https://github.com/llvm/llvm-project/pull/107301 (this is clang related part) Without these explicit includes, removing other headers, who implicitly include llvm-config.h, may have non-trivial side effects. For example, `clagd` may report even `llvm-config

[clang] [Parser][NFC] Move the core parsing of an attribute into a separate method (PR #107300)

2024-09-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Bill Wendling (bwendling) Changes Refactor attribute parsing so that the main code parsing an attribute can be called by a separate code path that doesn't start with the '__attribute' keyword. --- Full diff: https://github.com/llvm/llvm-

[clang] [Parser][NFC] Move the core parsing of an attribute into a separate method (PR #107300)

2024-09-04 Thread Bill Wendling via cfe-commits
https://github.com/bwendling created https://github.com/llvm/llvm-project/pull/107300 Refactor attribute parsing so that the main code parsing an attribute can be called by a separate code path that doesn't start with the '__attribute' keyword. >From c30c6c11686cc95ba20eb7000d210b17757fbfe3 M

[clang] [clang] Diagnose dangling issues for the "Container" case. (PR #107213)

2024-09-04 Thread Haojian Wu via cfe-commits
hokein wrote: > Since this is not limited to a hardcoded set of types/stl-containers, this is > a substantial change in the behaviour of general Owner types and > warrants extra documentation both in GSL analysis docs and ReleaseNotes. Done. https://github.com/llvm/llvm-project/pull/107213 _

[clang] [clang] Diagnose dangling issues for the "Container" case. (PR #107213)

2024-09-04 Thread Haojian Wu via cfe-commits
@@ -499,3 +518,28 @@ std::string_view test2(int i, std::optional a) { return std::move(a.value()); } } + +namespace GH100526 { +void test() { + std::vector t1 = {std::string()}; // expected-warning {{object backing the pointer will be destroyed at the end}} ---

[clang] [clang] Diagnose dangling issues for the "Container" case. (PR #107213)

2024-09-04 Thread Haojian Wu via cfe-commits
@@ -470,10 +474,24 @@ static void visitFunctionCallArguments(IndirectLocalPath &Path, Expr *Call, VisitGSLPointerArg(Callee, Args[0], !Callee->getReturnType()->isReferenceType()); } else { -if (auto *CCE = dyn_cast(Call); -

[clang] [clang] Diagnose dangling issues for the "Container" case. (PR #107213)

2024-09-04 Thread Haojian Wu via cfe-commits
@@ -363,10 +363,14 @@ static bool implicitObjectParamIsLifetimeBound(const FunctionDecl *FD) { if (ATL.getAttrAs()) return true; } - return isNormalAsisgnmentOperator(FD); } +bool isFirstTemplateArgumentGSLPointer(const TemplateArgumentList &TAs) { + return

[clang] [HLSL] Remove variables that are used only in assert (PR #107299)

2024-09-04 Thread Damyan Pepper via cfe-commits
@@ -834,17 +834,10 @@ static void ValidateMultipleRegisterAnnotations(Sema &S, Decl *TheDecl, static void DiagnoseHLSLRegisterAttribute(Sema &S, SourceLocation &ArgLoc, Decl *TheDecl, RegisterType regType) { - // Samplers, UAVs, and

[clang] [clang] Diagnose dangling issues for the "Container" case. (PR #107213)

2024-09-04 Thread Haojian Wu via cfe-commits
@@ -470,10 +474,24 @@ static void visitFunctionCallArguments(IndirectLocalPath &Path, Expr *Call, VisitGSLPointerArg(Callee, Args[0], !Callee->getReturnType()->isReferenceType()); } else { -if (auto *CCE = dyn_cast(Call); -

[clang] [HLSL] Remove variables that are used only in assert (PR #107299)

2024-09-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Helena Kotas (hekota) Changes Changes the assert to test the same condition without using the variables. This change is done in response to a comment [here](https://github.com/llvm/llvm-project/pull/106657#issuecomment-2327493439). ---

[clang] [HLSL] Remove variables that are used only in assert (PR #107299)

2024-09-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/107299 Changes the assert to test the same condition without using the variables. This change is done in response to a comment [here](https://github.com/llvm/llvm-project/pull/106657#issuecomment-2327493439). >From

[clang] [clang] Diagnose dangling issues for the "Container" case. (PR #107213)

2024-09-04 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/107213 >From 650054c3fa9a640b9cd255f98c46dbfbd0b8c590 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Wed, 28 Aug 2024 09:59:41 +0200 Subject: [PATCH 1/2] [clang] Diagnose dangling issues for "Container" case. We teac

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-04 Thread Justin Bogner via cfe-commits
@@ -556,46 +562,120 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } -void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) { - if (!AL.isArgIdent(0)) { -Diag(AL.getLoc(), diag::err_attribute_argument_type) -

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-04 Thread Justin Bogner via cfe-commits
@@ -556,46 +562,120 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } -void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) { - if (!AL.isArgIdent(0)) { -Diag(AL.getLoc(), diag::err_attribute_argument_type) -

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-04 Thread Justin Bogner via cfe-commits
@@ -556,46 +562,120 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } -void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) { - if (!AL.isArgIdent(0)) { -Diag(AL.getLoc(), diag::err_attribute_argument_type) -

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-04 Thread Justin Bogner via cfe-commits
@@ -556,46 +562,120 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } -void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) { - if (!AL.isArgIdent(0)) { -Diag(AL.getLoc(), diag::err_attribute_argument_type) -

  1   2   3   4   >