[clang] [CLANG]Add Scalable vectors for mfloat8_t (PR #101644)

2024-10-15 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm approved this pull request. https://github.com/llvm/llvm-project/pull/101644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][LLVM Demangler] Add an assertion that validates that all mang… (PR #111391)

2024-10-15 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: > I am not super comfortable with enabling the diagnostic by default because > it's not something the user can do anything about aside from disable the > diagnostic (which means they'll report one issue and probably never report > another again because they disabled the wa

[clang] [llvm] [clang][LLVM Demangler] Add an assertion that validates that all mang… (PR #111391)

2024-10-15 Thread Viktoriia Bakalova via cfe-commits
VitaNuo wrote: > I am not super comfortable with enabling the diagnostic by default because > it's not something the user can do anything about aside from disable the > diagnostic (which means they'll report one issue and probably never report > another again because they disabled the warning

[clang] [clang-tools-extra] [analyzer][clang-tidy][NFC] Clean up eagerly-assume handling (PR #112209)

2024-10-15 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -299,13 +299,12 @@ ANALYZER_OPTION( ANALYZER_OPTION( bool, ShouldEagerlyAssume, "eagerly-assume", -"Whether we should eagerly assume evaluations of conditionals, thu

[clang] [clang-tools-extra] [analyzer][clang-tidy][NFC] Clean up eagerly-assume handling (PR #112209)

2024-10-15 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/112209 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [clang-tools-extra] [analyzer][clang-tidy][NFC] Clean up eagerly-assume handling (PR #112209)

2024-10-15 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -3767,28 +3764,26 @@ void ExprEngine::evalEagerlyAssumeBinOpBifurcation(ExplodedNodeSet &Dst, continue; } -ProgramStateRef state = Pred->getState(); -SVal

[clang] [clang-tools-extra] [analyzer][clang-tidy][NFC] Clean up eagerly-assume handling (PR #112209)

2024-10-15 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal commented: Looks good to me overall. https://github.com/llvm/llvm-project/pull/112209 ___ cfe-commits mailin

[clang] [clang-tools-extra] [analyzer][clang-tidy][NFC] Clean up eagerly-assume handling (PR #112209)

2024-10-15 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -3742,23 +3742,20 @@ void ExprEngine::evalLocation(ExplodedNodeSet &Dst, BldrTop.addNodes(Tmp); } -std::pair -ExprEngine::geteagerlyAssumeBinOpBifurcationTags() { - stati

[clang] [clang-tools-extra] [analyzer][clang-tidy][NFC] Clean up eagerly-assume handling (PR #112209)

2024-10-15 Thread Donát Nagy via cfe-commits
@@ -3767,28 +3764,26 @@ void ExprEngine::evalEagerlyAssumeBinOpBifurcation(ExplodedNodeSet &Dst, continue; } -ProgramStateRef state = Pred->getState(); -SVal V = state->getSVal(Ex, Pred->getLocationContext()); +ProgramStateRef State = Pred->getState(); +

[clang] [Clang] fix range calculation for conditionals with throw expressions (PR #112081)

2024-10-15 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/112081 >From 67c41612085489a2a17eec49f98dbfa0e5bb97cf Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 12 Oct 2024 08:27:51 +0300 Subject: [PATCH] [Clang] fix range calculation for conditionals with throw expr

[clang] 4852120 - [Sema]Use tag name lookup for class names (#112166)

2024-10-15 Thread via cfe-commits
Author: Gábor Spaits Date: 2024-10-15T10:19:17+02:00 New Revision: 48521209aa4d95a97564f8a5af7ccca09c6ede5d URL: https://github.com/llvm/llvm-project/commit/48521209aa4d95a97564f8a5af7ccca09c6ede5d DIFF: https://github.com/llvm/llvm-project/commit/48521209aa4d95a97564f8a5af7ccca09c6ede5d.diff

[clang] [Sema]Use tag name lookup for class names (PR #112166)

2024-10-15 Thread Gábor Spaits via cfe-commits
https://github.com/spaits closed https://github.com/llvm/llvm-project/pull/112166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-10-15 Thread Nikita Popov via cfe-commits
@@ -171,7 +171,7 @@ bool HexagonGenExtract::convert(Instruction *In) { // this value. if (!LogicalSR && (SR > SL)) return false; -APInt A = APInt(BW, ~0ULL).lshr(SR).shl(SL); +APInt A = APInt(BW, ~0ULL, true).lshr(SR).shl(SL); nikic wrote:

[clang] [llvm] [LoongArch] [CodeGen] Add options for Clang to generate LoongArch-specific frecipe & frsqrte instructions (PR #109917)

2024-10-15 Thread Lu Weining via cfe-commits
@@ -0,0 +1,30 @@ +/// Test -m[no]frecipe options. + +// RUN: %clang --target=loongarch64 -mfrecipe -fsyntax-only %s -### 2>&1 | \ +// RUN: FileCheck %s --check-prefix=CC1-FRECIPE +// RUN: %clang --target=loongarch64 -mno-frecipe -fsyntax-only %s -### 2>&1 | \ +// RUN: File

[clang] [llvm] [LoongArch] [CodeGen] Add options for Clang to generate LoongArch-specific frecipe & frsqrte instructions (PR #109917)

2024-10-15 Thread Lu Weining via cfe-commits
https://github.com/SixWeining approved this pull request. LGTM except a nit. https://github.com/llvm/llvm-project/pull/109917 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LoongArch] [CodeGen] Add options for Clang to generate LoongArch-specific frecipe & frsqrte instructions (PR #109917)

2024-10-15 Thread Lu Weining via cfe-commits
https://github.com/SixWeining edited https://github.com/llvm/llvm-project/pull/109917 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Implement __builtin_f{maximum, minimum}_num (PR #112335)

2024-10-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/112335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 790d986 - [clang][bytecode] Implement __builtin_f{maximum,minimum}_num (#112335)

2024-10-15 Thread via cfe-commits
Author: Timm Baeder Date: 2024-10-15T12:49:32+02:00 New Revision: 790d986946596601450969758d126d171586357e URL: https://github.com/llvm/llvm-project/commit/790d986946596601450969758d126d171586357e DIFF: https://github.com/llvm/llvm-project/commit/790d986946596601450969758d126d171586357e.diff L

[clang] [llvm] [ARM] Fix -mno-omit-leaf-frame-pointer flag doesn't works on 32-bit ARM (PR #109628)

2024-10-15 Thread via cfe-commits
https://github.com/guoxin049 updated https://github.com/llvm/llvm-project/pull/109628 >From fd33eac604ca44fe744c645d40aa903b10d174c3 Mon Sep 17 00:00:00 2001 From: gxlayer <15179+guoxin...@users.noreply.github.com> Date: Sat, 21 Sep 2024 18:16:48 +0800 Subject: [PATCH] fix issues 108019 ---

[clang] [clang-format] Add RemoveEmptyLinesInUnwrappedLines option (PR #112325)

2024-10-15 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/112325 >From ca1b950315b5fd098ead7bcbe582935bf2c2b3bd Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 15 Oct 2024 00:21:11 -0700 Subject: [PATCH 1/3] [clang-format] Add RemoveEmptyLinesInUnwrappedLines option Fixes

[clang] [CLANG]Add Scalable vectors for mfloat8_t (PR #101644)

2024-10-15 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/101644 >From 7134302c7e1054021af36a207dbfd0c40c9e8c51 Mon Sep 17 00:00:00 2001 From: Caroline Concatto Date: Fri, 2 Aug 2024 08:47:18 + Subject: [PATCH 1/3] [CLANG]Add Scalable vectors for mfloat8_t This

[clang] [lldb] [llvm] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-10-15 Thread Nikita Popov via cfe-commits
nikic wrote: > `APInt::getAllOnes` will assert if `BitWidth == 0`. > > [snip] For the record, this is fixed by https://github.com/llvm/llvm-project/pull/112227. https://github.com/llvm/llvm-project/pull/80309 ___ cfe-commits mailing list cfe-commits

[clang] [llvm] [llvm] Support llvm::Any across shared libraries on windows (PR #108051)

2024-10-15 Thread Nikita Popov via cfe-commits
@@ -273,8 +273,6 @@ PreservedAnalyses FunctionToLoopPassAdaptor::run(Function &F, llvm::any_cast(&IR)); const Loop **LPtr = llvm::any_cast(&IR); const Loop *L = LPtr ? *LPtr : nullptr; -if (!L) - L = &llvm::any_cast(IR)->getOutermostLoop();

[clang] [llvm] [llvm] Support llvm::Any across shared libraries on windows (PR #108051)

2024-10-15 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LLVM changes LGTM https://github.com/llvm/llvm-project/pull/108051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm] Support llvm::Any across shared libraries on windows (PR #108051)

2024-10-15 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/108051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema]Use tag name lookup for class names (PR #112166)

2024-10-15 Thread Gábor Spaits via cfe-commits
spaits wrote: The windows CI passes. The linux CI fails, but it also fails on other clang fronted PRs (see https://github.com/llvm/llvm-project/pull/112289 for example). I think this failure is unrelated to this PR. I will merge this. https://github.com/llvm/llvm-project/pull/112166 __

[clang] [clang] LazyOffsetPtr: Use native pointer width (PR #111995)

2024-10-15 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: Can we remove `getAddressOfPointer` instead?. Where is it being used? https://github.com/llvm/llvm-project/pull/111995 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [lld] [Driver] Default enable LoongArch linker relaxation (PR #111488)

2024-10-15 Thread via cfe-commits
ywgrit wrote: > > How about now? > > The patch doesn't touch lld, so my suggestion is "[Driver] Default enable > LoongArch linker relaxation". > Thanks, the title has changed. > Some additional comments: > > * Do we need to consider the `-gsplit-dwarf` issue [MC: "error: A dwo section > may

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-10-15 Thread Younan Zhang via cfe-commits
@@ -17257,8 +17258,11 @@ void Sema::PushExpressionEvaluationContext( ExpressionEvaluationContext NewContext, ReuseLambdaContextDecl_t, ExpressionEvaluationContextRecord::ExpressionKind ExprContext) { - Decl *ClosureContextDecl = ExprEvalContexts.back().ManglingContextD

[clang] [lldb] [llvm] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-10-15 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/80309 >From 96795194fc79359363bac0423516da2a06733047 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 19 Sep 2024 17:27:13 +0200 Subject: [PATCH 1/2] apint only --- clang/lib/AST/ByteCode/IntegralAP.h |

[clang] [lldb] [llvm] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-10-15 Thread Nikita Popov via cfe-commits
@@ -1159,7 +1159,9 @@ class ARMOperand : public MCParsedAsmOperand { if (!isImm()) return false; const MCConstantExpr *CE = dyn_cast(getImm()); if (!CE) return false; nikic wrote: Not quite, but this put me on the right path. I added a check for `i

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

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

[clang] [clang-cl]: Add /std:c++23preview and update _MSVC_LANG for C++23 (PR #112378)

2024-10-15 Thread Stephan T. Lavavej via cfe-commits
@@ -215,8 +215,7 @@ static void addVisualCDefines(const LangOptions &Opts, MacroBuilder &Builder) { if (Opts.isCompatibleWithMSVC(LangOptions::MSVC2015)) { if (Opts.CPlusPlus23) -// TODO update to the proper value. -Builder.defineMacro("_MSVC_LANG",

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

2024-10-15 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +a() {struct b c (sizeof(b * [({ {tree->d* next)} 0 + +// expected-error@3 {{a type specifier is required for all declarations}} +// expected-error@3 {{use of undeclared identifier 'tree'; did you mean 'true'?}} +//

[clang] [clang-cl]: Add /std:c++23preview and update _MSVC_LANG for C++23 (PR #112378)

2024-10-15 Thread Casey Carter via cfe-commits
https://github.com/CaseyCarter edited https://github.com/llvm/llvm-project/pull/112378 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-10-15 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/111499 >From 4951a7b9b87f9800bc3629bd44f65141ba98c6b0 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 8 Oct 2024 08:19:56 + Subject: [PATCH 01/10] start working on lifetime capture --- clang/include/clang/

[clang] Turn `-Wdeprecated-literal-operator` on by default (PR #111027)

2024-10-15 Thread James Y Knight via cfe-commits
jyknight wrote: Some projects still seem to have a requirement for compatibility with GCC 4.8 -- which supports a lot of C++11 but didn't apply the change in CWG 1473, and thus _require_ the space in `operator"" _udl`. That is somewhat unfortunate. Two examples from the first page of github se

[clang] [clang-cl]: Add /std:c++23preview and update _MSVC_LANG for C++23 (PR #112378)

2024-10-15 Thread via cfe-commits
https://github.com/zmodem updated https://github.com/llvm/llvm-project/pull/112378 >From f44ba22a8e5232b3f1e4a680565acd5604a7016c Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Tue, 15 Oct 2024 17:18:45 +0200 Subject: [PATCH 1/2] [clang-cl]: Add /std:c++23preview and update _MSVC_LANG for

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-10-15 Thread Matheus Izvekov via cfe-commits
@@ -17257,8 +17258,11 @@ void Sema::PushExpressionEvaluationContext( ExpressionEvaluationContext NewContext, ReuseLambdaContextDecl_t, ExpressionEvaluationContextRecord::ExpressionKind ExprContext) { - Decl *ClosureContextDecl = ExprEvalContexts.back().ManglingContextD

[clang] [clang-cl]: Add /std:c++23preview and update _MSVC_LANG for C++23 (PR #112378)

2024-10-15 Thread via cfe-commits
@@ -215,8 +215,7 @@ static void addVisualCDefines(const LangOptions &Opts, MacroBuilder &Builder) { if (Opts.isCompatibleWithMSVC(LangOptions::MSVC2015)) { if (Opts.CPlusPlus23) -// TODO update to the proper value. -Builder.defineMacro("_MSVC_LANG",

[clang] [clang][RISCV] Extend intrinsic size check variable from 16 -> 32 bits. NFC (PR #111481)

2024-10-15 Thread Craig Topper via cfe-commits
https://github.com/topperc edited https://github.com/llvm/llvm-project/pull/111481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl]: Add /std:c++23preview and update _MSVC_LANG for C++23 (PR #112378)

2024-10-15 Thread Tobias Hieta via cfe-commits
https://github.com/tru approved this pull request. LGTM! Thanks for doing that! https://github.com/llvm/llvm-project/pull/112378 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Update llvm::Registry to work for LLVM shared library builds on windows (PR #109024)

2024-10-15 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/109024 >From 983e3e9efb3a090d1ef4c232a2912d3abc9ffdf4 Mon Sep 17 00:00:00 2001 From: Thomas Fransham Date: Wed, 28 Aug 2024 16:08:52 +0100 Subject: [PATCH 1/8] Update llvm::Registry to work for LLVM shared library

[clang] Make [[clang::lifetimebound]] work for expressions coming from default arguments (PR #112047)

2024-10-15 Thread via cfe-commits
@@ -107,6 +107,39 @@ namespace std { using std::operator""s; using std::operator""sv; +namespace default_args { + using IntArray = int[]; + const int *defaultparam1(const int &def1 [[clang::lifetimebound]] = 0); // #def1 + const int &defaultparam_array([[clang::lifetimebou

[clang] Make [[clang::lifetimebound]] work for expressions coming from default arguments (PR #112047)

2024-10-15 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/112047 >From 604835395cd4006cb0344e94553191035fe4cbfb Mon Sep 17 00:00:00 2001 From: higher-performance Date: Fri, 11 Oct 2024 17:09:13 -0400 Subject: [PATCH] Make [[clang::lifetimebound]] work for expressio

[clang] Make [[clang::lifetimebound]] work for expressions coming from default arguments (PR #112047)

2024-10-15 Thread via cfe-commits
@@ -107,6 +107,39 @@ namespace std { using std::operator""s; using std::operator""sv; +namespace default_args { + using IntArray = int[]; + const int *defaultparam1(const int &def1 [[clang::lifetimebound]] = 0); // #def1 + const int &defaultparam_array([[clang::lifetimebou

[clang] Make [[clang::lifetimebound]] work for expressions coming from default arguments (PR #112047)

2024-10-15 Thread via cfe-commits
@@ -107,6 +107,39 @@ namespace std { using std::operator""s; using std::operator""sv; +namespace default_args { + using IntArray = int[]; + const int *defaultparam1(const int &def1 [[clang::lifetimebound]] = 0); // #def1 + const int &defaultparam_array([[clang::lifetimebou

[clang] Make [[clang::lifetimebound]] work for expressions coming from default arguments (PR #112047)

2024-10-15 Thread via cfe-commits
@@ -107,6 +107,39 @@ namespace std { using std::operator""s; using std::operator""sv; +namespace default_args { + using IntArray = int[]; + const int *defaultparam1(const int &def1 [[clang::lifetimebound]] = 0); // #def1 + const int &defaultparam_array([[clang::lifetimebou

[clang] [clang] Deduplicate the logic that only warns once when stack is almost full (PR #112371)

2024-10-15 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb updated https://github.com/llvm/llvm-project/pull/112371 >From b4c0afe1b691ce4e48b74884ac771a7038bd5de2 Mon Sep 17 00:00:00 2001 From: Boaz Brickner Date: Tue, 15 Oct 2024 14:46:59 + Subject: [PATCH 1/2] [clang] Dedupliate the logic that only warns once when st

[clang] Make [[clang::lifetimebound]] work for expressions coming from default arguments (PR #112047)

2024-10-15 Thread via cfe-commits
@@ -1383,6 +1394,15 @@ static void checkExprLifetimeImpl(Sema &SemaRef, << nextPathEntryRange(Path, I + 1, L); break; } + + case IndirectLocalPathEntry::DefaultArg: { +const auto *DAE = cast(Elem.E); +SemaRef.Diag(DAE->getParam()->

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-15 Thread Tom Honermann via cfe-commits
@@ -198,3 +198,12 @@ void SemaSYCL::handleKernelAttr(Decl *D, const ParsedAttr &AL) { handleSimpleAttribute(*this, D, AL); } + +void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const ParsedAttr &AL) { + ParsedType PT = AL.getTypeArg(); + TypeSourceInfo *TSI = nullptr; +

[clang] [clang] Deduplicate the logic that only warns once when stack is almost full (PR #112371)

2024-10-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang-modules Author: Boaz Brickner (bricknerb) Changes Zero diff in behavior. --- Full diff: https://github.com/llvm/llvm-project/pull/112371.diff 10 Files Affected: - (modified) clang/include/clang/Basic/Stack.h (

[clang] [clang][dataflow] Add a lattice to help cache const accessor methods (PR #111006)

2024-10-15 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. modulo the requests for tests. This looks great! https://github.com/llvm/llvm-project/pull/111006 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [clang][dataflow] Add a lattice to help cache const accessor methods (PR #111006)

2024-10-15 Thread Yitzhak Mandelbaum via cfe-commits
@@ -0,0 +1,217 @@ +//===- unittests/Analysis/FlowSensitive/CachedConstAccessorsLatticeTest.cpp ==// +// +// 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][dataflow] Add a lattice to help cache const accessor methods (PR #111006)

2024-10-15 Thread Yitzhak Mandelbaum via cfe-commits
@@ -0,0 +1,218 @@ +//===-- CachedConstAccessorsLattice.h ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang][dataflow] Add a lattice to help cache const accessor methods (PR #111006)

2024-10-15 Thread Yitzhak Mandelbaum via cfe-commits
@@ -0,0 +1,218 @@ +//===-- CachedConstAccessorsLattice.h ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang][dataflow] Add a lattice to help cache const accessor methods (PR #111006)

2024-10-15 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand edited https://github.com/llvm/llvm-project/pull/111006 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules][NFC] Rewrite friend-definition-2.cpp with split-file (PR #112380)

2024-10-15 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov created https://github.com/llvm/llvm-project/pull/112380 Instead of the pragmas, which are less familiar to people. This is a follow-up of a discussion from #111992. >From 2089e3def4c37adec62e85e10af3cd51939e5932 Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Dat

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Yihe Li via cfe-commits
Mick235711 wrote: > I don’t really see that happening for nodiscard tho—making only some > overloads nodiscard instead of none or all of them just seems like a really > weird thing to do personally... I think there is still some merits for these kind of overload sets. For instance, API like

[clang] [C++20][Modules] Load function body from the module that gives canonical decl (PR #111992)

2024-10-15 Thread Ilya Biryukov via cfe-commits
@@ -10057,15 +10057,18 @@ void ASTReader::finishPendingActions() { // For a function defined inline within a class template, force the // canonical definition to be the one inside the canonical definition of // the template. This ensures that we instantiate fr

[clang] [Modules][NFC] Rewrite friend-definition-2.cpp with split-file (PR #112380)

2024-10-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ilya Biryukov (ilya-biryukov) Changes Instead of the pragmas, which are less familiar to people. This is a follow-up of a discussion from #111992. --- Full diff: https://github.com/llvm/llvm-project/pull/112380.diff 1 Files Affected: -

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-10-15 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/111499 >From 4951a7b9b87f9800bc3629bd44f65141ba98c6b0 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 8 Oct 2024 08:19:56 + Subject: [PATCH 1/9] start working on lifetime capture --- clang/include/clang/Ba

[clang] [ASTWriter] Detect more non-affecting FileIDs to reduce source location duplication (PR #112015)

2024-10-15 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov updated https://github.com/llvm/llvm-project/pull/112015 >From b6508a13d1a115bb3acb54590833674f4158814c Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Thu, 19 Sep 2024 20:18:36 +0200 Subject: [PATCH 1/2] [ASTWriter] Detect more non-affecting FileIDs to reduc

[clang] [ASTWriter] Detect more non-affecting FileIDs to reduce source location duplication (PR #112015)

2024-10-15 Thread Ilya Biryukov via cfe-commits
@@ -192,13 +201,13 @@ GetAffectingModuleMaps(const Preprocessor &PP, Module *RootModule) { // The containing module map is affecting, because it's being pointed // into by Module::DefinitionLoc. - if (auto FE = MM.getContainingModuleMapFile(Mod)) -Mod

[clang] [clang] Deduplicate the logic that only warns once when stack is almost full (PR #112371)

2024-10-15 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb created https://github.com/llvm/llvm-project/pull/112371 Zero diff in behavior. >From b4c0afe1b691ce4e48b74884ac771a7038bd5de2 Mon Sep 17 00:00:00 2001 From: Boaz Brickner Date: Tue, 15 Oct 2024 14:46:59 + Subject: [PATCH] [clang] Dedupliate the logic that only

[clang] [clang] Deduplicate the logic that only warns once when stack is almost full (PR #112371)

2024-10-15 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 f314e12494ed73290983a7db8e15c21578f437b3 b4c0afe1b691ce4e48b74884ac771a7038bd5de2 --e

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread via cfe-commits
https://github.com/Sirraide commented: Hmm, I can’t really think of a situation when this note would actually help... at least for `deprecated`, you could *maybe* argue that you might want to know what part of the codebase marked it as deprecated in case there are multiple declarations, but fo

[clang] [clang] Implement constexpr __builtin_bit_cast for complex types (PR #109981)

2024-10-15 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. LGTM A few more tests fo errors would be nice maybe (e.g. bit-casting a `_Complex int` to an `int` or sth like that), but I don’t think they’re required. https://github.com/llvm/llvm-project/pull/109981 ___

[clang] [C++20][Modules] Load function body from the module that gives canonical decl (PR #111992)

2024-10-15 Thread Ilya Biryukov via cfe-commits
@@ -10057,15 +10057,18 @@ void ASTReader::finishPendingActions() { // For a function defined inline within a class template, force the // canonical definition to be the one inside the canonical definition of // the template. This ensures that we instantiate fr

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread via cfe-commits
Sirraide wrote: > There seems to exist a discrepancy between `[[deprecated]]` and > `[[nodiscard]]`. The former generates a warning on the usage of the function, > together with a note on the declaration of the function. In contrast, the > latter only generates a warning. As I said, I feel li

[clang] [Clang][TableGen] Use const pointers for various Init objects in NeonEmitter (PR #112317)

2024-10-15 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/112317 >From a0b77a500db2147a57d77f575b65c0c38af0c2f8 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Mon, 14 Oct 2024 23:12:24 -0700 Subject: [PATCH] [Clang][TableGen] NeonEmitter --- clang/utils/TableGen/NeonEmitt

[clang] [Clang][TableGen] Use const pointers for various Init objects in Diagnostic Emitter (PR #112318)

2024-10-15 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/112318 >From 2fe295768c87dca53e4cecd8a93f6936de0fe50c Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Mon, 14 Oct 2024 22:56:07 -0700 Subject: [PATCH] [Clang][TableGen] Use const pointer for various `Init` pointers.

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread via cfe-commits
Sirraide wrote: > for `nodiscard`, I don’t think you really care that much Ah, 1 more case that comes to mind for `deprecated` is if you have several overloads, and only one of the is deprecated. I don’t really see that happening for `nodiscard` tho—making only *some* overloads `nodiscard` ins

[clang] [Clang][TableGen] Use const pointers for various `Init *` pointers (PR #112321)

2024-10-15 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/112321 >From 4743134d6b6ef21fc6b09dea59c30d6be31ef3fd Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Mon, 14 Oct 2024 23:01:19 -0700 Subject: [PATCH] [Clang][TableGen] Use const pointers for various `Init *` pointer

[clang] [llvm] [LLVM][MC][AArch64] Assembler support for Armv9.6-A memory systems extensions (PR #112341)

2024-10-15 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/112341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Yihe Li via cfe-commits
@@ -9290,6 +9290,8 @@ def warn_unused_result_typedef_unsupported_spelling : Warning< def warn_unused_volatile : Warning< "expression result unused; assign into a variable to force a volatile load">, InGroup>; +def note_nodiscard_specified_here : Note< Mick

[clang] [Clang][Sema] Use the correct injected template arguments for partial specializations when collecting multi-level template argument lists (PR #112381)

2024-10-15 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/112381 After #111852 refactored multi-level template argument list collection, the following results in a crash: ```cpp template struct A; template struct A { void f() requires B; }; template void A::f() requi

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Yihe Li via cfe-commits
@@ -204,23 +205,29 @@ static bool DiagnoseUnusedComparison(Sema &S, const Expr *E) { return true; } -static bool DiagnoseNoDiscard(Sema &S, const WarnUnusedResultAttr *A, - SourceLocation Loc, SourceRange R1, - Sourc

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread via cfe-commits
Sirraide wrote: > Here the specialization is named, which is potentially helpful. Hmm, the diagnostic for the error here isn’t particularly great to begin with; I feel like it should instead mention that the return *type*, not the function, is marked `nodiscard`, which might be enough to fix t

[clang] [Clang][Sema] Use the correct injected template arguments for partial specializations when collecting multi-level template argument lists (PR #112381)

2024-10-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krystian Stasiowski (sdkrystian) Changes After #111852 refactored multi-level template argument list collection, the following results in a crash: ```cpp template struct A; template struct A { void

[clang] [HLSL] Collect explicit resource binding information (PR #111203)

2024-10-15 Thread Justin Bogner via cfe-commits
@@ -2235,3 +2280,107 @@ QualType SemaHLSL::getInoutParameterType(QualType Ty) { Ty.addRestrict(); return Ty; } + +void SemaHLSL::ActOnVariableDeclarator(VarDecl *VD) { + if (VD->hasGlobalStorage()) { +// make sure the declaration has a complete type +if (SemaRef.Re

[clang] [HLSL] Collect explicit resource binding information (PR #111203)

2024-10-15 Thread Justin Bogner via cfe-commits
@@ -102,6 +152,15 @@ class SemaHLSL : public SemaBase { llvm::DenseMap LocsForHLSLAttributedResources; + + // List of all resource bindings + ResourceBindings Bindings; + +private: + void FindResourcesOnVarDecl(VarDecl *D); + void FindResourcesOnUserRecordDecl(const

[clang] [HLSL] Collect explicit resource binding information (PR #111203)

2024-10-15 Thread Justin Bogner via cfe-commits
@@ -2235,3 +2280,107 @@ QualType SemaHLSL::getInoutParameterType(QualType Ty) { Ty.addRestrict(); return Ty; } + +void SemaHLSL::ActOnVariableDeclarator(VarDecl *VD) { + if (VD->hasGlobalStorage()) { +// make sure the declaration has a complete type +if (SemaRef.Re

[clang] [HLSL] Collect explicit resource binding information (PR #111203)

2024-10-15 Thread Justin Bogner via cfe-commits
@@ -4593,6 +4593,44 @@ def HLSLResourceBinding: InheritableAttr { let LangOpts = [HLSL]; let Args = [StringArgument<"Slot">, StringArgument<"Space", 1>]; let Documentation = [HLSLResourceBindingDocs]; + let AdditionalMembers = [{ + enum class RegisterType : unsigned

[clang] [HLSL] Collect explicit resource binding information (PR #111203)

2024-10-15 Thread Justin Bogner via cfe-commits
@@ -985,88 +1026,92 @@ SemaHLSL::TakeLocForHLSLAttribute(const HLSLAttributedResourceType *RT) { return LocInfo; } -// get the record decl from a var decl that we expect -// represents a resource -static CXXRecordDecl *getRecordDeclFromVarDecl(VarDecl *VD) { - const Type *

[clang] [HLSL] Collect explicit resource binding information (PR #111203)

2024-10-15 Thread Justin Bogner via cfe-commits
@@ -83,6 +81,49 @@ static RegisterType getRegisterType(StringRef Slot) { } } +static ResourceClass getResourceClass(RegisterType RT) { + switch (RT) { + case RegisterType::SRV: +return ResourceClass::SRV; + case RegisterType::UAV: +return ResourceClass::UAV; + ca

[clang] [HLSL] Collect explicit resource binding information (PR #111203)

2024-10-15 Thread Justin Bogner via cfe-commits
@@ -985,88 +1026,92 @@ SemaHLSL::TakeLocForHLSLAttribute(const HLSLAttributedResourceType *RT) { return LocInfo; } -// get the record decl from a var decl that we expect -// represents a resource -static CXXRecordDecl *getRecordDeclFromVarDecl(VarDecl *VD) { - const Type *

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread via cfe-commits
Sirraide wrote: I.e. could we get it to emit something like: ```console :10:5: warning: ignoring return value of type 'S' declared with 'nodiscard' attribute [-Wunused-result] 10 | getS(2); | ^~~~ ~ 1 warning generated. ``` https://github.com/llvm/llvm-project/pull/112289 _

[clang] [Clang][Sema] Use the correct injected template arguments for partial specializations when collecting multi-level template argument lists (PR #112381)

2024-10-15 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/112381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Erich Keane via cfe-commits
@@ -302,27 +312,38 @@ void Sema::DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID) { if (const Decl *FD = CE->getCalleeDecl()) { if (ShouldSuppress) return; - if (FD->hasAttr()) { + if (const auto *A = FD->getAttr()) { Diag(Loc, diag

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

2024-10-15 Thread Andrew Sukach via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +a() {struct b c (sizeof(b * [({ {tree->d* next)} 0 + +// expected-error@3 {{a type specifier is required for all declarations}} +// expected-error@3 {{use of undeclared identifier 'tree'; did you mean 'true'?}} +//

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

2024-10-15 Thread Andrew Sukach via cfe-commits
https://github.com/sookach updated https://github.com/llvm/llvm-project/pull/112111 >From 64bde2ed7a39d5e270a7d1daca3a30a2cde6e0db Mon Sep 17 00:00:00 2001 From: Andrew Sukach Date: Sat, 12 Oct 2024 19:47:30 -0400 Subject: [PATCH] [clang] Check for null TypeSourceInfo in Sema::CreateUnaryExprO

[clang] [clang-cl]: Add /std:c++23preview and update _MSVC_LANG for C++23 (PR #112378)

2024-10-15 Thread via cfe-commits
@@ -215,8 +215,7 @@ static void addVisualCDefines(const LangOptions &Opts, MacroBuilder &Builder) { if (Opts.isCompatibleWithMSVC(LangOptions::MSVC2015)) { if (Opts.CPlusPlus23) -// TODO update to the proper value. -Builder.defineMacro("_MSVC_LANG",

[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-10-15 Thread Greg Roth via cfe-commits
@@ -0,0 +1,222 @@ +; RUN: opt -S -dxil-finalize-linkage -mtriple=dxil-unknown-shadermodel6.5-compute %s | FileCheck %s +; RUN: llc %s --filetype=asm -o - | FileCheck %s pow2clk wrote: Yes, and this test expects them to. The exported functions start at line 137

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Yihe Li via cfe-commits
https://github.com/Mick235711 updated https://github.com/llvm/llvm-project/pull/112289 >From 2376ab367715ef2f7f77ffc4d5af21393af876bd Mon Sep 17 00:00:00 2001 From: Yihe Li Date: Tue, 15 Oct 2024 08:13:22 +0800 Subject: [PATCH] [clang] Generate note on declaration for nodiscard-related attribu

[clang] [clang-cl]: Add /std:c++23preview and update _MSVC_LANG for C++23 (PR #112378)

2024-10-15 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Question for @StephanTLavavej and @CaseyCarter -- are there plans to do something similar for C23 as done for C++23? (Anything else we need to do on our end?) https://github.com/llvm/llvm-project/pull/112378 ___ cfe-commits mailin

[clang] clang: Remove requires system-linux from some driver tests (PR #111976)

2024-10-15 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/111976 >From a8e3a3ddeae1ba406b6f64d8b71e302a907cdc51 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Fri, 11 Oct 2024 14:33:32 +0400 Subject: [PATCH 1/2] clang: Remove requires system-linux from some driver tests

[clang] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/112245 >From eff4a0300336c4c106e1d293b19e795f5ccbabc1 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Fri, 27 Sep 2024 13:03:12 -0700 Subject: [PATCH 1/4] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link

[clang] [llvm] [ARM] Fix -mno-omit-leaf-frame-pointer flag doesn't works on 32-bit ARM (PR #109628)

2024-10-15 Thread Eli Friedman via cfe-commits
@@ -548,6 +548,11 @@ Miscellaneous Clang Crashes Fixed - Fixed internal assertion firing when a declaration in the implicit global module is found through ADL. (GH#109879) +Leaf Functions Do Not Retain FP Bug Fixed +^ + +- Fixed ``-fno

[clang] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/112245 >From eff4a0300336c4c106e1d293b19e795f5ccbabc1 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Fri, 27 Sep 2024 13:03:12 -0700 Subject: [PATCH 1/5] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link

<    1   2   3   4   5   6   >