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

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -925,45 +923,41 @@ In that case, you need to convert your source files (.cpp files) to module imple // Following off should be unchanged. ... -The module implementation unit will import the primary module implicitly. -We don't include any headers in the module

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

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -633,36 +631,36 @@ example: // module M's interface, so is discarded int c = use_h(); // OK -In the above example, the function definition of ``N::g`` is elided from the Reduced -BMI of ``M.cppm``. Then the use of ``use_g`` in

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

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -633,36 +631,36 @@ example: // module M's interface, so is discarded int c = use_h(); // OK -In the above example, the function definition of ``N::g`` is elided from the Reduced -BMI of ``M.cppm``. Then the use of ``use_g`` in

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

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -444,53 +435,57 @@ For example, the following example is allowed: # Inconsistent debugging level. $ clang++ -std=c++20 -g Use.cpp -fprebuilt-module-path=. -Although the two examples have inconsistent optimization and debugging level, both of them are accepted.

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

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The

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

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -444,53 +435,57 @@ For example, the following example is allowed: # Inconsistent debugging level. $ clang++ -std=c++20 -g Use.cpp -fprebuilt-module-path=. -Although the two examples have inconsistent optimization and debugging level, both of them are accepted.

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

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The

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

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -279,8 +266,9 @@ we could put ``-x c++-module`` in front of the file. For example, return 0; } -Now the filename of the ``module interface`` ends with ``.cpp`` instead of ``.cppm``, -we can't compile them by the original command lines. But we are still able to do

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

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -95,22 +76,23 @@ In this document, we use the following umbrella terms: * A ``module interface unit`` refers to either a ``primary module interface unit`` or a ``module interface partition unit``. -* An ``importable module unit`` refers to either a ``module interface

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

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I have to admit that is rather shallow due to sheer amount of text, but it still took me more like 90 minutes. Hope you find it useful. https://github.com/llvm/llvm-project/pull/90237 ___ cfe-commits mailing

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

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -444,53 +435,57 @@ For example, the following example is allowed: # Inconsistent debugging level. $ clang++ -std=c++20 -g Use.cpp -fprebuilt-module-path=. -Although the two examples have inconsistent optimization and debugging level, both of them are accepted.

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

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -312,75 +300,76 @@ So all of the following name is not valid by default: __test // and so on ... -If you still want to use the reserved module names for any reason, use -``-Wno-reserved-module-identifier`` to suppress the warning. +Using a reserved module name is

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

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -444,53 +435,57 @@ For example, the following example is allowed: # Inconsistent debugging level. $ clang++ -std=c++20 -g Use.cpp -fprebuilt-module-path=. -Although the two examples have inconsistent optimization and debugging level, both of them are accepted.

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

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The

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

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The

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

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -400,24 +389,27 @@ And the compilation process for module units are like: mod1.cppm -> clang++ mod1.cppm ... -> mod1.pcm --,--> clang++ mod1.pcm ... -> mod1.o -+ src2.cpp +> clang++ src2.cpp --->

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

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

[clang] 56c4971 - [Driver, test] Replace CHECK-NOT: warning with -### -Werror

2024-04-26 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-04-26T11:59:03-07:00 New Revision: 56c4971d33230607a7329bb831b6c8588231e872 URL: https://github.com/llvm/llvm-project/commit/56c4971d33230607a7329bb831b6c8588231e872 DIFF: https://github.com/llvm/llvm-project/commit/56c4971d33230607a7329bb831b6c8588231e872.diff

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-04-26 Thread Mital Ashok via cfe-commits
MitalAshok wrote: New version gives a pedantic warning if this is used before C++23 (and it is a substitution failure before C++23) https://github.com/llvm/llvm-project/pull/78112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-04-26 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/78112 >From 92f8720e3d21521b589d5291f086a2f32b87bfe0 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sun, 14 Jan 2024 19:52:31 + Subject: [PATCH] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing

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

