[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-19 Thread Vassil Vassilev via cfe-commits
@@ -407,6 +406,16 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit ) { } } } + + // FIXME: We should de-allocate MostRecentTU + for (Decl *D : MostRecentTU->decls()) { +if (!isa(D)) + continue; +// Check if we need to clean up the

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Chris Apple via cfe-commits
@@ -0,0 +1,106 @@ +//===--- radsan_context.cpp - Realtime Sanitizer --*- 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:

[clang] d316a0b - [NFC] Remove unused ASTWriter::getTypeID

2024-05-19 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-05-20T13:36:46+08:00 New Revision: d316a0bd48ceb4a0ee851d729291a2cdcc8818eb URL: https://github.com/llvm/llvm-project/commit/d316a0bd48ceb4a0ee851d729291a2cdcc8818eb DIFF: https://github.com/llvm/llvm-project/commit/d316a0bd48ceb4a0ee851d729291a2cdcc8818eb.diff

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

2024-05-19 Thread NAKAMURA Takumi via cfe-commits
@@ -2064,7 +2082,20 @@ struct CounterCoverageMappingBuilder createDecisionRegion(E, DecisionParams); } + /// Check if E belongs to system headers. + bool isExprInSystemHeader(const BinaryOperator *E) const { chapuni wrote: I assume each visitor

