[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-25 Thread Brian Bi via cfe-commits
@@ -8340,8 +8340,17 @@ void Sema::checkInitializerLifetime(const InitializedEntity &Entity, << Entity.getType()->isReferenceType() << CLE->getInitializer() << 2 << DiagRange; } else { -Diag(DiagLoc, diag::warn_ret_local_temp_addr_ref) -

[clang-tools-extra] a8fd0d0 - [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base cl

2024-04-25 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-04-25T14:50:53-04:00 New Revision: a8fd0d029dca7d17eee72d0445223c2fe1ee7758 URL: https://github.com/llvm/llvm-project/commit/a8fd0d029dca7d17eee72d0445223c2fe1ee7758 DIFF: https://github.com/llvm/llvm-project/commit/a8fd0d029dca7d17eee72d0445223c2fe1ee7758

[clang] [clang-tools-extra] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base clas

2024-04-25 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/84050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-25 Thread Brian Bi via cfe-commits
@@ -8340,8 +8340,17 @@ void Sema::checkInitializerLifetime(const InitializedEntity &Entity, << Entity.getType()->isReferenceType() << CLE->getInitializer() << 2 << DiagRange; } else { -Diag(DiagLoc, diag::warn_ret_local_temp_addr_ref) -

[clang] 3dcd2cc - Fix Objective-C++ Sret of non-trivial data types on Windows ARM64 (#88671)

2024-04-25 Thread via cfe-commits
Author: Hugo Melder Date: 2024-04-25T19:51:52+01:00 New Revision: 3dcd2ccab338d87deb1ca506df1376123667 URL: https://github.com/llvm/llvm-project/commit/3dcd2ccab338d87deb1ca506df1376123667 DIFF: https://github.com/llvm/llvm-project/commit/3dcd2ccab338d87deb1ca506df1376123667.diff L

[clang] [OpenCL] Put constant initializer globals into constant addrspace (PR #90048)

2024-04-25 Thread Eli Friedman via cfe-commits
@@ -536,6 +536,8 @@ void AggExprEmitter::EmitArrayInit(Address DestPtr, llvm::ArrayType *AType, CodeGen::CodeGenModule &CGM = CGF.CGM; ConstantEmitter Emitter(CGF); LangAS AS = ArrayQTy.getAddressSpace(); +if (CGF.getLangOpts().OpenCL) + AS = LangAS::openc

[clang] [OpenCL] Put constant initializer globals into constant addrspace (PR #90048)

2024-04-25 Thread Eli Friedman via cfe-commits
@@ -536,6 +536,8 @@ void AggExprEmitter::EmitArrayInit(Address DestPtr, llvm::ArrayType *AType, CodeGen::CodeGenModule &CGM = CGF.CGM; ConstantEmitter Emitter(CGF); LangAS AS = ArrayQTy.getAddressSpace(); +if (CGF.getLangOpts().OpenCL) + AS = LangAS::openc

[clang] [OpenCL] Put constant initializer globals into constant addrspace (PR #90048)

2024-04-25 Thread Eli Friedman via cfe-commits
@@ -536,6 +536,8 @@ void AggExprEmitter::EmitArrayInit(Address DestPtr, llvm::ArrayType *AType, CodeGen::CodeGenModule &CGM = CGF.CGM; ConstantEmitter Emitter(CGF); LangAS AS = ArrayQTy.getAddressSpace(); +if (CGF.getLangOpts().OpenCL) + AS = LangAS::openc

[clang-tools-extra] [clang-tidy] Add fix-its to `readability-avoid-return-with-void-value` check (PR #81420)

2024-04-25 Thread Mike Rice via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= Message-ID: In-Reply-To: @@ -42,10 +44,30 @@ void AvoidReturnWithVoidValueCheck::check( const auto *VoidReturn = Result.Nodes.getNodeAs("void_return"); if (IgnoreMacros &

[clang] Align -ffp-model=fast denormal handling with -ffast-math (PR #89477)

2024-04-25 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/89477 >From 8ab931c4506f08685758a58f4cf7974c5254c3fa Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 19 Apr 2024 17:53:52 -0700 Subject: [PATCH 1/3] Clean up denormal handling with -ffp-model, -ffast-math, et

[clang] [Clang] Implement P2809: Trivial infinite loops are not Undefined Behavior (PR #90066)

2024-04-25 Thread Eli Friedman via cfe-commits
@@ -908,6 +908,73 @@ void CodeGenFunction::EmitIfStmt(const IfStmt &S) { incrementProfileCounter(&S); } +bool CodeGenFunction::checkIfLoopMustProgress(const Expr *ControllingExpression, + bool IsTrivialCXXLoop) { + if (CGM.get

[clang] [Clang][Sema] Fix warnings after #84050 (PR #90104)

2024-04-25 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/90104 None >From 3999d7bab286fd3228254700514695610c1a3bee Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 25 Apr 2024 15:03:59 -0400 Subject: [PATCH] [Clang][Sema] Fix warnings after #84050 --- clan

[clang] [Clang][Sema] Fix warnings after #84050 (PR #90104)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krystian Stasiowski (sdkrystian) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/90104.diff 2 Files Affected: - (modified) clang/lib/Sema/SemaExprMember.cpp (-1) - (modified) clang/lib/Sema/SemaLookup.cpp (+1-1) ``

[clang] Align -ffp-model=fast denormal handling with -ffast-math (PR #89477)

2024-04-25 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/89477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Clean up denormal handling with -ffp-model, -ffast-math, etc. (PR #89477)

2024-04-25 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/89477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Clean up denormal handling with -ffp-model, -ffast-math, etc. (PR #89477)

2024-04-25 Thread Andy Kaylor via cfe-commits
andykaylor wrote: I've updated this change to account for the changes made in https://github.com/llvm/llvm-project/pull/80475 and made corresponding updated to the PR title and description. https://github.com/llvm/llvm-project/pull/89477 ___ cfe-comm

[clang] Clean up denormal handling with -ffp-model, -ffast-math, etc. (PR #89477)

2024-04-25 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/89477 >From 8ab931c4506f08685758a58f4cf7974c5254c3fa Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 19 Apr 2024 17:53:52 -0700 Subject: [PATCH 1/4] Clean up denormal handling with -ffp-model, -ffast-math, et

[clang] 6dd2617 - [Clang][Sema] Fix warnings after #84050 (#90104)

2024-04-25 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-04-25T15:13:40-04:00 New Revision: 6dd2617c80d5133b92fdff679364f2d8fcd93b47 URL: https://github.com/llvm/llvm-project/commit/6dd2617c80d5133b92fdff679364f2d8fcd93b47 DIFF: https://github.com/llvm/llvm-project/commit/6dd2617c80d5133b92fdff679364f2d8fcd93b47

[clang] [Clang][Sema] Fix warnings after #84050 (PR #90104)

2024-04-25 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/90104 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Clean up denormal handling with -ffp-model, -ffast-math, etc. (PR #89477)

2024-04-25 Thread Andy Kaylor via cfe-commits
@@ -1314,11 +1314,17 @@ bool ToolChain::isFastMathRuntimeAvailable(const ArgList &Args, Arg *A = Args.getLastArg(options::OPT_ffast_math, options::OPT_fno_fast_math, options::OPT_funsafe_math_optimizations, - options::OPT_fn

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

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir @llvm/pr-subscribers-clang Author: Hassnaa Hamdi (hassnaaHamdi) Changes According to specifications in [ARM-software/acle/pull/309](https://github.com/ARM-software/acle/pull/309) Add following intrinsics: ``` // svmax single,multi svbfloat16x2_

[clang] [clang codegen][NFC] Delete dead code in constant emission. (PR #90106)

2024-04-25 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/90106 This code was apparently added in de0fe07eef, but never used. I think more of the related code might actually dead, but I haven't tried to dig more deeply. >From b9e5e50524a6ff91badfd5729846d5c948f1d4ce M

[clang] [clang codegen][NFC] Delete dead code in constant emission. (PR #90106)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Eli Friedman (efriedma-quic) Changes This code was apparently added in de0fe07eef, but never used. I think more of the related code might actually dead, but I haven't tried to dig more deeply. --- Full diff: https://github.com/ll

[clang] [clang codegen][NFC] Delete dead code in constant emission. (PR #90106)

2024-04-25 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 758d97dce0c669a0ba6927728b40030a76acb144 b9e5e50524a6ff91badfd5729846d5c948f1d4ce --

[clang] [llvm] [clang][hlsl][dxil][spirv][x86] Add tan intrinsic (PR #90088)

2024-04-25 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/90088 >From de6abd27cb5118e4389d6382a972b66acece5166 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Wed, 24 Apr 2024 17:34:04 -0400 Subject: [PATCH 1/6] start of tan intrinsic --- clang/docs/LanguageExtensions.rst

[clang] [clang codegen][NFC] Delete dead code in constant emission. (PR #90106)

2024-04-25 Thread John McCall via cfe-commits
https://github.com/rjmccall commented: The Apple fork does actually use this downstream (for address-sensitive `__ptrauth`), and we've recently (finally) been making progress in upstreaming that work. Obviously, we could delete it and then reinstate it when we catch up to this point in upstre

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

2024-04-25 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. LGMT! 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] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-25 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited 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 codegen][NFC] Delete dead code in constant emission. (PR #90106)

2024-04-25 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Oh, I was confused that we had this code that doesn't appear to be doing anything. If you actually have a plan, then we can keep it for now, I guess. It might make sense to try to clarify some of the address-space related APIs: if the caller doesn't want placeholder-stuff

[clang] [clang codegen][NFC] Delete dead code in constant emission. (PR #90106)

2024-04-25 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/90106 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Restore compiler-rt arch suffix for PS and Windows (PR #89775)

2024-04-25 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Poking around more, it looks like the canonical way to convert a CMake variable to a C++ define is to add an entry to llvm/include/llvm/Config/llvm-config.h.cmake. I'll have a go at doing it that way. https://github.com/llvm/llvm-project/pull/89775 __

[clang] [clang][dataflow] Fix crash when `ConstantExpr` is used in conditional operator. (PR #90112)

2024-04-25 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/90112 `ConstantExpr` does not appear as a `CFGStmt` in the CFG, so `StmtToEnvMap::getEnvironment()` was not finding an entry for it in the map, causing a crash when we tried to access the iterator resulting from th

[clang] [clang][dataflow] Fix crash when `ConstantExpr` is used in conditional operator. (PR #90112)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis @llvm/pr-subscribers-clang Author: None (martinboehme) Changes `ConstantExpr` does not appear as a `CFGStmt` in the CFG, so `StmtToEnvMap::getEnvironment()` was not finding an entry for it in the map, causing a crash when we tried to acces

[clang] 2c0a185 - Remove unneeded LLVM_FALLTHROUGH. NFC

2024-04-25 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-04-25T13:21:46-07:00 New Revision: 2c0a185e99dab199aabcf4cd165ac6a312d56b1e URL: https://github.com/llvm/llvm-project/commit/2c0a185e99dab199aabcf4cd165ac6a312d56b1e DIFF: https://github.com/llvm/llvm-project/commit/2c0a185e99dab199aabcf4cd165ac6a312d56b1e.diff

[clang] 76739d1 - [clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC

2024-04-25 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-04-25T13:25:08-07:00 New Revision: 76739d1256bf7272b046e77ac2233fdd698e28d6 URL: https://github.com/llvm/llvm-project/commit/76739d1256bf7272b046e77ac2233fdd698e28d6 DIFF: https://github.com/llvm/llvm-project/commit/76739d1256bf7272b046e77ac2233fdd698e28d6.diff

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-04-25 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/79230 >From 95200f3bb3859738981240a9d8c503a13ede9601 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Tue, 16 Jan 2024 13:18:09 -0800 Subject: [PATCH 01/14] Add support for builtin_verbose_trap The builtin causes

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-04-25 Thread Akira Hatanaka via cfe-commits
@@ -3424,6 +3445,26 @@ llvm::DIMacroFile *CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent, return DBuilder.createTempMacroFile(Parent, Line, FName); } +llvm::DILocation *CGDebugInfo::CreateTrapFailureMessageFor( ahatanak wrote: @dwblaikie any ot

[clang] [flang] [lld] [flang] Generate main only when a Fortran program statement is present (PR #89938)

2024-04-25 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: Great work David, thanks! Could you add some documentation explaining _where_ `main` would be coming from in the case of mixed-source compilation? In fact, is that tested anywhere? Also, IMHO it would be good to advertise this on Discourse (thinking specifically about `-fn

[clang] f2d9950 - [HLSL] Correctly set `__HLSL_ENABLE_16_BIT` (#89788)

2024-04-25 Thread via cfe-commits
Author: Chris B Date: 2024-04-25T15:36:19-05:00 New Revision: f2d99506950f1863015137c1185c745b875ad9fb URL: https://github.com/llvm/llvm-project/commit/f2d99506950f1863015137c1185c745b875ad9fb DIFF: https://github.com/llvm/llvm-project/commit/f2d99506950f1863015137c1185c745b875ad9fb.diff LOG:

[clang] [HLSL] Correctly set `__HLSL_ENABLE_16_BIT` (PR #89788)

2024-04-25 Thread Chris B via cfe-commits
https://github.com/llvm-beanz closed https://github.com/llvm/llvm-project/pull/89788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Fix crash when `ConstantExpr` is used in conditional operator. (PR #90112)

2024-04-25 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/90112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-25 Thread Justin Stitt via cfe-commits
JustinStitt wrote: @efriedma-quic: > This is declaring, then defining, a global variable; sorry if that wasn't > clear. Gotcha. > Probably should be an error? It'll be confusing no matter what we do. I think it's OK for a global variable to be declared then later defined with additional att

[clang] Fix for merging PR #89456 into llvm 18.X (PR #90118)

2024-04-25 Thread Bill Wendling via cfe-commits
https://github.com/bwendling milestoned https://github.com/llvm/llvm-project/pull/90118 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix for merging PR #89456 into llvm 18.X (PR #90118)

2024-04-25 Thread Bill Wendling via cfe-commits
https://github.com/bwendling created https://github.com/llvm/llvm-project/pull/90118 Fix #89126 for the 18.X branch. >From cb0d1c0b15cea9c6a50a127fed9a6ad49f2c1d8f Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 25 Apr 2024 13:37:07 -0700 Subject: [PATCH] Fix for merging PR #89456 into

[clang] Fix for merging PR #89456 into llvm 18.X (PR #90118)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Bill Wendling (bwendling) Changes Fix #89126 for the 18.X branch. --- Full diff: https://github.com/llvm/llvm-project/pull/90118.diff 1 Files Affected: - (modified) clang/test/CodeGen/attr-counted-by-pr88931.c (+1-1) ``diff d

[clang] [Clang] Handle structs with inner structs and no fields (PR #89126)

2024-04-25 Thread Bill Wendling via cfe-commits
bwendling wrote: @tstellar PR https://github.com/llvm/llvm-project/pull/90118 is the fix here. https://github.com/llvm/llvm-project/pull/89126 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

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

2024-04-25 Thread via cfe-commits
dyung wrote: > Hi @dyung. > > The observed difference is due to the FP contraction turned off if optnone is > specified. In O0 this optimization is still applied. As a result, the > function with optnone contains separate fadd and fmul, while without this > attribute the function contains com

[clang] [clang-scan-deps] Expand response files before the argument adjuster (PR #89950)

2024-04-25 Thread Jan Svoboda via cfe-commits
@@ -1069,7 +1069,7 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA, // If user provided -o, that is the dependency target, except // when we are only generating a dependency file. - Arg *OutputOpt = Args.getLastArg(options::OPT_o);

[clang] [clang-scan-deps] Expand response files before the argument adjuster (PR #89950)

2024-04-25 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,36 @@ +// Check that the scanner can adjust arguments by reading .rsp files in advance. + +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json jansvoboda11 wrote: You can now do this: `clang-sca

[clang] [llvm] [z/OS] treat text files as text files so auto-conversion is done (PR #90128)

2024-04-25 Thread Sean Perry via cfe-commits
https://github.com/perry-ca created https://github.com/llvm/llvm-project/pull/90128 To support auto-conversion on z/OS text files need to be opened as text files. These changes will fix a number of LIT failures due to text files not being converted to the internal code page. - update a number

[clang] [z/OS] Set the default arch for z/OS to be arch10 (PR #89854)

2024-04-25 Thread Sean Perry via cfe-commits
https://github.com/perry-ca edited https://github.com/llvm/llvm-project/pull/89854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [z/OS] treat text files as text files so auto-conversion is done (PR #90128)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Sean Perry (perry-ca) Changes To support auto-conversion on z/OS text files need to be opened as text files. These changes will fix a number of LIT failures due to text files not being converted to the internal code page. - update

[clang] [llvm] [z/OS] treat text files as text files so auto-conversion is done (PR #90128)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-testing-tools Author: Sean Perry (perry-ca) Changes To support auto-conversion on z/OS text files need to be opened as text files. These changes will fix a number of LIT failures due to text files not being converted to the internal code page. - updat

[clang] [z/OS] add support for z/OS system headers to clang std header wrappers (PR #89995)

2024-04-25 Thread Sean Perry via cfe-commits
https://github.com/perry-ca edited https://github.com/llvm/llvm-project/pull/89995 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-scan-deps] Expand response files before the argument adjuster (PR #89950)

2024-04-25 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/89950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-scan-deps] Expand response files before the argument adjuster (PR #89950)

2024-04-25 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,36 @@ +// Check that the scanner can adjust arguments by reading .rsp files in advance. + +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json +// RUN: echo /Fo%t/tu.obj >> %t/args_nested.rsp jan

[clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-04-25 Thread via cfe-commits
ldrumm wrote: > Also, it's a bit funny to have .bat files without CRLF endings given that > they run on Windows They do have CRLF line endings: https://github.com/llvm/llvm-project/pull/86318/commits/1994c29731fde75f075c0605b79a14667bcfb9ac#diff-618cd5b83d62060ba3d027e314a21ceaf75d36067ff820db

[clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-04-25 Thread via cfe-commits
ldrumm wrote: > Note, the changes to clang-format-vs should likely all be reverted. .sln is a > Microsoft Visual Studio solution file, as are many of the others Right. .sln is a text file: https://learn.microsoft.com/en-us/visualstudio/extensibility/internals/solution-dot-sln-file?view=vs-2022

[clang] [clang-scan-deps] Expand response files before the argument adjuster (PR #89950)

2024-04-25 Thread Jan Svoboda via cfe-commits
@@ -792,10 +792,15 @@ int clang_scan_deps_main(int argc, char **argv, const llvm::ToolContext &) { llvm::cl::PrintOptionValues(); + // Expand response files in advance, so that we can "see" all the arguments + // when adjusting below. + auto ResponseExpander = expandRes

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

2024-04-25 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Attributes mostly do modify the type. The few that don't, like "aligned" and "may_alias", are a constant source of problems because they get accidentally stripped off. (I don't have any personal experience with "noderef".) https://github.com/llvm/llvm-project/pull/86618

[clang] Fix for merging PR #89456 into llvm 18.X (PR #90118)

2024-04-25 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The pull request needs to be against llvm:release/18.x, not llvm:main. https://github.com/llvm/llvm-project/pull/90118 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] Fix for merging PR #89456 into llvm 18.X (PR #90118)

2024-04-25 Thread Bill Wendling via cfe-commits
bwendling wrote: Does it matter if it's just a cherry-pick? https://github.com/llvm/llvm-project/pull/90118 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add test for CWG2149 "Brace elision and array length deduction" (PR #90079)

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

[clang] [clang] Add test for CWG2149 "Brace elision and array length deduction" (PR #90079)

2024-04-25 Thread via cfe-commits
https://github.com/Sirraide commented: Two questions, and more tests from the paper would probably be nice, as Corentin already pointed out, but what’s already here lgtm. https://github.com/llvm/llvm-project/pull/90079 ___ cfe-commits mailing list cfe

[clang] [clang] Add test for CWG2149 "Brace elision and array length deduction" (PR #90079)

2024-04-25 Thread via cfe-commits
@@ -12702,7 +12702,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/2149.html";>2149 drafting Brace elision and array length deduction -Not resolved +Not Resolved* Sirraide wrote: Still not too familiar

[clang] [clang] Add test for CWG2149 "Brace elision and array length deduction" (PR #90079)

2024-04-25 Thread via cfe-commits
@@ -0,0 +1,77 @@ +// RUN: %clang_cc1 -std=c++98 -triple x86_64-unknown-unknown %s -verify=expected,cxx98 -fexceptions -fcxx-exceptions -pedantic-errors -ast-dump | FileCheck %s --check-prefixes CXX98 +// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown %s -verify=expec

[clang] [clang] Add test for CWG2149 "Brace elision and array length deduction" (PR #90079)

2024-04-25 Thread via cfe-commits
Sirraide wrote: > and more tests from the paper would probably be nice Actually, yeah, now that I think about it the main question that the DR addresses is already being tested, so it’s probably fine the way it is atm. https://github.com/llvm/llvm-project/pull/90079 ___

[clang] [Driver] Restore compiler-rt arch suffix for PS and Windows (PR #89775)

2024-04-25 Thread Fangrui Song via cfe-commits
MaskRay wrote: Note that if the code uses LLVM_ENABLE_PER_TARGET_RUNTIME_DIR to decide whether to probe the new or old hierarchy first, these clang/test/Driver `libclang_rt.asan.a`/`libclang_rt.asan-x86_64.a` tests will need a `REQUIRES: a_feature_signaling_the_config`, otherwise the tests wou

[clang] Fix for merging PR #89456 into llvm 18.X (PR #90118)

2024-04-25 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: We don't merge anything against the release branch until the buildbots pass. For the buildbots to run, someone needs to manually create a pull request against 18.x branch containing both the original patch and whatever changes are necessary to make the buildbots pass. ht

[clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-04-25 Thread via cfe-commits
ldrumm wrote: Perhaps things have got lost during the discussion, but my this part of my original commit message is perhaps worth re-reading: > In simple terms this means "unless otherwise specified, convert all files > considered "text" files to LF in the project history, but checkout them ou

[clang] Clean up denormal handling with -ffp-model, -ffast-math, etc. (PR #89477)

2024-04-25 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/89477 >From 8ab931c4506f08685758a58f4cf7974c5254c3fa Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 19 Apr 2024 17:53:52 -0700 Subject: [PATCH 1/5] Clean up denormal handling with -ffp-model, -ffast-math, et

[clang] [llvm] [SCCP] Swap out range metadata to range attribute (PR #90134)

2024-04-25 Thread Andreas Jonson via cfe-commits
https://github.com/andjo403 created https://github.com/llvm/llvm-project/pull/90134 Also moved the range from the function's call sites to the functions return value as that is possible now. >From f0c948df7b158235d8631186f54a31b4e7c0bdf1 Mon Sep 17 00:00:00 2001 From: Andreas Jonson Date: Thu

[clang] [llvm] [SCCP] Swap out range metadata to range attribute (PR #90134)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andreas Jonson (andjo403) Changes Also moved the range from the function's call sites to the functions return value as that is possible now. --- Patch is 76.90 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llv

[clang] [llvm] [SCCP] Swap out range metadata to range attribute (PR #90134)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Andreas Jonson (andjo403) Changes Also moved the range from the function's call sites to the functions return value as that is possible now. --- Patch is 76.90 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/l

[clang] [llvm] [SCCP] Swap out range metadata to range attribute (PR #90134)

2024-04-25 Thread Andreas Jonson via cfe-commits
andjo403 wrote: CC @nikic as you have looked at the most of other range attribute PRs https://github.com/llvm/llvm-project/pull/90134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6473fbf - [CMake][Release] Refactor cache file and use two stages for non-PGO builds (#89812)

2024-04-25 Thread via cfe-commits
Author: Tom Stellard Date: 2024-04-25T15:32:08-07:00 New Revision: 6473fbf2d68c8486d168f29afc35d3e8a6fabe69 URL: https://github.com/llvm/llvm-project/commit/6473fbf2d68c8486d168f29afc35d3e8a6fabe69 DIFF: https://github.com/llvm/llvm-project/commit/6473fbf2d68c8486d168f29afc35d3e8a6fabe69.diff

[clang] [CMake][Release] Refactor cache file and use two stages for non-PGO builds (PR #89812)

2024-04-25 Thread Tom Stellard via cfe-commits
https://github.com/tstellar closed https://github.com/llvm/llvm-project/pull/89812 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMake][Release] Use the TGZ cpack generator for binaries (PR #90138)

2024-04-25 Thread Tom Stellard via cfe-commits
https://github.com/tstellar created https://github.com/llvm/llvm-project/pull/90138 None >From 0d0484ac99affdc8ccb9bc3a1eff827cf996c51c Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 24 Apr 2024 07:54:41 -0700 Subject: [PATCH] [CMake][Release] Use the TGZ cpack generator for binaries

[clang] [CMake][Release] Use the TGZ cpack generator for binaries (PR #90138)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tom Stellard (tstellar) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/90138.diff 1 Files Affected: - (modified) clang/cmake/caches/Release.cmake (+1) ``diff diff --git a/clang/cmake/caches/Release.cmake b/

[clang] [llvm] [CMake][Release] Enable CMAKE_POSITION_INDEPENDENT_CODE (PR #90139)

2024-04-25 Thread Tom Stellard via cfe-commits
https://github.com/tstellar created https://github.com/llvm/llvm-project/pull/90139 Set this in the cache file directly instead of via the test-release.sh script so that the release builds can be reproduced with just the cache file. >From 67f3d1ede686758238bb37a2ea50790750f7693f Mon Sep 17 00:

[clang] [llvm] [CMake][Release] Enable CMAKE_POSITION_INDEPENDENT_CODE (PR #90139)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tom Stellard (tstellar) Changes Set this in the cache file directly instead of via the test-release.sh script so that the release builds can be reproduced with just the cache file. --- Full diff: https://github.com/llvm/llvm-project/pull/

[clang-tools-extra] [clangd] Show struct members when hovering over a typedef (PR #89570)

2024-04-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/89570 >From 44aba390954c7b551ed7102e8e7b4209207c0d87 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 22 Apr 2024 02:24:14 -0400 Subject: [PATCH] [clangd] Show definition of underlying struct when hovering

[clang] [llvm] [AArch64] Add support for Neoverse-N3, Neoverse-V3 and Neoverse-V3AE (PR #87414)

2024-04-25 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray updated https://github.com/llvm/llvm-project/pull/87414 >From 5ced9f33871ea66647e04f62c637b92259805c2e Mon Sep 17 00:00:00 2001 From: Jonathan Thackray Date: Tue, 2 Apr 2024 22:08:50 +0100 Subject: [PATCH] [AArch64] Add support for Neoverse-N3, Neoverse-V3 and Neov

[clang-tools-extra] [clangd] Show definition of underlying struct when hovering over a typedef (PR #89570)

2024-04-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/89570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add support for Neoverse-N3, Neoverse-V3 and Neoverse-V3AE (PR #87414)

2024-04-25 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray closed https://github.com/llvm/llvm-project/pull/87414 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add support for Neoverse-N3, Neoverse-V3 and Neoverse-V3AE (PR #90143)

2024-04-25 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray created https://github.com/llvm/llvm-project/pull/90143 Neoverse-N3, Neoverse-V3 and Neoverse-V3AE are Armv9.2 AArch64 CPUs. Technical Reference Manual for Neoverse-N3: https://developer.arm.com/documentation/107997/latest/ Technical Reference Manual for Neovers

[clang-tools-extra] [clangd] Show definition of underlying struct when hovering over a typedef (PR #89570)

2024-04-25 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Updated patch with the following changes: * Decoupled from https://github.com/clangd/clangd/issues/959 * Handle the case of multiple layers of typedefs, and add tests for this case * Add C language specific tests https://github.com/llvm/llvm-project/pull/89570 _

[clang] [llvm] [AArch64] Add support for Neoverse-N3, Neoverse-V3 and Neoverse-V3AE (PR #90143)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Jonathan Thackray (jthackray) Changes Neoverse-N3, Neoverse-V3 and Neoverse-V3AE are Armv9.2 AArch64 CPUs. Technical Reference Manual for Neoverse-N3: https://developer.arm.com/documentation/107997/latest/ Technical Reference Ma

[clang-tools-extra] [clangd] Show definition of underlying struct when hovering over a typedef (PR #89570)

2024-04-25 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 9617da88ab961145047076c45bb2bb1ac4513634 44aba390954c7b551ed7102e8e7b4209207c0d87 --

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-04-25 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: >From Jan: > Maybe we can add the number of external HeaderFileInfos to > HeaderSearch::PrintStats() and have a test that checks for it. > The flag to enable that output is -show-stats I think. https://github.com/llvm/llvm-project/pull/89005 ___

[clang] [clang-tools-extra] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base clas

2024-04-25 Thread Pranav Kant via cfe-commits
pranavk wrote: This makes clang crash in some cases. Here's a sample: https://godbolt.org/z/4sbvna4WY https://github.com/llvm/llvm-project/pull/84050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

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

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

[clang] [clang-tools-extra] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base clas

2024-04-25 Thread Paul Kirth via cfe-commits
ilovepi wrote: we're seeing similar crashes when building Fuchsia. https://ci.chromium.org/ui/p/fuchsia/builders/ci/clang_toolchain.ci.core.arm64-host_test_only-mac/b8749648123122633169/overview A reproducer can be found here: https://storage.googleapis.com/fuchsia-artifacts/builds/87496481231

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-04-25 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/89809 >From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 23 Apr 2024 00:49:28 -0700 Subject: [PATCH 1/3] Add environment parameter to clang availability attribute ---

[clang] [clang][dataflow] Fix crash when `ConstantExpr` is used in conditional operator. (PR #90112)

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

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-04-25 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/89809 >From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 23 Apr 2024 00:49:28 -0700 Subject: [PATCH 1/3] Add environment parameter to clang availability attribute ---

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-25 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast edited https://github.com/llvm/llvm-project/pull/88978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-25 Thread Hubert Tong via cfe-commits
@@ -14547,6 +14547,17 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) { default: return false; + case Builtin::BI__builtin_frexpf: + case Builtin::BI__builtin_frexp: { +LValue Pointer; +if (!EvaluateFloat(E->getArg(0), Result, Info) || +!E

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-25 Thread Hubert Tong via cfe-commits
@@ -0,0 +1,57 @@ +// RUN: %clang_cc1 -DWIN -verify -std=c++23 -fsyntax-only %s +// RUN: %clang_cc1 -verify -std=c++23 -fsyntax-only %s + +// expected-no-diagnostics + + +#ifdef WIN +#define INFINITY ((float)(1e+300 * 1e+300)) +#define NAN (-(float)(INFINITY * 0.0F)) +#else

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-25 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast requested changes to this pull request. https://github.com/llvm/llvm-project/pull/88978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   >