2024-04-26 Thread Fangrui Song via cfe-commits
@@ -64,7 +64,8 @@ // RUN: %clang -### -ffp-model=strict -fdenormal-fp-math=preserve-sign,preserve-sign -c %s 2>&1 \ MaskRay wrote: You can use `-### -Werror` to ensure that there is no warning. (In the absence of a `--target=`, you probably want to check a

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-26 Thread Daniel M. Katz via cfe-commits
https://github.com/katzdm updated https://github.com/llvm/llvm-project/pull/89565 >From 218ffb6d5a03c96d46bfecdb4490277809f5b62e Mon Sep 17 00:00:00 2001 From: Dan Katz Date: Tue, 16 Apr 2024 17:14:50 -0400 Subject: [PATCH 1/7] Fix bug with constexpr initialization. ---

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-26 Thread Daniel M. Katz via cfe-commits
https://github.com/katzdm edited https://github.com/llvm/llvm-project/pull/89565 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-26 Thread Daniel M. Katz via cfe-commits
https://github.com/katzdm updated https://github.com/llvm/llvm-project/pull/89565 >From 218ffb6d5a03c96d46bfecdb4490277809f5b62e Mon Sep 17 00:00:00 2001 From: Dan Katz Date: Tue, 16 Apr 2024 17:14:50 -0400 Subject: [PATCH 1/7] Fix bug with constexpr initialization. ---

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-26 Thread Daniel M. Katz via cfe-commits
@@ -1032,17 +1043,15 @@ int f() { namespace GH57682 { void test() { - constexpr auto l1 = []() consteval { // expected-error {{cannot take address of consteval call operator of '(lambda at}} \ - // expected-note 2{{declared here}} +

[clang] [HLSL] Shore up floating point conversions (PR #90222)

2024-04-26 Thread Chris B via cfe-commits
@@ -0,0 +1,229 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type -finclude-default-header -Wconversion -verify -o - %s +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type -finclude-default-header -ast-dump %s | FileCheck

[clang] [llvm] [WebAssembly] Add half-precision feature (PR #90248)

2024-04-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-webassembly Author: Brendan Dahl (brendandahl) Changes This currently only defines a constant, but in the future will be used to gate builtins for experimenting and prototyping half-precision proposal

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

2024-04-26 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: LGTM. May be no need for the "etc" in the title of the patch? Thanks. 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] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-26 Thread Daniel M. Katz via cfe-commits
@@ -244,8 +244,8 @@ namespace UndefinedBehavior { constexpr int n13 = n5 + n5; // expected-error {{constant expression}} expected-note {{value -4294967296 is outside the range of }} constexpr int n14 = n3 - n5; // expected-error {{constant expression}} expected-note

[clang] [llvm] [WebAssembly] Add half-precision feature (PR #90248)

2024-04-26 Thread Brendan Dahl via cfe-commits
https://github.com/brendandahl created https://github.com/llvm/llvm-project/pull/90248 This currently only defines a constant, but in the future will be used to gate builtins for experimenting and prototyping half-precision proposal (https://github.com/WebAssembly/half-precision). >From

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-26 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 6904e0e8852a587b49a673055997e88855f219ea ec17c7668650add013f321453007191740e144e6 --

[clang] [APINotes] Allow annotating a C++ type as non-copyable in Swift (PR #90064)

2024-04-26 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan closed https://github.com/llvm/llvm-project/pull/90064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b2098db - [APINotes] Allow annotating a C++ type as non-copyable in Swift

2024-04-26 Thread via cfe-commits
Author: Egor Zhdan Date: 2024-04-26T19:30:08+01:00 New Revision: b2098db2485331e01503e1452a7a60cd8c031a3f URL: https://github.com/llvm/llvm-project/commit/b2098db2485331e01503e1452a7a60cd8c031a3f DIFF: https://github.com/llvm/llvm-project/commit/b2098db2485331e01503e1452a7a60cd8c031a3f.diff

[clang] [APINotes] Allow annotating a C++ type as non-copyable in Swift (PR #90064)

2024-04-26 Thread Egor Zhdan via cfe-commits
egorzhdan wrote: The test failure on Windows is not related to this PR. https://github.com/llvm/llvm-project/pull/90064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-26 Thread Daniel M. Katz via cfe-commits
@@ -2554,16 +2554,27 @@ Decl *Parser::ParseDeclarationAfterDeclarator( return ParseDeclarationAfterDeclaratorAndAttributes(D, TemplateInfo); } +static bool isConstexprVariable(const Decl *D) { + if (const VarDecl *Var = dyn_cast_if_present(D)) +return

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-26 Thread Daniel M. Katz via cfe-commits
katzdm wrote: This ended up being a lot more subtle than I expected. My latest push proposes a different solution; @cor3ntin and @efriedma-quic - please let me know your thoughts. This PR turns out to be a bug fix on the implementation of [P2564R3](https://wg21.link/p2564r3); as such, it

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-26 Thread Daniel M. Katz via cfe-commits
https://github.com/katzdm updated https://github.com/llvm/llvm-project/pull/89565 >From 218ffb6d5a03c96d46bfecdb4490277809f5b62e Mon Sep 17 00:00:00 2001 From: Dan Katz Date: Tue, 16 Apr 2024 17:14:50 -0400 Subject: [PATCH 1/6] Fix bug with constexpr initialization. ---

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

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

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

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

[clang] [Clang] Fix incorrect handling of #pragma {GCC} unroll N in dependent context (PR #90240)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -124,3 +124,40 @@ void test(int *List, int Length) { #pragma unroll /* expected-error {{expected statement}} */ } + +using size_t = unsigned long long; + +template erichkeane wrote: This test isn't particularly good, since it is validating that it

[clang] [Clang] Fix incorrect handling of #pragma {GCC} unroll N in dependent context (PR #90240)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -109,16 +109,20 @@ static Attr *handleLoopHintAttr(Sema , Stmt *St, const ParsedAttr , SetHints(LoopHintAttr::Unroll, LoopHintAttr::Disable); } else if (PragmaName == "unroll") { // #pragma unroll N -if (ValueExpr && !ValueExpr->isValueDependent()) { -

[clang] [Clang] Fix incorrect handling of #pragma {GCC} unroll N in dependent context (PR #90240)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -109,16 +109,20 @@ static Attr *handleLoopHintAttr(Sema , Stmt *St, const ParsedAttr , SetHints(LoopHintAttr::Unroll, LoopHintAttr::Disable); } else if (PragmaName == "unroll") { // #pragma unroll N -if (ValueExpr && !ValueExpr->isValueDependent()) { -

[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-04-26 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: This is causing new/delete mismatch https://lab.llvm.org/buildbot/#/builders/168/builds/20063 ``` = ==2164144==ERROR: AddressSanitizer: new-delete-type-mismatch on 0x503035b0 in thread T0: object passed to

[clang] [clang][modules] Allow including module maps to be non-affecting (PR #89992)

2024-04-26 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/89992 ___ 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-26 Thread Joshua Cranmer via cfe-commits
https://github.com/jcranmer-intel commented: This may need some release notes adjustments as well; I already have a todo to revisit the release notes around release time to make sure we get the summary of the denormal handling flag changes right.

[clang] [Clang] Fix incorrect handling of #pragma {GCC} unroll N in dependent context (PR #90240)

2024-04-26 Thread via cfe-commits
yronglin wrote: I'd like to add more test to check CodeGen works well. https://github.com/llvm/llvm-project/pull/90240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix incorrect handling of #pragma {GCC} unroll N in dependent context (PR #90240)

2024-04-26 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 bf67610a8ac07ec143f243f129eecd456aa63383 131783211a23d007b5b6f1d5691306df4dec716b --

[clang] [Clang] Fix incorrect handling of #pragma {GCC} unroll N in dependent context (PR #90240)

2024-04-26 Thread via cfe-commits
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/90240 This PR fix the issue reported by @alexfh PR https://github.com/llvm/llvm-project/pull/89567 fix the `#pragma unroll N` crash issue in dependent context, but it's introduce an new issue: If `N` is value

[clang] [Clang] Allow the value of unroll count to be zero in `#pragma GCC unroll` and `#pragma unroll` (PR #88666)

2024-04-26 Thread via cfe-commits
yronglin wrote: Sorry, I didn't find this problem last time I reviewed https://github.com/llvm/llvm-project/pull/89567. @alexfh Seems this issue introduced by https://github.com/llvm/llvm-project/pull/89567, I've a PR to fix it https://github.com/llvm/llvm-project/pull/90240.

[clang] [Clang] Fix incorrect handling of #pragma {GCC} unroll N in dependent context (PR #90240)

2024-04-26 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/90240 >From 131783211a23d007b5b6f1d5691306df4dec716b Mon Sep 17 00:00:00 2001 From: yronglin Date: Sat, 27 Apr 2024 01:38:34 +0800 Subject: [PATCH 1/2] [Clang] Fix incorrect handling of #pragma {GCC} unroll N in

[clang] [Clang] Fix incorrect handling of #pragma {GCC} unroll N in dependent context (PR #90240)

2024-04-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yronglin) Changes This PR fix the issue reported by @alexfh PR https://github.com/llvm/llvm-project/pull/89567 fix the `#pragma unroll N` crash issue in dependent context, but it's introduce an new issue: If `N` is value

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

2024-04-26 Thread Justin Bogner via cfe-commits
@@ -2,39 +2,45 @@ // Supported targets // -// RUN: %clang -target dxil--shadermodel6.2-pixel %s -S -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-VALID %s -// RUN: %clang -target dxil-unknown-shadermodel6.2-pixel %s -S -o /dev/null 2>&1 | FileCheck

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

2024-04-26 Thread Justin Bogner via cfe-commits
@@ -115,6 +115,30 @@ StringRef Triple::getArchName(ArchType Kind, SubArchType SubArch) { if (SubArch == AArch64SubArch_arm64e) return "arm64e"; break; + case Triple::dxil: +switch (SubArch) { +case Triple::DXILSubArch_v1_0: + return "dxilv1.0"; +

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

2024-04-26 Thread Justin Bogner via cfe-commits
@@ -2,39 +2,45 @@ // Supported targets // -// RUN: %clang -target dxil--shadermodel6.2-pixel %s -S -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-VALID %s -// RUN: %clang -target dxil-unknown-shadermodel6.2-pixel %s -S -o /dev/null 2>&1 | FileCheck

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

2024-04-26 Thread Justin Bogner via cfe-commits
@@ -98,9 +103,47 @@ std::optional tryParseProfile(StringRef Profile) { else if (llvm::getAsUnsignedInteger(Parts[2], 0, Minor)) return std::nullopt; - // dxil-unknown-shadermodel-hull + // Determine DXIL version number using the minor version number of Shader + //

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

2024-04-26 Thread Justin Bogner via cfe-commits
@@ -1171,18 +1181,27 @@ TEST(TripleTest, Normalization) { Triple::getOSTypeName(FirstOSType), Triple::getEnvironmentTypeName(FirstEnvType)}; for (int Arch = FirstArchType; Arch <= Triple::LastArchType; ++Arch) { -

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

2024-04-26 Thread Justin Bogner via cfe-commits
https://github.com/bogner requested changes to this pull request. There's a lot of churn here so I'm not 100% sure I saw all of the real changes, but I think I got them all. It might be nice to move the NFC parts into their own commit (if we actually need them, see my other comments). I don't

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

2024-04-26 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/89823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Segfault when compiling weird code (PR #90165)

2024-04-26 Thread Tim Pham via cfe-commits
https://github.com/timmyhoa closed https://github.com/llvm/llvm-project/pull/90165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Aaron Ballman (AaronBallman) Changes The intention isn't to add or change the information provided, but to improve clarity through some grammar fixes, improvements to the markdown, and so forth. --- Patch is 84.98 KiB, truncated

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

2024-04-26 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/90237 The intention isn't to add or change the information provided, but to improve clarity through some grammar fixes, improvements to the markdown, and so forth. >From a75aa14fcad6f346a3073ae88e91fa890e803422

[clang] [Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (PR #89906)

2024-04-26 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/89906 >From e87546f2bc0c7d213b6c1f2b414e0ce5335b3e47 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 24 Apr 2024 11:53:28 +0200 Subject: [PATCH 1/4] [Clang] Implement C++26 Attributes for Structured

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

2024-04-26 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/7] Clean up denormal handling with -ffp-model, -ffast-math,

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

2024-04-26 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/6] Clean up denormal handling with -ffp-model, -ffast-math,

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

2024-04-26 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp 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] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-26 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp 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] Clean up denormal handling with -ffp-model, -ffast-math, etc. (PR #89477)

2024-04-26 Thread Andy Kaylor via cfe-commits
@@ -75,6 +76,7 @@ // RUN: --check-prefix=WARN12 %s // RUN: %clang -### -ffast-math -ffp-model=strict -c %s 2>&1 | FileCheck \ // RUN: --check-prefix=WARN12 %s +// WARN12: clang andykaylor wrote: The only purpose of the check here is to establish a

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

2024-04-26 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp edited https://github.com/llvm/llvm-project/pull/89051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-26 Thread Pengcheng Wang via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -disable-O0-optnone -emit-llvm \ +// RUN: %s -o - | opt -S -passes=mem2reg | FileCheck %s + +// CHECK-LABEL: define dso_local half @test_convert_from_bf16_to_fp16( +// CHECK-SAME: bfloat noundef [[A:%.*]])

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

2024-04-26 Thread Pengcheng Wang via cfe-commits
@@ -0,0 +1,165 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -disable-O0-optnone -emit-llvm \ +// RUN: %s -o - | opt -S -passes=mem2reg | FileCheck %s + +// CHECK-LABEL: define dso_local half @test_convert_from_bf16_to_fp16( +// CHECK-SAME: bfloat noundef [[A:%.*]])

[clang] [Clang] Allow the value of unroll count to be zero in `#pragma GCC unroll` and `#pragma unroll` (PR #88666)

2024-04-26 Thread via cfe-commits
yronglin wrote: > There's one more questionable effect of this commit (together with the fix in > #89567). Some of our code started triggering "loop not unrolled" warnings. A > reduced example is at https://godbolt.org/z/jG4xsGY7s > > ``` > #include > #include > > template > int

[clang] Improve documented sampling profiler steps to best known methods (PR #88438)

2024-04-26 Thread via cfe-commits
@@ -2547,22 +2547,40 @@ usual build cycle when using sample profilers for optimization: used in the first step. The only requirement is that you build the code with the same debug info options and ``-fprofile-sample-use``. + On Linux: + .. code-block:: console

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

2024-04-26 Thread Sean Perry via cfe-commits
perry-ca wrote: Failed at `FAIL: BOLT :: RISCV/fake-label-no-entry.c` this time. I'll give it a day or so and try again. https://github.com/llvm/llvm-project/pull/90128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

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

[clang] [llvm] [DXIL] implement dot intrinsic lowering for integers (PR #85662)

2024-04-26 Thread Farzon Lotfi via cfe-commits
@@ -39,11 +39,44 @@ static bool isIntrinsicExpansion(Function ) { case Intrinsic::dx_uclamp: case Intrinsic::dx_lerp: case Intrinsic::dx_rcp: + case Intrinsic::dx_sdot: + case Intrinsic::dx_udot: return true; } return false; } +static bool

[clang] [clang-tools-extra] [libcxx] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-26 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/89446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 72c373b - [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (#89446)

2024-04-26 Thread via cfe-commits
Author: Aaron Ballman Date: 2024-04-26T12:05:15-04:00 New Revision: 72c373bfdc9860b3d75e72c219b2c81c90bc4364 URL: https://github.com/llvm/llvm-project/commit/72c373bfdc9860b3d75e72c219b2c81c90bc4364 DIFF: https://github.com/llvm/llvm-project/commit/72c373bfdc9860b3d75e72c219b2c81c90bc4364.diff

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

2024-04-26 Thread Xiang Li via cfe-commits
@@ -1016,7 +1016,34 @@ static llvm::StringRef canonicalizePlatformName(llvm::StringRef Platform) { .Case("visionos_app_extension", "xros_app_extension") .Case("ShaderModel", "shadermodel") .Default(Platform); -} }]; +} +static

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

2024-04-26 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/90152 >From 99d48cf8ae4987eb747f3baf128265dadb7d2038 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 25 Apr 2024 14:50:53 -0400 Subject: [PATCH 1/2] Reapply "[Clang][Sema] Diagnose class member access

[clang] [SemaCXX] Implement CWG2351 `void{}` (PR #78060)

2024-04-26 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/78060 >From 6ed7cad5d4993603221c3d9a777463675d69643b Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sat, 13 Jan 2024 18:03:15 + Subject: [PATCH] [SemaCXX] Implement CWG2351 `void{}` ---

[clang] [HLSL] Shore up floating point conversions (PR #90222)

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

[clang] [SemaCXX] Implement CWG2351 `void{}` (PR #78060)

2024-04-26 Thread Mital Ashok via cfe-commits
@@ -1600,12 +1600,25 @@ Sema::BuildCXXTypeConstructExpr(TypeSourceInfo *TInfo, return ExprError(Diag(TyBeginLoc, diag::err_init_for_function_type) << Ty << FullRange); - // C++17 [expr.type.conv]p2: - // If the type is cv void and the

[clang] [HLSL] Shore up floating point conversions (PR #90222)

2024-04-26 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,229 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type -finclude-default-header -Wconversion -verify -o - %s +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type -finclude-default-header -ast-dump %s | FileCheck

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

2024-04-26 Thread Abhina Sree via cfe-commits
https://github.com/abhina-sree approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/90128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-26 Thread Abhina Sree via cfe-commits
https://github.com/abhina-sree approved this pull request. LGTM 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] Fix crash when destructor definition is preceded with '=' (PR #90220)

2024-04-26 Thread via cfe-commits
@@ -3893,9 +3893,12 @@ namespace { } void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *E) { - if (E->getTemporary()->getDestructor()->isTrivial()) { -Inherited::VisitStmt(E); -return; + if (const CXXDestructorDecl *DtorDecl = +

[clang] [clang] Fix crash when destructor definition is preceded with '=' (PR #90220)

2024-04-26 Thread via cfe-commits
@@ -3893,9 +3893,12 @@ namespace { } void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *E) { - if (E->getTemporary()->getDestructor()->isTrivial()) { -Inherited::VisitStmt(E); -return; + if (const CXXDestructorDecl *DtorDecl = +

[clang] [clang-tools-extra] [libcxx] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

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

[clang] [clang] Fix crash when destructor definition is preceded with '=' (PR #90220)

2024-04-26 Thread via cfe-commits
https://github.com/Sirraide requested changes to this pull request. https://github.com/llvm/llvm-project/pull/90220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix crash when destructor definition is preceded with '=' (PR #90220)

2024-04-26 Thread via cfe-commits
@@ -3893,9 +3893,12 @@ namespace { } void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *E) { - if (E->getTemporary()->getDestructor()->isTrivial()) { -Inherited::VisitStmt(E); -return; + if (const CXXDestructorDecl *DtorDecl = +

[clang] [clang] Fix crash when destructor definition is preceded with '=' (PR #90220)

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

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level (PR #84132)

2024-04-26 Thread Amy Kwan via cfe-commits
@@ -3362,6 +3367,54 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddress(SDValue Op, return LowerGlobalTLSAddressLinux(Op, DAG); } +/// updateForAIXShLibTLSModelOpt - Helper to initialize TLS model opt settings, +/// and then apply the update. +static void

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level (PR #84132)

2024-04-26 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan approved this pull request. LGTM after all the updates. Thanks! https://github.com/llvm/llvm-project/pull/84132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level (PR #84132)

2024-04-26 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan edited https://github.com/llvm/llvm-project/pull/84132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Shore up floating point conversions (PR #90222)

2024-04-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris B (llvm-beanz) Changes This PR fixes bugs in HLSL floating conversions. HLSL always has `half`, `float` and `double` types, which promote in the order: `half`-`float`-`double` and convert in the order: `double`-`float`-`half` As

[clang] [HLSL] Shore up floating point conversions (PR #90222)

2024-04-26 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/90222 This PR fixes bugs in HLSL floating conversions. HLSL always has `half`, `float` and `double` types, which promote in the order: `half`->`float`->`double` and convert in the order:

[clang] Add new flag -Wpointer-integer-ordered-compare (PR #88489)

2024-04-26 Thread Bhuminjay Soni via cfe-commits
11happy wrote: Humble ping! https://github.com/llvm/llvm-project/pull/88489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 2d09ac4 - [clang-tidy][NFC] Fix broken link in documentation of cert-env33-c (#90216)

2024-04-26 Thread via cfe-commits
Author: NagyDonat Date: 2024-04-26T17:17:57+02:00 New Revision: 2d09ac4037415ab0044ad508aae2ff8b2559a9d8 URL: https://github.com/llvm/llvm-project/commit/2d09ac4037415ab0044ad508aae2ff8b2559a9d8 DIFF: https://github.com/llvm/llvm-project/commit/2d09ac4037415ab0044ad508aae2ff8b2559a9d8.diff

[clang-tools-extra] [clang-tidy][NFC] Fix broken link in documentation of cert-env33-c (PR #90216)

2024-04-26 Thread via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/90216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] Fix broken link in documentation of cert-env33-c (PR #90216)

2024-04-26 Thread via cfe-commits
NagyDonat wrote: I'm merging this now, because switching all links to the new domain name has no immediate advantages (as long as the current one works) and would touch a dozen additional files. (By the way, the currently used domain name is also referenced in a LICENSE.TXT file and I didn't

<    1   2   3   4   5   >