[clang] [clang] Introduce `SemaRISCV` (PR #92682)

2024-05-19 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: I think it's a good rewrite. Added more RISCV guys. https://github.com/llvm/llvm-project/pull/92682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Chris Apple via cfe-commits
@@ -0,0 +1,71 @@ +# -*- Python -*- + +import os + +# Setup config name. +config.name = "RADSAN" + config.name_suffix + +# Setup source root. +config.test_source_root = os.path.dirname(__file__) cjappl wrote: Yes, the lit tests may be placed directly in

[clang] [clang] add unnamed_addr function attribute (PR #92499)

2024-05-19 Thread YAMAMOTO Takashi via cfe-commits
@@ -1944,6 +1944,13 @@ def ReturnsTwice : InheritableAttr { let SimpleHandler = 1; } +def UnnamedAddr : InheritableAttr { + let Spellings = [Clang<"unnamed_addr">]; + let Subjects = SubjectList<[Function]>; + let Documentation = [Undocumented]; yamt

[clang] [clang] add unnamed_addr function attribute (PR #92499)

2024-05-19 Thread YAMAMOTO Takashi via cfe-commits
https://github.com/yamt updated https://github.com/llvm/llvm-project/pull/92499 >From 52b744c91bdba1cf8cda9d6164ec8fc130d75fab Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Fri, 17 May 2024 14:47:06 +0900 Subject: [PATCH 1/3] [clang] add unnamed_addr function attribute It simply

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-19 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > While I am not against the idea about splitting Sema, the implementation > detail makes me slightly concerning. What I had in mind is to split SemaC, > SemaCXX (this can be derived class of SemaCXX), SemaObjC and other dialects > (e.g., ACC or CUDA) out of Sema. Inheritance

[clang] [clang] Introduce `SemaRISCV` (PR #92682)

2024-05-19 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: It is, but I guess significant enough to not be disguised by labeling as NFC. https://github.com/llvm/llvm-project/pull/92682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [RISCV] Remove unneeded multiply in RISCV CodeGenTypes (PR #92644)

2024-05-19 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/92644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce `SemaRISCV` (PR #92682)

2024-05-19 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: Is it a NFC? https://github.com/llvm/llvm-project/pull/92682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-05-19 Thread Hubert Tong via cfe-commits
@@ -3622,15 +3623,15 @@ def Fma : FPMathTemplate, LibBuiltin<"math.h"> { def Fmax : FPMathTemplate, LibBuiltin<"math.h"> { let Spellings = ["fmax"]; - let Attributes = [NoThrow, Const]; + let Attributes = [NoThrow, Const, Constexpr];

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

2024-05-19 Thread Hubert Tong via cfe-commits
@@ -3622,15 +3623,15 @@ def Fma : FPMathTemplate, LibBuiltin<"math.h"> { def Fmax : FPMathTemplate, LibBuiltin<"math.h"> { let Spellings = ["fmax"]; - let Attributes = [NoThrow, Const]; + let Attributes = [NoThrow, Const, Constexpr]; let Prototype = "T(T, T)"; let

[clang] [MC/DC][Coverage] Add assertions into emitSourceRegions() (PR #89572)

2024-05-19 Thread Jessica Paquette via cfe-commits
@@ -190,6 +190,16 @@ class SourceMappingRegion { bool isBranch() const { return FalseCount.has_value(); } + bool isMCDCBranch() const { +const auto *BranchParams = std::get_if(); +assert(BranchParams == nullptr || BranchParams->ID >= 0); +return (BranchParams

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

2024-05-19 Thread Jessica Paquette via cfe-commits
@@ -2064,7 +2082,20 @@ struct CounterCoverageMappingBuilder createDecisionRegion(E, DecisionParams); } + /// Check if E belongs to system headers. + bool isExprInSystemHeader(const BinaryOperator *E) const { ornata wrote: assert E is not nullptr?

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-05-19 Thread Jessica Paquette via cfe-commits
@@ -517,7 +552,7 @@ class CoverageMappingBuilder { SourceRegionFilter Filter; for (const auto : FileIDMapping) { SourceLocation ExpandedLoc = FM.second.second; - SourceLocation ParentLoc = getIncludeOrExpansionLoc(ExpandedLoc); + SourceLocation

[clang] [RISCV] Remove unneeded multiply in RISCV CodeGenTypes (PR #92644)

2024-05-19 Thread Kito Cheng via cfe-commits
https://github.com/kito-cheng approved this pull request. https://github.com/llvm/llvm-project/pull/92644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,71 @@ +# -*- Python -*- + +import os + +# Setup config name. +config.name = "RADSAN" + config.name_suffix + +# Setup source root. +config.test_source_root = os.path.dirname(__file__) MaskRay wrote: `msan`, `lsan`, `gwp_asan` places lit tests directly

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,413 @@ +//===--- radsan_interceptors.cpp - Realtime Sanitizer --*- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,38 @@ +//===--- radsan_context.h - Realtime Sanitizer --*- 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:

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,52 @@ +//===--- radsan_stack.cpp - Realtime Sanitizer --*- 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:

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,106 @@ +//===--- radsan_context.cpp - Realtime Sanitizer --*- 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:

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,50 @@ +//===--- radsan.h - Realtime Sanitizer --*- 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: Apache-2.0 WITH

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,52 @@ +//===--- radsan_stack.cpp - Realtime Sanitizer --*- 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:

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,71 @@ +# -*- Python -*- MaskRay wrote: Delete Some older `lit.cfg.py` files might use this because previously they were named `lit.cfg` https://github.com/llvm/llvm-project/pull/92460 ___ cfe-commits

[clang] [clang][driver] add pointer qualifier to auto type (PR #91874)

2024-05-19 Thread Mohammed Keyvanzadeh via cfe-commits
VoltrexKeyva wrote: Pinging are there haven't been any reviews in a week. https://github.com/llvm/llvm-project/pull/91874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-19 Thread Shengchen Kan via cfe-commits
KanRobert wrote: Merge the two tests into one and put it under apx directory. https://github.com/llvm/llvm-project/pull/92338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-05-19 Thread Hubert Tong via cfe-commits
@@ -14683,6 +14710,23 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) { default: return false; + case Builtin::BI__builtin_frexp: + case Builtin::BI__builtin_frexpf: + case Builtin::BI__builtin_frexpl: { hubert-reinterpretcast wrote:

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

2024-05-19 Thread Hubert Tong via cfe-commits
@@ -3452,9 +3452,10 @@ def Fmod : FPMathTemplate, LibBuiltin<"math.h"> { def Frexp : FPMathTemplate, LibBuiltin<"math.h"> { hubert-reinterpretcast wrote: There is a separate `FrexpF16F128` that should probably also be updated.

[clang] [Serialization] Read the initializer for interesting static variables before consuming it (PR #92353)

2024-05-19 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/92353 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fc0144a - [Serialization] Read the initializer for interesting static variables before consuming it (#92353)

2024-05-19 Thread via cfe-commits
Author: Chuanqi Xu Date: 2024-05-20T10:36:03+08:00 New Revision: fc0144a30cf20d6405411da141d11bfde143d3d2 URL: https://github.com/llvm/llvm-project/commit/fc0144a30cf20d6405411da141d11bfde143d3d2 DIFF: https://github.com/llvm/llvm-project/commit/fc0144a30cf20d6405411da141d11bfde143d3d2.diff

[clang] [serialization] no transitive decl change (PR #92083)

2024-05-19 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @jansvoboda11 @Bigcheese gentle ping https://github.com/llvm/llvm-project/pull/92083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-19 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: While I am not against the idea about splitting Sema, the implementation detail makes me slightly concerning. What I had in mind is to split `SemaC`, `SemaCXX` (this can be derived class of `SemaCXX`), `SemaObjC` and other dialects (e.g., ACC or CUDA) out of `Sema`. Then big

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -1382,6 +1382,10 @@ collectSanitizerRuntimes(const ToolChain , const ArgList , StaticRuntimes.push_back("asan_cxx"); } + if (!SanArgs.needsSharedRt() && SanArgs.needsRadsanRt()) { +StaticRuntimes.push_back("radsan"); + } MaskRay wrote: I

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-19 Thread Freddy Ye via cfe-commits
FreddyLeaf wrote: ping for review https://github.com/llvm/llvm-project/pull/92338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Use operator==(StringRef, StringRef) (NFC) (PR #92708)

2024-05-19 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/92708 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] d102ee6 - [clang] Use operator==(StringRef, StringRef) (NFC) (#92708)

2024-05-19 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-05-19T16:51:07-07:00 New Revision: d102ee63e849cdaa586fd1aaae900c1399bf2b76 URL: https://github.com/llvm/llvm-project/commit/d102ee63e849cdaa586fd1aaae900c1399bf2b76 DIFF: https://github.com/llvm/llvm-project/commit/d102ee63e849cdaa586fd1aaae900c1399bf2b76.diff

[clang] [clang-tools-extra] [clang] Use operator==(StringRef, StringRef) (NFC) (PR #92708)

2024-05-19 Thread Kazu Hirata via cfe-commits
@@ -435,9 +435,8 @@ static std::string replaceDotDot(StringRef Path) { llvm::sys::path::const_iterator B = llvm::sys::path::begin(Path), E = llvm::sys::path::end(Path); while (B != E) { -if (B->compare(".") == 0) { -} -else if (B->compare("..") == 0) +

[clang] [clang-tools-extra] [clang] Use operator==(StringRef, StringRef) (NFC) (PR #92708)

2024-05-19 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/92708 >From cf3992f72b340cd402709c24bb8363a2f896635e Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 19 May 2024 09:22:14 -0700 Subject: [PATCH 1/2] [clang] Use operator==(StringRef, StringRef) (NFC) ---

[clang] [clang-tools-extra] [clang] Use operator==(StringRef, StringRef) (NFC) (PR #92708)

2024-05-19 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. LGTM with a nit https://github.com/llvm/llvm-project/pull/92708 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Use operator==(StringRef, StringRef) (NFC) (PR #92708)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -435,9 +435,8 @@ static std::string replaceDotDot(StringRef Path) { llvm::sys::path::const_iterator B = llvm::sys::path::begin(Path), E = llvm::sys::path::end(Path); while (B != E) { -if (B->compare(".") == 0) { -} -else if (B->compare("..") == 0) +

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

2024-05-19 Thread Hubert Tong via cfe-commits
@@ -3452,9 +3452,10 @@ def Fmod : FPMathTemplate, LibBuiltin<"math.h"> { def Frexp : FPMathTemplate, LibBuiltin<"math.h"> { let Spellings = ["frexp"]; - let Attributes = [NoThrow]; + let Attributes = [NoThrow, Constexpr]; hubert-reinterpretcast wrote: >

[clang] [clang-tools-extra] [clang] Use operator==(StringRef, StringRef) (NFC) (PR #92708)

2024-05-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/92708.diff 3 Files Affected: - (modified) clang-tools-extra/modularize/ModularizeUtilities.cpp (+2-3) -

[clang] [clang-tools-extra] [clang] Use operator==(StringRef, StringRef) (NFC) (PR #92708)

2024-05-19 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata edited https://github.com/llvm/llvm-project/pull/92708 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Use operator==(StringRef, StringRef) (NFC) (PR #92708)

2024-05-19 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/92708 StringRef) (NFC), >From cf3992f72b340cd402709c24bb8363a2f896635e Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 19 May 2024 09:22:14 -0700 Subject: [PATCH] [clang] Use operator==(StringRef,

[clang] 2d5e488 - [clang-format][NFC] Clean up SortIncludesTest.cpp

2024-05-19 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-05-19T15:19:05-07:00 New Revision: 2d5e488c98225108aebfe4aa4acfe6ec1f234a37 URL: https://github.com/llvm/llvm-project/commit/2d5e488c98225108aebfe4aa4acfe6ec1f234a37 DIFF: https://github.com/llvm/llvm-project/commit/2d5e488c98225108aebfe4aa4acfe6ec1f234a37.diff

[clang] [clang] Macro for constant rounding mode (PR #92699)

2024-05-19 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,55 @@ +// RUN: %clang_cc1 -emit-llvm -triple i386-linux -Wno-unknown-pragmas %s -o - | FileCheck %s efriedma-quic wrote: Since this is a preprocessor testcase, can you just use -E? https://github.com/llvm/llvm-project/pull/92699

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-05-19 Thread Andreas Jonson via cfe-commits
@@ -1427,8 +1429,20 @@ static void AddParamAndFnBasicAttributes(const CallBase , ValidExactParamAttrs[ArgNo].getAlignment().valueOrOne()) AL = AL.removeParamAttribute(Context, I, Attribute::Alignment); + auto ExistingRange =

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-05-19 Thread Andreas Jonson via cfe-commits
@@ -1427,8 +1429,20 @@ static void AddParamAndFnBasicAttributes(const CallBase , ValidExactParamAttrs[ArgNo].getAlignment().valueOrOne()) AL = AL.removeParamAttribute(Context, I, Attribute::Alignment); + auto ExistingRange =

[clang] [clang-format] Fix bad spacing of macro after lambda introducer (PR #92673)

2024-05-19 Thread Matthew Olsson via cfe-commits
https://github.com/mattco98 converted_to_draft https://github.com/llvm/llvm-project/pull/92673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix bad spacing of macro after lambda introducer (PR #92673)

2024-05-19 Thread Matthew Olsson via cfe-commits
mattco98 wrote: @nico pointed out that calling `handleAttributes()` in `tryToParseLambda()` might be a better way to fix this, and I might be able to fix his other attribute issue while I'm at it. Going to draft this for now. https://github.com/llvm/llvm-project/pull/92673

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

2024-05-19 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] [llvm] [inline] Clone return range attribute on the callsite into inlined call (PR #92666)

2024-05-19 Thread Andreas Jonson via cfe-commits
andjo403 wrote: hmm noticed #91101 now looks like I need to coordinate with that PR https://github.com/llvm/llvm-project/pull/92666 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/92704 >From 433b8e142d05a8fe2206ae0cec62423b21e792d2 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Sun, 19 May 2024 11:10:38 -0700 Subject: [PATCH 1/3] HLSL Default and Relaxed Availability Diagnostics (#3) ---

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

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,100 @@ +# RUN: llvm-mc -filetype=obj -crel -triple=x86_64 %s -o %t.o +# RUN: llvm-readelf -Sr -x .crelrodata2 -x .crelrodata16 %t.o | FileCheck %s + +# RUN: %if aarch64-registered-target %{ llvm-mc -filetype=obj -crel -triple=aarch64_be %s -o %t.be.o %} +# RUN: %if

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

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -1278,29 +1285,69 @@ void ELFState::writeSectionContent( if (!Section.Relocations) return; + const bool IsCrel = Section.Type == llvm::ELF::SHT_CREL; const bool IsRela = Section.Type == llvm::ELF::SHT_RELA; + typename ELFT::uint OffsetMask = 8, Offset = 0,

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

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -3840,14 +3849,15 @@ void GNUELFDumper::printRelRelaReloc(const Relocation , template static void printRelocHeaderFields(formatted_raw_ostream , unsigned SType, - const typename ELFT::Ehdr ) { + const

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

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -86,6 +86,8 @@ DYNAMIC_TAG(RELRSZ, 35) // Size of Relr relocation table. DYNAMIC_TAG(RELR, 36)// Address of relocation table (Relr entries). DYNAMIC_TAG(RELRENT, 37) // Size of a Relr relocation entry. +DYNAMIC_TAG(CREL, 38) // CREL relocation table +

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

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -32,12 +32,17 @@ FileHeader: # RUN: --match-full-lines --check-prefixes=GNU-RELOCS,GNU-PLTRELA # LLVM-RELOCS: Dynamic Relocations { +# LLVM-RELOCS-NEXT: 0x8 R_X86_64_64 foo 0x0 # LLVM-RELOCS-NEXT: 0x1 R_X86_64_NONE foo 0x0 # LLVM-RELOCS-NEXT: 0x2

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

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -123,6 +123,12 @@ class ContiguousBlobAccumulator { return encodeULEB128(Val, OS); } + unsigned writeSLEB128(int64_t Val) { +if (!checkLimit(10)) MaskRay wrote: Yes, LEB128 representing 64-bit integer needs at most 10 bytes. I added a change

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

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,18 @@ +# REQUIRES: powerpc-registered-target +## Test CREL for a 32-bit big-endian target. MaskRay wrote: Thanks for the suggestion. Changed ppc to arm. For static relocations, the RELA form is exclusively used as recommended toolchain practice.

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

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -934,10 +943,51 @@ void ELFWriter::WriteSecHdrEntry(uint32_t Name, uint32_t Type, uint64_t Flags, WriteWord(EntrySize); // sh_entsize } +template +static void encodeCrel(ArrayRef Relocs, raw_ostream ) { + uint OffsetMask = 8, Offset = 0, Addend = 0; + uint32_t Symidx

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

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -1278,29 +1285,69 @@ void ELFState::writeSectionContent( if (!Section.Relocations) return; + const bool IsCrel = Section.Type == llvm::ELF::SHT_CREL; const bool IsRela = Section.Type == llvm::ELF::SHT_RELA; + typename ELFT::uint OffsetMask = 8, Offset = 0,

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

2024-05-19 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/91280 >From a0cfafb82db825512b0ca44778fa9d4bb435563d Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 6 May 2024 15:37:50 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/92704 >From 433b8e142d05a8fe2206ae0cec62423b21e792d2 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Sun, 19 May 2024 11:10:38 -0700 Subject: [PATCH 1/2] HLSL Default and Relaxed Availability Diagnostics (#3) ---

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/92704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] HLSL Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/92704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] HLSL Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-19 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 3f33c4c14e79e68007cf1460e4a0e606eb199da5 433b8e142d05a8fe2206ae0cec62423b21e792d2 --

[clang] [HLSL] - do not merge - Default and Relaxed Availability Diagnostics (PR #92703)

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

[clang] [HLSL] - do not merge - Default and Relaxed Availability Diagnostics (PR #92703)

2024-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/92703 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] HLSL Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/92704 None >From 433b8e142d05a8fe2206ae0cec62423b21e792d2 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Sun, 19 May 2024 11:10:38 -0700 Subject: [PATCH] HLSL Default and Relaxed Availability Diagnostics (#3) ---

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92703)

2024-05-19 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 3f33c4c14e79e68007cf1460e4a0e606eb199da5 35d72822b298d77b4d73cb6b92fd218c4722e6b6 --

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

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

[clang] 3f33c4c - [Clang][HLSL] Add environment parameter to availability attribute (#89809)

2024-05-19 Thread via cfe-commits
Author: Helena Kotas Date: 2024-05-19T10:46:12-07:00 New Revision: 3f33c4c14e79e68007cf1460e4a0e606eb199da5 URL: https://github.com/llvm/llvm-project/commit/3f33c4c14e79e68007cf1460e4a0e606eb199da5 DIFF: https://github.com/llvm/llvm-project/commit/3f33c4c14e79e68007cf1460e4a0e606eb199da5.diff

[clang] [clang] Macro for constant rounding mode (PR #92699)

2024-05-19 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff updated https://github.com/llvm/llvm-project/pull/92699 >From f8cd2539fb7f0388d7f3955f58b61b09da03bf0c Mon Sep 17 00:00:00 2001 From: Serge Pavlov Date: Sun, 19 May 2024 18:43:08 +0700 Subject: [PATCH] [clang] Macro for constant rounding mode MIME-Version: 1.0

[clang] [clang] Macro for constant rounding mode (PR #92699)

2024-05-19 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 643f36184bd3d9a95cbfd608af6f169e0187 15b6edbcc8fe4559e9a9d8930f88dbbb6ed38b8c --

[clang] [clang] Macro for constant rounding mode (PR #92699)

2024-05-19 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff created https://github.com/llvm/llvm-project/pull/92699 The forthcoming C standard defines pragma FENV_ROUND to support constant rounding mode. It also requires some functions to be evaluated with such mode, N3096 7.6.2p4 states: Within the scope of an

[clang] 643f361 - HLSL availability diagnostics design doc (#92207)

2024-05-19 Thread via cfe-commits
Author: Helena Kotas Date: 2024-05-19T09:27:56-07:00 New Revision: 643f36184bd3d9a95cbfd608af6f169e0187 URL: https://github.com/llvm/llvm-project/commit/643f36184bd3d9a95cbfd608af6f169e0187 DIFF: https://github.com/llvm/llvm-project/commit/643f36184bd3d9a95cbfd608af6f169e0187.diff

[clang] HLSL availability diagnostics design doc (PR #92207)

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

[clang] HLSL availability diagnostics design doc (PR #92207)

2024-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/92207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Skip tautological comparison if the comparison involves the 'size_t' type (PR #74427)

2024-05-19 Thread Shivam Gupta via cfe-commits
https://github.com/xgupta closed https://github.com/llvm/llvm-project/pull/74427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Skip tautological comparison if the comparison involves the 'size_t' type (PR #74427)

2024-05-19 Thread Shivam Gupta via cfe-commits
xgupta wrote: Sorry, I do have motivation to continue this patch now, hence closing it. Thank to reviewers for reviewing it. https://github.com/llvm/llvm-project/pull/74427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Add support for [[msvc::noinline]] attribute. (PR #91720)

2024-05-19 Thread Xu Zhang via cfe-commits
@@ -1997,9 +1997,12 @@ def Convergent : InheritableAttr { def NoInline : DeclOrStmtAttr { let Spellings = [CustomKeyword<"__noinline__">, GCC<"noinline">, CXX11<"clang", "noinline">, C23<"clang", "noinline">, + CXX11<"msvc", "noinline">,

[clang] [Clang] Add support for [[msvc::noinline]] attribute. (PR #91720)

2024-05-19 Thread Xu Zhang via cfe-commits
@@ -0,0 +1,72 @@ +// RUN: %clang_cc1 -verify -fsyntax-only %s -Wno-c++17-extensions simonzgx wrote: I removed the redundant unit tests, but no new test cases were added. I'm not sure if that's acceptable, because `[[msvc::noinline]]` is just an alias for

[clang] [Clang][Sema] Don't build CXXDependentScopeMemberExprs for potentially implicit class member access expressions (PR #92318)

2024-05-19 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/92318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-19 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Was there ever an RFC on this whole 'splitting up Sema' project? It was quite extensively discussed in #84184, but it wasn't deemed necessary to go through RFC process for a non-functional change that doesn't affect stable interfaces. > I think starting up from the easier

[clang] [llvm] [mlir] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-05-19 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx closed https://github.com/llvm/llvm-project/pull/88182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 10edb49 - [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (#88182)

2024-05-19 Thread via cfe-commits
Author: Alex Voicu Date: 2024-05-19T14:59:03+01:00 New Revision: 10edb4991c12738e60843d55cd9edbf6d702d9eb URL: https://github.com/llvm/llvm-project/commit/10edb4991c12738e60843d55cd9edbf6d702d9eb DIFF: https://github.com/llvm/llvm-project/commit/10edb4991c12738e60843d55cd9edbf6d702d9eb.diff

[clang] [clang-tools-extra] [Clang][Sema] Diagnose current instantiation used as an incomplete base class (PR #92597)

2024-05-19 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. The change itself looks pretty good, but note that GCC only warns about this, and more importantly MSVC still accepts the code without complaint. So this means that we could find out from user feedback that we will need to keep the old

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-19 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Was there ever an RFC on this whole 'splitting up Sema' project? I have my own reservations as well. I think starting up from the easier bits is a risky proposition, as we might realize this whole thing will fail when we get to the harder parts. I also think this can lead in

[clang] c587483 - Revert "[Bounds-Safety] Fix `pragma-attribute-supported-attributes-list.test`"

2024-05-19 Thread Vitaly Buka via cfe-commits
Author: Vitaly Buka Date: 2024-05-19T06:21:40-07:00 New Revision: c587483da0b50efa04146fde205da1d16731e12e URL: https://github.com/llvm/llvm-project/commit/c587483da0b50efa04146fde205da1d16731e12e DIFF: https://github.com/llvm/llvm-project/commit/c587483da0b50efa04146fde205da1d16731e12e.diff

[clang] 6447abe - Revert "[BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C (#90786)"

2024-05-19 Thread Vitaly Buka via cfe-commits
Author: Vitaly Buka Date: 2024-05-19T05:44:40-07:00 New Revision: 6447abe067c8088a5cc093fe872719374e174068 URL: https://github.com/llvm/llvm-project/commit/6447abe067c8088a5cc093fe872719374e174068 DIFF: https://github.com/llvm/llvm-project/commit/6447abe067c8088a5cc093fe872719374e174068.diff

[clang] ed9007d - Revert "[Bounds-Safety] Temporarily relax a `counted_by` attribute restriction on flexible array members"

2024-05-19 Thread Vitaly Buka via cfe-commits
Author: Vitaly Buka Date: 2024-05-19T05:44:40-07:00 New Revision: ed9007d0d219726db01f211e9c9ab72fbfe4ecb1 URL: https://github.com/llvm/llvm-project/commit/ed9007d0d219726db01f211e9c9ab72fbfe4ecb1 DIFF: https://github.com/llvm/llvm-project/commit/ed9007d0d219726db01f211e9c9ab72fbfe4ecb1.diff

[clang] [clang][NFC] Refactor `Sema::TagUseKind` (PR #92689)

2024-05-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch makes `TagUseKind` a scoped enumeration, and moves it outside of `Sema` class, making it eligible for forward declaring. --- Patch is 55.02 KiB, truncated to 20.00 KiB below, full version:

[clang] [clang][NFC] Refactor `Sema::TagUseKind` (PR #92689)

2024-05-19 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I'll merge this when CI passes. https://github.com/llvm/llvm-project/pull/92689 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Refactor `Sema::TagUseKind` (PR #92689)

2024-05-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/92689 This patch makes `TagUseKind` a scoped enumeration, and moves it outside of `Sema` class, making it eligible for forward declaring. >From 9c89a7b451221d79f96fd1fc1d015c6a22b9f66e Mon Sep 17 00:00:00 2001 From:

[clang] [Clang] Add support for [[msvc::noinline]] attribute. (PR #91720)

2024-05-19 Thread Xu Zhang via cfe-commits
https://github.com/simonzgx updated https://github.com/llvm/llvm-project/pull/91720 >From 54b69712d2ffc3536d41d56194e67da802b92049 Mon Sep 17 00:00:00 2001 From: Xu Zhang Date: Fri, 10 May 2024 01:24:24 +0800 Subject: [PATCH 1/4] [Clang] Add support for [[msvc::noinline]] attribute. (#90941)

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92645 >From 4fe09a3411e54561857d2f9d8c1808cb2728e299 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 18 May 2024 13:33:04 +0300 Subject: [PATCH 1/3] [clang] Introduce `SemaCoroutine` ---

[clang] [llvm] [clang][dataflow] Make `CNFFormula` externally accessible. (PR #92401)

2024-05-19 Thread Stanislav Gatev via cfe-commits
https://github.com/sgatev edited https://github.com/llvm/llvm-project/pull/92401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   >