[llvm-branch-commits] [clang] 780ee1d - Revert "[clang] Fix crash when declaring invalid lambda member (#74110)"
Author: Vitaly Buka Date: 2024-03-09T00:30:10-08:00 New Revision: 780ee1d80aa1b8cf54bd642e7c2a7e59c2dc9e11 URL: https://github.com/llvm/llvm-project/commit/780ee1d80aa1b8cf54bd642e7c2a7e59c2dc9e11 DIFF: https://github.com/llvm/llvm-project/commit/780ee1d80aa1b8cf54bd642e7c2a7e59c2dc9e11.diff LOG: Revert "[clang] Fix crash when declaring invalid lambda member (#74110)" This reverts commit dc567a2ec61d07e89902f73c1bdd4106dc071f3f. Added: Modified: clang/docs/ReleaseNotes.rst clang/lib/AST/DeclCXX.cpp clang/test/SemaCXX/lambda-expressions.cpp Removed: diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 8935a610722a31..690fc7ed271a3d 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -258,9 +258,6 @@ Bug Fixes in This Version operator. Fixes (#GH83267). -- Fixes an assertion failure on invalid code when trying to define member - functions in lambdas. - Bug Fixes to Compiler Builtins ^^ @@ -411,7 +408,7 @@ RISC-V Support CUDA/HIP Language Changes ^ -- PTX is no longer included by default when compiling for CUDA. Using +- PTX is no longer included by default when compiling for CUDA. Using ``--cuda-include-ptx=all`` will return the old behavior. CUDA Support diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp index 645ec2f7563bca..1c3dcf63465c68 100644 --- a/clang/lib/AST/DeclCXX.cpp +++ b/clang/lib/AST/DeclCXX.cpp @@ -1567,9 +1567,10 @@ bool CXXRecordDecl::isGenericLambda() const { #ifndef NDEBUG static bool allLookupResultsAreTheSame(const DeclContext::lookup_result &R) { - return llvm::all_of(R, [&](NamedDecl *D) { -return D->isInvalidDecl() || declaresSameEntity(D, R.front()); - }); + for (auto *D : R) +if (!declaresSameEntity(D, R.front())) + return false; + return true; } #endif diff --git a/clang/test/SemaCXX/lambda-expressions.cpp b/clang/test/SemaCXX/lambda-expressions.cpp index 8907b08e1830e0..0516a5da31ae9a 100644 --- a/clang/test/SemaCXX/lambda-expressions.cpp +++ b/clang/test/SemaCXX/lambda-expressions.cpp @@ -1,4 +1,3 @@ -// RUN: %clang_cc1 -std=c++11 -Wno-unused-value -fsyntax-only -verify=expected,expected-cxx14,cxx11 -fblocks %s // RUN: %clang_cc1 -std=c++14 -Wno-unused-value -fsyntax-only -verify -verify=expected-cxx14 -fblocks %s // RUN: %clang_cc1 -std=c++17 -Wno-unused-value -verify -ast-dump -fblocks %s | FileCheck %s @@ -559,8 +558,8 @@ struct B { int x; A a = [&] { int y = x; }; A b = [&] { [&] { [&] { int y = x; }; }; }; - A d = [&](auto param) { int y = x; }; // cxx11-error {{'auto' not allowed in lambda parameter}} - A e = [&](auto param) { [&] { [&](auto param2) { int y = x; }; }; }; // cxx11-error 2 {{'auto' not allowed in lambda parameter}} + A d = [&](auto param) { int y = x; }; + A e = [&](auto param) { [&] { [&](auto param2) { int y = x; }; }; }; }; B b; @@ -590,7 +589,6 @@ struct S1 { void foo1() { auto s0 = S1{[name=]() {}}; // expected-error 2 {{expected expression}} auto s1 = S1{[name=name]() {}}; // expected-error {{use of undeclared identifier 'name'; did you mean 'name1'?}} - // cxx11-warning@-1 {{initialized lambda captures are a C++14 extension}} } } @@ -606,7 +604,7 @@ namespace PR25627_dont_odr_use_local_consts { namespace ConversionOperatorDoesNotHaveDeducedReturnType { auto x = [](int){}; - auto y = [](auto &v) -> void { v.n = 0; }; // cxx11-error {{'auto' not allowed in lambda parameter}} cxx11-note {{candidate function not viable}} cxx11-note {{conversion candidate}} + auto y = [](auto &v) -> void { v.n = 0; }; using T = decltype(x); using U = decltype(y); using ExpectedTypeT = void (*)(int); @@ -626,22 +624,22 @@ namespace ConversionOperatorDoesNotHaveDeducedReturnType { template friend constexpr U::operator ExpectedTypeU() const noexcept; #else -friend auto T::operator()(int) const; // cxx11-error {{'auto' return without trailing return type; deduced return types are a C++14 extension}} +friend auto T::operator()(int) const; friend T::operator ExpectedTypeT() const; template - friend void U::operator()(T&) const; // cxx11-error {{friend declaration of 'operator()' does not match any declaration}} + friend void U::operator()(T&) const; // FIXME: This should not match, as above. template - friend U::operator ExpectedTypeU() const; // cxx11-error {{friend declaration of 'operator void (*)(type-parameter-0-0 &)' does not match any declaration}} + friend U::operator ExpectedTypeU() const; #endif private: int n; }; - // Should be OK in C++14 and later: lambda's call operator is a friend. - void use(X &x) { y(x); } // cxx11-error {{no matching function for call to object}} + // Should be OK: lambda's call opera
[llvm-branch-commits] [clang] [Clang][Driver] Add special-casing for including libc++ in C++03 (PR #83723)
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/83723 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] Backport PR83993 to 18.x (PR #84298)
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/84298 >From 02e9b82d220961bc7a42295f051564a217144d4a Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Tue, 5 Mar 2024 22:34:04 +0800 Subject: [PATCH] [InstCombine] Fix miscompilation in PR83947 (#83993) https://github.com/llvm/llvm-project/blob/762f762504967efbe159db5c737154b989afc9bb/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp#L394-L407 Comment from @topperc: > This transforms assumes the mask is a non-zero splat. We only know its a splat and not provably all 0s. The mask is a constexpr that includes the address of the global variable. We can't resolve the constant expression to an exact value. Fixes #83947. --- llvm/include/llvm/Analysis/VectorUtils.h | 5 ++ llvm/lib/Analysis/VectorUtils.cpp | 25 +++ .../InstCombine/InstCombineCalls.cpp | 13 ++-- .../InstCombine/masked_intrinsics.ll | 6 +- llvm/test/Transforms/InstCombine/pr83947.ll | 67 +++ 5 files changed, 110 insertions(+), 6 deletions(-) create mode 100644 llvm/test/Transforms/InstCombine/pr83947.ll diff --git a/llvm/include/llvm/Analysis/VectorUtils.h b/llvm/include/llvm/Analysis/VectorUtils.h index 7a92e62b53c53d..c6eb66cc9660ca 100644 --- a/llvm/include/llvm/Analysis/VectorUtils.h +++ b/llvm/include/llvm/Analysis/VectorUtils.h @@ -406,6 +406,11 @@ bool maskIsAllZeroOrUndef(Value *Mask); /// lanes can be assumed active. bool maskIsAllOneOrUndef(Value *Mask); +/// Given a mask vector of i1, Return true if any of the elements of this +/// predicate mask are known to be true or undef. That is, return true if at +/// least one lane can be assumed active. +bool maskContainsAllOneOrUndef(Value *Mask); + /// Given a mask vector of the form , return an APInt (of bitwidth Y) /// for each lane which may be active. APInt possiblyDemandedEltsInMask(Value *Mask); diff --git a/llvm/lib/Analysis/VectorUtils.cpp b/llvm/lib/Analysis/VectorUtils.cpp index 73facc76a92b2c..bf7bc0ba84a033 100644 --- a/llvm/lib/Analysis/VectorUtils.cpp +++ b/llvm/lib/Analysis/VectorUtils.cpp @@ -1012,6 +1012,31 @@ bool llvm::maskIsAllOneOrUndef(Value *Mask) { return true; } +bool llvm::maskContainsAllOneOrUndef(Value *Mask) { + assert(isa(Mask->getType()) && + isa(Mask->getType()->getScalarType()) && + cast(Mask->getType()->getScalarType())->getBitWidth() == + 1 && + "Mask must be a vector of i1"); + + auto *ConstMask = dyn_cast(Mask); + if (!ConstMask) +return false; + if (ConstMask->isAllOnesValue() || isa(ConstMask)) +return true; + if (isa(ConstMask->getType())) +return false; + for (unsigned + I = 0, + E = cast(ConstMask->getType())->getNumElements(); + I != E; ++I) { +if (auto *MaskElt = ConstMask->getAggregateElement(I)) + if (MaskElt->isAllOnesValue() || isa(MaskElt)) +return true; + } + return false; +} + /// TODO: This is a lot like known bits, but for /// vectors. Is there something we can common this with? APInt llvm::possiblyDemandedEltsInMask(Value *Mask) { diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp index a647be2d26c761..bc43edb5e62065 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -412,11 +412,14 @@ Instruction *InstCombinerImpl::simplifyMaskedScatter(IntrinsicInst &II) { if (auto *SplatPtr = getSplatValue(II.getArgOperand(1))) { // scatter(splat(value), splat(ptr), non-zero-mask) -> store value, ptr if (auto *SplatValue = getSplatValue(II.getArgOperand(0))) { - Align Alignment = cast(II.getArgOperand(2))->getAlignValue(); - StoreInst *S = - new StoreInst(SplatValue, SplatPtr, /*IsVolatile=*/false, Alignment); - S->copyMetadata(II); - return S; + if (maskContainsAllOneOrUndef(ConstMask)) { +Align Alignment = +cast(II.getArgOperand(2))->getAlignValue(); +StoreInst *S = new StoreInst(SplatValue, SplatPtr, /*IsVolatile=*/false, + Alignment); +S->copyMetadata(II); +return S; + } } // scatter(vector, splat(ptr), splat(true)) -> store extract(vector, // lastlane), ptr diff --git a/llvm/test/Transforms/InstCombine/masked_intrinsics.ll b/llvm/test/Transforms/InstCombine/masked_intrinsics.ll index 2704905f7a358d..c87c1199f727ea 100644 --- a/llvm/test/Transforms/InstCombine/masked_intrinsics.ll +++ b/llvm/test/Transforms/InstCombine/masked_intrinsics.ll @@ -292,7 +292,11 @@ entry: define void @scatter_nxv4i16_uniform_vals_uniform_ptrs_all_active_mask(ptr %dst, i16 %val) { ; CHECK-LABEL: @scatter_nxv4i16_uniform_vals_uniform_ptrs_all_active_mask( ; CHECK-NEXT: entry: -; CHECK-NEXT:store i16 [[VAL:%.*]], ptr [[DST:%.*]], align 2 +; CHECK-NEXT:[[BROADCAST_SPLATINSERT:%.*]] = insertelement p
[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/84598 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/84598 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/84598 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/84598 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/84598 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/84598 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] Bump version to 18.1.2 (PR #84655)
https://github.com/tstellar created https://github.com/llvm/llvm-project/pull/84655 None >From 2ddb32b50752ca91ca9946cb9c9ea3d92c8616d0 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 9 Mar 2024 14:26:47 -0800 Subject: [PATCH] Bump version to 18.1.2 --- llvm/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index ddf95cbc6c5175..c5fa66390bba8d 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -22,7 +22,7 @@ if(NOT DEFINED LLVM_VERSION_MINOR) set(LLVM_VERSION_MINOR 1) endif() if(NOT DEFINED LLVM_VERSION_PATCH) - set(LLVM_VERSION_PATCH 1) + set(LLVM_VERSION_PATCH 2) endif() if(NOT DEFINED LLVM_VERSION_SUFFIX) set(LLVM_VERSION_SUFFIX) ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [mlir] [mlir][Transform] Mapping update rules for `apply_conversion_patterns` (PR #84140)
https://github.com/matthias-springer updated https://github.com/llvm/llvm-project/pull/84140 >From e2b6b753bad33cbd03b79d3b9b4c2f0cabfbab8d Mon Sep 17 00:00:00 2001 From: Matthias Springer Date: Fri, 8 Mar 2024 02:09:29 + Subject: [PATCH] [mlir][Transform] Specify mapping update rules for `apply_conversion_patterns` --- .../Transform/IR/TransformInterfaces.h| 51 +-- .../mlir/Dialect/Transform/IR/TransformOps.td | 11 ++ .../Transform/IR/TransformInterfaces.cpp | 46 +- .../lib/Dialect/Transform/IR/TransformOps.cpp | 142 +- mlir/test/Dialect/Transform/ops-invalid.mlir | 22 +++ .../Transform/test-pattern-application.mlir | 39 + 6 files changed, 256 insertions(+), 55 deletions(-) diff --git a/mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h b/mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h index 32724ff4b98e8e..5db1a2c28fd414 100644 --- a/mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h +++ b/mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h @@ -1026,7 +1026,7 @@ class TrackingListener : public RewriterBase::Listener, /// Return the transform op in which this TrackingListener is used. TransformOpInterface getTransformOp() const { return transformOp; } -private: +protected: friend class TransformRewriter; void notifyOperationErased(Operation *op) override; @@ -1034,6 +1034,7 @@ class TrackingListener : public RewriterBase::Listener, void notifyOperationReplaced(Operation *op, ValueRange newValues) override; using Listener::notifyOperationReplaced; +private: /// The transform op in which this TrackingListener is used. TransformOpInterface transformOp; @@ -1047,23 +1048,48 @@ class TrackingListener : public RewriterBase::Listener, /// A specialized listener that keeps track of cases in which no replacement /// payload could be found. The error state of this listener must be checked /// before the end of its lifetime. -class ErrorCheckingTrackingListener : public TrackingListener { +template +class ErrorCheckingTrackingListener : public TrackingListenerTy { public: - using transform::TrackingListener::TrackingListener; + using TrackingListenerTy::TrackingListenerTy; - ~ErrorCheckingTrackingListener() override; + ~ErrorCheckingTrackingListener() override { +// The state of the ErrorCheckingTrackingListener must be checked and reset +// if there was an error. This is to prevent errors from accidentally being +// missed. +assert(status.succeeded() && "listener state was not checked"); + } /// Check and return the current error state of this listener. Afterwards, /// resets the error state to "success". - DiagnosedSilenceableFailure checkAndResetError(); + DiagnosedSilenceableFailure checkAndResetError() { +DiagnosedSilenceableFailure s = std::move(status); +status = DiagnosedSilenceableFailure::success(); +errorCounter = 0; +return s; + } /// Return "true" if this tracking listener had a failure. - bool failed() const; + bool failed() const { return !status.succeeded(); } protected: - void - notifyPayloadReplacementNotFound(Operation *op, ValueRange values, - DiagnosedSilenceableFailure &&diag) override; + void notifyPayloadReplacementNotFound( + Operation *op, ValueRange values, + DiagnosedSilenceableFailure &&diag) override { +// Merge potentially existing diags and store the result in the listener. +SmallVector diags; +diag.takeDiagnostics(diags); +if (!status.succeeded()) + status.takeDiagnostics(diags); +status = DiagnosedSilenceableFailure::silenceableFailure(std::move(diags)); + +// Report more details. +status.attachNote(op->getLoc()) << "[" << errorCounter << "] replaced op"; +for (auto &&[index, value] : llvm::enumerate(values)) + status.attachNote(value.getLoc()) + << "[" << errorCounter << "] replacement value " << index; +++errorCounter; + } private: /// The error state of this listener. "Success" indicates that no error @@ -1082,8 +1108,9 @@ class TransformRewriter : public RewriterBase { friend class TransformState; /// Create a new TransformRewriter. - explicit TransformRewriter(MLIRContext *ctx, - ErrorCheckingTrackingListener *listener); + explicit TransformRewriter( + MLIRContext *ctx, + ErrorCheckingTrackingListener *listener); public: /// Return "true" if the tracking listener had failures. @@ -1106,7 +1133,7 @@ class TransformRewriter : public RewriterBase { Operation *replacement); private: - ErrorCheckingTrackingListener *const listener; + ErrorCheckingTrackingListener *const listener; }; /// This trait is supposed to be attached to Transform dialect operations that diff --git a/mlir/include/mlir/Dialect/Transform/IR/TransformOps.td b/mlir/include/mlir/Dialect/Transfo
[llvm-branch-commits] [openmp] release/18.x: [OpenMP] fix endianness dependent definitions in OMP headers for MSVC (#84540) (PR #84668)
https://github.com/llvmbot created https://github.com/llvm/llvm-project/pull/84668 Backport 110141b37813dc48af33de5e1407231e56acdfc5 Requested by: @brad0 >From 75a7c4892acdf381485ee1b1a2194b4babeaee80 Mon Sep 17 00:00:00 2001 From: Vadim Paretsky Date: Sat, 9 Mar 2024 10:47:31 -0800 Subject: [PATCH] [OpenMP] fix endianness dependent definitions in OMP headers for MSVC (#84540) MSVC does not define __BYTE_ORDER__ making the check for BigEndian erroneously evaluate to true and breaking the struct definitions in MSVC compiled builds correspondingly. The fix adds an additional check for whether __BYTE_ORDER__ is defined by the compiler to fix these. - Co-authored-by: Vadim Paretsky (cherry picked from commit 110141b37813dc48af33de5e1407231e56acdfc5) --- openmp/runtime/src/kmp.h | 4 ++-- openmp/runtime/src/kmp_lock.h| 3 ++- openmp/runtime/test/tasking/bug_nested_proxy_task.c | 2 +- openmp/runtime/test/tasking/bug_proxy_task_dep_waiting.c | 2 +- openmp/runtime/test/tasking/hidden_helper_task/common.h | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/openmp/runtime/src/kmp.h b/openmp/runtime/src/kmp.h index 259c57b5afbca5..e3a1e20731bbe0 100644 --- a/openmp/runtime/src/kmp.h +++ b/openmp/runtime/src/kmp.h @@ -2506,7 +2506,7 @@ typedef struct kmp_depend_info { union { kmp_uint8 flag; // flag as an unsigned char struct { // flag as a set of 8 bits -#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) /* Same fields as in the #else branch, but in reverse order */ unsigned all : 1; unsigned unused : 3; @@ -2671,7 +2671,7 @@ typedef struct kmp_task_stack { #endif // BUILD_TIED_TASK_STACK typedef struct kmp_tasking_flags { /* Total struct must be exactly 32 bits */ -#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) /* Same fields as in the #else branch, but in reverse order */ #if OMPX_TASKGRAPH unsigned reserved31 : 6; diff --git a/openmp/runtime/src/kmp_lock.h b/openmp/runtime/src/kmp_lock.h index e2a0cda01a9718..6202f3d617cc59 100644 --- a/openmp/runtime/src/kmp_lock.h +++ b/openmp/runtime/src/kmp_lock.h @@ -120,7 +120,8 @@ extern void __kmp_validate_locks(void); struct kmp_base_tas_lock { // KMP_LOCK_FREE(tas) => unlocked; locked: (gtid+1) of owning thread -#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ && __LP64__ +#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) && \ +__LP64__ // Flip the ordering of the high and low 32-bit member to be consistent // with the memory layout of the address in 64-bit big-endian. kmp_int32 depth_locked; // depth locked, for nested locks only diff --git a/openmp/runtime/test/tasking/bug_nested_proxy_task.c b/openmp/runtime/test/tasking/bug_nested_proxy_task.c index 24fe1f3fe7607c..9e0b412efce609 100644 --- a/openmp/runtime/test/tasking/bug_nested_proxy_task.c +++ b/openmp/runtime/test/tasking/bug_nested_proxy_task.c @@ -50,7 +50,7 @@ typedef struct kmp_depend_info { union { kmp_uint8 flag; // flag as an unsigned char struct { // flag as a set of 8 bits -#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) unsigned all : 1; unsigned unused : 3; unsigned set : 1; diff --git a/openmp/runtime/test/tasking/bug_proxy_task_dep_waiting.c b/openmp/runtime/test/tasking/bug_proxy_task_dep_waiting.c index 688860c035728f..1e86d574f4f6a8 100644 --- a/openmp/runtime/test/tasking/bug_proxy_task_dep_waiting.c +++ b/openmp/runtime/test/tasking/bug_proxy_task_dep_waiting.c @@ -47,7 +47,7 @@ typedef struct kmp_depend_info { union { kmp_uint8 flag; // flag as an unsigned char struct { // flag as a set of 8 bits -#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) unsigned all : 1; unsigned unused : 3; unsigned set : 1; diff --git a/openmp/runtime/test/tasking/hidden_helper_task/common.h b/openmp/runtime/test/tasking/hidden_helper_task/common.h index ba57656cbac41d..68e2b584c87739 100644 --- a/openmp/runtime/test/tasking/hidden_helper_task/common.h +++ b/openmp/runtime/test/tasking/hidden_helper_task/common.h @@ -17,7 +17,7 @@ typedef struct kmp_depend_info { union { unsigned char flag; struct { -#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) unsigned all : 1; unsigned unused : 3; unsigned set : 1; ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [openmp] release/18.x: [OpenMP] fix endianness dependent definitions in OMP headers for MSVC (#84540) (PR #84668)
https://github.com/llvmbot milestoned https://github.com/llvm/llvm-project/pull/84668 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [openmp] release/18.x: [OpenMP] fix endianness dependent definitions in OMP headers for MSVC (#84540) (PR #84668)
llvmbot wrote: @xingxue-ibm What do you think about merging this PR to the release branch? https://github.com/llvm/llvm-project/pull/84668 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-tools-extra] [clangd] Add clangd 18 release notes (PR #84436)
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/84436 >From f3c3e2d29abaf07ec2d84092c29bc01cc7201fda Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Fri, 8 Mar 2024 02:00:08 -0500 Subject: [PATCH] [clangd] [include-cleaner] Add release notes for LLVM 18 --- clang-tools-extra/docs/ReleaseNotes.rst | 43 + 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst index 5758b5acbc0b56..8621444364fb20 100644 --- a/clang-tools-extra/docs/ReleaseNotes.rst +++ b/clang-tools-extra/docs/ReleaseNotes.rst @@ -51,21 +51,35 @@ Improvements to clangd Inlay hints ^^^ -Diagnostics -^^^ - -Semantic Highlighting -^ +- Type hints +* Improved heuristics for showing sugared vs. desguared types +* Some hints which provide no information (e.g. ) are now omitted +- Parameter hints +* Parameter hints are now shown for calls through function pointers +* Parameter hints are now shown for calls to a class's ``operator()`` +* No longer show bogus parameter hints for some builtins like ``__builtin_dump_struct`` Compile flags ^ +- System include extractor (``--query-driver``) improvements +* The directory containing builtin headers is now excluded from extracted system includes +* Various flags which can affect the system includes (``--target``, ``--stdlib``, ``-specs``) are now forwarded to the driver +* Fixed a bug where clangd would sometimes try to call a driver that didn't have obj-c support with ``-x objective-c++-header`` +* The driver path is now dot-normalized before being compared to the ``--query-driver`` pattern +* ``--query-driver`` is now supported by ``clangd-indexer`` +- Fixed a regression in clangd 17 where response files would not be expanded + Hover ^ +- Hover now shows alignment info for fields and records + Code completion ^^^ +- Refined heuristics for determining whether the use of a function can be a call or not + Code actions @@ -75,15 +89,25 @@ Code actions Signature help ^^ +- Improved support for calls through function pointer types + Cross-references +- Improved support for C++20 concepts +- Find-references now works for labels +- Improvements to template heuristics + Objective-C ^^^ Miscellaneous ^ +- Various stability improvements, e.g. crash fixes +- Improved error recovery on invalid code +- Clangd now bails gracefully on assembly and IR source files + Improvements to clang-doc - @@ -564,10 +588,15 @@ Changes in existing checks Removed checks ^^ -Improvements to include-fixer +Improvements to include-cleaner - -The improvements are... +- Support for ``--only-headers`` flag to limit analysis to headers matching a regex +- Recognizes references through ``concept``s +- Builtin headers are not analyzed +- Handling of references through ``friend`` declarations +- Fixes around handling of IWYU pragmas on stdlib headers +- Improved handling around references to/from template specializations Improvements to clang-include-fixer --- ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-tools-extra] [clangd] Add clangd 18 release notes (PR #84436)
@@ -51,21 +51,40 @@ Improvements to clangd Inlay hints ^^^ +- Type hints +* Improved heuristics for showing sugared vs. desguared types +* Some hints which provide no information (e.g. ) are now omitted +- Parameter hints +* Parameter hints are now shown for calls through function pointers +* Parameter hints are now shown for calls to a class's ``operator()`` +* No longer show bogus parameter hints for some builtins like ``__builtin_dump_struct`` + Diagnostics ^^^ -Semantic Highlighting -^ +- Improved quality of include-cleaner diagnostics (missing and unused includes) HighCommander4 wrote: Thanks, I added these in an include-cleaner section https://github.com/llvm/llvm-project/pull/84436 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-tools-extra] [clangd] Add clangd 18 release notes (PR #84436)
HighCommander4 wrote: @kadircet do you know what is the process for getting this approved and merged? As this is targeting the `release/18.x` branch, I do not have permissions to merge it myself like a regular PR. https://github.com/llvm/llvm-project/pull/84436 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits