[clang] Introduce paged vector (PR #66430)

2023-09-28 Thread Richard Smith via cfe-commits
https://github.com/zygoloid unresolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-28 Thread Richard Smith via cfe-commits
https://github.com/zygoloid resolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix a crash from nested ArrayInitLoopExpr (PR #67722)

2023-09-28 Thread Richard Smith via cfe-commits
@@ -10950,6 +10950,9 @@ bool ArrayExprEvaluator::VisitCXXParenListOrInitListExpr( } bool ArrayExprEvaluator::VisitArrayInitLoopExpr(const ArrayInitLoopExpr *E) { + + FullExpressionRAII Scope(Info); + zygoloid wrote: Better testcase, avoiding the use of

[clang] [clang] Fix a crash from nested ArrayInitLoopExpr (PR #67722)

2023-09-28 Thread Richard Smith via cfe-commits
@@ -10950,6 +10950,9 @@ bool ArrayExprEvaluator::VisitCXXParenListOrInitListExpr( } bool ArrayExprEvaluator::VisitArrayInitLoopExpr(const ArrayInitLoopExpr *E) { + + FullExpressionRAII Scope(Info); + zygoloid wrote: Here's a rejects-valid testcase:

[clang] [clang] Fix a crash from nested ArrayInitLoopExpr (PR #67722)

2023-09-28 Thread Richard Smith via cfe-commits
https://github.com/zygoloid requested changes to this pull request. https://github.com/llvm/llvm-project/pull/67722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix a crash from nested ArrayInitLoopExpr (PR #67722)

2023-09-28 Thread Richard Smith via cfe-commits
@@ -10950,6 +10950,9 @@ bool ArrayExprEvaluator::VisitCXXParenListOrInitListExpr( } bool ArrayExprEvaluator::VisitArrayInitLoopExpr(const ArrayInitLoopExpr *E) { + + FullExpressionRAII Scope(Info); + zygoloid wrote: This should be done after we evaluate

[clang] [clang] Fix a crash from nested ArrayInitLoopExpr (PR #67722)

2023-09-28 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/67722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExprConst] Don't create useless temporary variable (PR #67716)

2023-09-28 Thread Richard Smith via cfe-commits
zygoloid wrote: The semantics of `ArrayInitLoopExpr` are to first evaluate (once, up-front) the common expression, and then evaluate the subexpression once for each array element, where the subexpression can make repeated reference to the value of the common expression. With this change, we

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/66894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-27 Thread Richard Smith via cfe-commits
@@ -7304,6 +7382,21 @@ class BufferToAPValueConverter { return ArrayValue; } + std::optional visit(const VectorType *Ty, CharUnits Offset) { +SmallVector Bytes; +if (!Buffer.readObject(Offset, Info.Ctx.getTypeSizeInChars(Ty), Bytes)) + return std::nullopt;

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/66894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-27 Thread Richard Smith via cfe-commits
@@ -2732,6 +2732,92 @@ static bool truncateBitfieldValue(EvalInfo , const Expr *E, return true; } +static bool BitcastAPIntToVector(EvalInfo , const VectorType *VTy, + const llvm::APInt , + SmallVectorImpl ) {

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-27 Thread Richard Smith via cfe-commits
@@ -2732,6 +2732,92 @@ static bool truncateBitfieldValue(EvalInfo , const Expr *E, return true; } +static bool BitcastAPIntToVector(EvalInfo , const VectorType *VTy, + const llvm::APInt , + SmallVectorImpl ) {

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-27 Thread Richard Smith via cfe-commits
@@ -7095,6 +7157,22 @@ class APValueToBufferConverter { return true; } + bool visitVector(const APValue , QualType Ty, CharUnits Offset) { +const VectorType *VTy = Ty->castAs(); + +APInt Bits; +if (!BitcastVectorToAPInt(Info, VTy, Val, Bits)) + return

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-27 Thread Richard Smith via cfe-commits
@@ -2732,6 +2732,92 @@ static bool truncateBitfieldValue(EvalInfo , const Expr *E, return true; } +static bool BitcastAPIntToVector(EvalInfo , const VectorType *VTy, + const llvm::APInt , + SmallVectorImpl ) {

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-27 Thread Richard Smith via cfe-commits
@@ -7304,6 +7382,21 @@ class BufferToAPValueConverter { return ArrayValue; } + std::optional visit(const VectorType *Ty, CharUnits Offset) { +SmallVector Bytes; +if (!Buffer.readObject(Offset, Info.Ctx.getTypeSizeInChars(Ty), Bytes)) + return std::nullopt;

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-27 Thread Richard Smith via cfe-commits
@@ -2732,6 +2732,92 @@ static bool truncateBitfieldValue(EvalInfo , const Expr *E, return true; } +static bool BitcastAPIntToVector(EvalInfo , const VectorType *VTy, + const llvm::APInt , + SmallVectorImpl ) {

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: Thanks, I like the code reuse! There are some minor optimization and simplification opportunities in the code you're reusing that might be worth addressing now. I'm worried that vectors with padding (which I think is only vectors of x86 `long double`)

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/66894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Recommit "Implement [[msvc::no_unique_address]] (#65675)" (PR #67199)

2023-09-27 Thread Richard Smith via cfe-commits
zygoloid wrote: (Please remember to update the commit message to describe the tablegen change when merging.) https://github.com/llvm/llvm-project/pull/67199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Recommit "Implement [[msvc::no_unique_address]] (#65675)" (PR #67199)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid resolved https://github.com/llvm/llvm-project/pull/67199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Recommit "Implement [[msvc::no_unique_address]] (#65675)" (PR #67199)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid approved this pull request. Looks awesome, thanks :) https://github.com/llvm/llvm-project/pull/67199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid resolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid resolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid resolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid resolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid resolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid resolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid resolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid resolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid resolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid unresolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
@@ -0,0 +1,323 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: LLVM generally uses US English, so it'd be good to rename `MaterialisedIterator` and related names to `-ize` instead of `-ise`. https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list

[clang] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
@@ -1625,6 +1625,40 @@ SmallVector has grown a few other minor advantages over std::vector, causing and is no longer "private to the implementation". A name like ``SmallVectorHeader`` might be more appropriate. +.. _dss_pagedvector: + +llvm/ADT/PagedVector.h

[clang] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
@@ -1625,6 +1625,40 @@ SmallVector has grown a few other minor advantages over std::vector, causing and is no longer "private to the implementation". A name like ``SmallVectorHeader`` might be more appropriate. +.. _dss_pagedvector: + +llvm/ADT/PagedVector.h

[clang] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Diagnose problematic uses of constructor/destructor attribute (PR #67360)

2023-09-27 Thread Richard Smith via cfe-commits
@@ -2352,26 +2352,78 @@ static void handleUnusedAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) UnusedAttr(S.Context, AL)); } -static void handleConstructorAttr(Sema , Decl *D, const ParsedAttr ) { - uint32_t priority =

[clang] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
zygoloid wrote: [This comment](https://github.com/llvm/llvm-project/pull/66430#discussion_r1330572021) does not appear to have been addressed. https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
@@ -0,0 +1,322 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid resolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid resolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid resolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid resolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
https://github.com/zygoloid resolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
@@ -0,0 +1,320 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-27 Thread Richard Smith via cfe-commits
@@ -0,0 +1,320 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-26 Thread Richard Smith via cfe-commits
@@ -0,0 +1,320 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-26 Thread Richard Smith via cfe-commits
@@ -0,0 +1,322 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-26 Thread Richard Smith via cfe-commits
@@ -0,0 +1,320 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-26 Thread Richard Smith via cfe-commits
@@ -0,0 +1,322 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-26 Thread Richard Smith via cfe-commits
@@ -0,0 +1,320 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-26 Thread Richard Smith via cfe-commits
@@ -0,0 +1,320 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-26 Thread Richard Smith via cfe-commits
@@ -0,0 +1,320 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-26 Thread Richard Smith via cfe-commits
@@ -0,0 +1,322 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-26 Thread Richard Smith via cfe-commits
@@ -0,0 +1,320 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-26 Thread Richard Smith via cfe-commits
@@ -0,0 +1,320 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-26 Thread Richard Smith via cfe-commits
https://github.com/zygoloid resolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-26 Thread Richard Smith via cfe-commits
https://github.com/zygoloid unresolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Recommit "Implement [[msvc::no_unique_address]] (#65675)" (PR #67199)

2023-09-26 Thread Richard Smith via cfe-commits
@@ -1798,11 +1798,24 @@ def ArmMveStrictPolymorphism : TypeAttr, TargetSpecificAttr { let Documentation = [ArmMveStrictPolymorphismDocs]; } -def NoUniqueAddress : InheritableAttr, TargetSpecificAttr { - let Spellings = [CXX11<"", "no_unique_address", 201803>]; +def

[clang] [Clang] Fix crash when ill-formed code is treated as a deduction guide (PR #67373)

2023-09-25 Thread Richard Smith via cfe-commits
@@ -171,3 +171,12 @@ namespace CtorTemplateBeatsNonTemplateConversionFn { Foo f(Derived d) { return d; } // expected-error {{invokes a deleted function}} Foo g(Derived d) { return Foo(d); } // ok, calls constructor } + +namespace GH65522 { +template +class B3 : A3 { +

[clang] [Clang] Fix crash when ill-formed code is treated as a deduction guide (PR #67373)

2023-09-25 Thread Richard Smith via cfe-commits
@@ -171,3 +171,12 @@ namespace CtorTemplateBeatsNonTemplateConversionFn { Foo f(Derived d) { return d; } // expected-error {{invokes a deleted function}} Foo g(Derived d) { return Foo(d); } // ok, calls constructor } + +namespace GH65522 { +template +class B3 : A3 { +

[clang] 7421dd5 - Don't specify the same flag twice.

2023-09-25 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2023-09-25T16:38:17-07:00 New Revision: 7421dd55a16f18919a568499e4c0888ed3a5e8b5 URL: https://github.com/llvm/llvm-project/commit/7421dd55a16f18919a568499e4c0888ed3a5e8b5 DIFF: https://github.com/llvm/llvm-project/commit/7421dd55a16f18919a568499e4c0888ed3a5e8b5.diff

[clang] 9408500 - Add -fclang-abi-compat=latest to a bunch of tests for manglings that changed since v17.

2023-09-25 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2023-09-25T16:34:38-07:00 New Revision: 940850066290a484144db80f09e6c19709f5fe49 URL: https://github.com/llvm/llvm-project/commit/940850066290a484144db80f09e6c19709f5fe49 DIFF: https://github.com/llvm/llvm-project/commit/940850066290a484144db80f09e6c19709f5fe49.diff

[clang] c743986 - Enter the function parameter mangling scope for a function encoding

2023-09-25 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2023-09-25T16:19:02-07:00 New Revision: c74398649f28ab78c74bacfe82e69224377008e7 URL: https://github.com/llvm/llvm-project/commit/c74398649f28ab78c74bacfe82e69224377008e7 DIFF: https://github.com/llvm/llvm-project/commit/c74398649f28ab78c74bacfe82e69224377008e7.diff

[clang] [Clang] Fix crash when ill-formed code is treated as a deduction guide (PR #67373)

2023-09-25 Thread Richard Smith via cfe-commits
@@ -171,3 +171,12 @@ namespace CtorTemplateBeatsNonTemplateConversionFn { Foo f(Derived d) { return d; } // expected-error {{invokes a deleted function}} Foo g(Derived d) { return Foo(d); } // ok, calls constructor } + +namespace GH65522 { +template +class B3 : A3 { +

[clang] [Clang] Fix crash when ill-formed code is treated as a deduction guide (PR #67373)

2023-09-25 Thread Richard Smith via cfe-commits
@@ -5414,6 +5414,8 @@ def note_constraint_normalization_here : Note< def note_parameter_mapping_substitution_here : Note< "while substituting into concept arguments here; substitution failures not " "allowed in concept arguments">; +def note_building_deduction_guide_here :

[clang] 6876514 - Fix assertion failure mangling an unresolved template argument that

2023-09-24 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2023-09-24T11:52:58-07:00 New Revision: 68765143c6765a694d40d4c3fea43893cc025433 URL: https://github.com/llvm/llvm-project/commit/68765143c6765a694d40d4c3fea43893cc025433 DIFF: https://github.com/llvm/llvm-project/commit/68765143c6765a694d40d4c3fea43893cc025433.diff

[clang] Recommit "Implement [[msvc::no_unique_address]] (#65675)" (PR #67199)

2023-09-22 Thread Richard Smith via cfe-commits
@@ -1798,11 +1798,24 @@ def ArmMveStrictPolymorphism : TypeAttr, TargetSpecificAttr { let Documentation = [ArmMveStrictPolymorphismDocs]; } -def NoUniqueAddress : InheritableAttr, TargetSpecificAttr { - let Spellings = [CXX11<"", "no_unique_address", 201803>]; +def

[clang] aaa79a5 - [release notes] Add forgotten case to list of changed manglings.

2023-09-22 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2023-09-22T17:40:07-07:00 New Revision: aaa79a59317f859485d701d1eb68ac4cb213e1d1 URL: https://github.com/llvm/llvm-project/commit/aaa79a59317f859485d701d1eb68ac4cb213e1d1 DIFF: https://github.com/llvm/llvm-project/commit/aaa79a59317f859485d701d1eb68ac4cb213e1d1.diff

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-22 Thread Richard Smith via cfe-commits
@@ -7095,6 +7096,40 @@ class APValueToBufferConverter { return true; } + bool visitVector(const APValue , QualType Ty, CharUnits Offset) { +const auto *VT = Ty->castAs(); +unsigned VectorLength = Val.getVectorLength(); + +if (VT->isExtVectorBoolType()) { +

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-09-21 Thread Richard Smith via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: zygoloid wrote: > One of the remaining tests fails because `PP->getIdentifierInfo()` ends up > doing external lookup via `ASTReader`, which ends up emitting a diagnostic

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-21 Thread Richard Smith via cfe-commits
@@ -463,3 +463,38 @@ static_assert(bit_cast(ld539) == fivehundredandthirtynine, ""); static_assert(round_trip<__int128_t>(34.0L)); #endif } + +namespace test_vector { + +typedef unsigned uint2 __attribute__((vector_size(2 * sizeof(unsigned; +typedef char byte8

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-21 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/66894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-21 Thread Richard Smith via cfe-commits
@@ -7095,6 +7096,40 @@ class APValueToBufferConverter { return true; } + bool visitVector(const APValue , QualType Ty, CharUnits Offset) { +const auto *VT = Ty->castAs(); +unsigned VectorLength = Val.getVectorLength(); + +if (VT->isExtVectorBoolType()) { +

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-21 Thread Richard Smith via cfe-commits
@@ -7095,6 +7096,40 @@ class APValueToBufferConverter { return true; } + bool visitVector(const APValue , QualType Ty, CharUnits Offset) { +const auto *VT = Ty->castAs(); +unsigned VectorLength = Val.getVectorLength(); + +if (VT->isExtVectorBoolType()) { +

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-21 Thread Richard Smith via cfe-commits
https://github.com/zygoloid resolved https://github.com/llvm/llvm-project/pull/66894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-21 Thread Richard Smith via cfe-commits
@@ -7095,6 +7096,45 @@ class APValueToBufferConverter { return true; } + bool visitVector(const APValue , QualType Ty, CharUnits Offset) { +const auto *VT = Ty->castAs(); +unsigned VectorLength = Val.getVectorLength(); + +if (VT->isExtVectorBoolType()) { +

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-21 Thread Richard Smith via cfe-commits
@@ -7095,6 +7096,40 @@ class APValueToBufferConverter { return true; } + bool visitVector(const APValue , QualType Ty, CharUnits Offset) { +const auto *VT = Ty->castAs(); +unsigned VectorLength = Val.getVectorLength(); + +if (VT->isExtVectorBoolType()) { +

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-21 Thread Richard Smith via cfe-commits
@@ -7095,6 +7096,40 @@ class APValueToBufferConverter { return true; } + bool visitVector(const APValue , QualType Ty, CharUnits Offset) { +const auto *VT = Ty->castAs(); +unsigned VectorLength = Val.getVectorLength(); + +if (VT->isExtVectorBoolType()) { +

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-21 Thread Richard Smith via cfe-commits
https://github.com/zygoloid resolved https://github.com/llvm/llvm-project/pull/66894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c4a3157 - Add mangling for type trait expressions.

2023-09-21 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2023-09-21T12:58:32-07:00 New Revision: c4a3157d6622928b3773695159d8039cdea140e3 URL: https://github.com/llvm/llvm-project/commit/c4a3157d6622928b3773695159d8039cdea140e3 DIFF: https://github.com/llvm/llvm-project/commit/c4a3157d6622928b3773695159d8039cdea140e3.diff

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-20 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: Generally this looks good to me, but doesn't seem to properly handle `__attribute__((ext_vector_type(N))) bool`. https://github.com/llvm/llvm-project/pull/66894 ___ cfe-commits mailing list

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-20 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/66894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-20 Thread Richard Smith via cfe-commits
@@ -7095,6 +7096,21 @@ class APValueToBufferConverter { return true; } + bool visitVector(const APValue , QualType Ty, CharUnits Offset) { +const auto *VT = Ty->castAs(); + +CharUnits ElemWidth = Info.Ctx.getTypeSizeInChars(VT->getElementType()); +unsigned

[clang] [clang][Sema] Stop format size estimator upon %p to adapt to linux kernel's extension (PR #65969)

2023-09-20 Thread Richard Smith via cfe-commits
https://github.com/zygoloid approved this pull request. Thank you! https://github.com/llvm/llvm-project/pull/65969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Stop format size estimator upon %p to adapt to linux kernel's extension (PR #65969)

2023-09-20 Thread Richard Smith via cfe-commits
https://github.com/zygoloid resolved https://github.com/llvm/llvm-project/pull/65969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-09-20 Thread Richard Smith via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -0,0 +1,77 @@ + +#include "clang/Frontend/CodeSnippetHighlighter.h" +#include "clang/Basic/DiagnosticOptions.h" +#include "clang/Basic/SourceManager.h" +#include "clang/Lex/Lexer.h" +#include

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-09-20 Thread Richard Smith via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -1288,11 +1291,33 @@ void TextDiagnostic::emitSnippet(StringRef SourceLine, // Print the source line one character at a time. bool PrintReversed = false; + bool HighlightingEnabled =

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-09-20 Thread Richard Smith via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -0,0 +1,77 @@ + +#include "clang/Frontend/CodeSnippetHighlighter.h" +#include "clang/Basic/DiagnosticOptions.h" +#include "clang/Basic/SourceManager.h" +#include "clang/Lex/Lexer.h" +#include

[clang] Introduce paged vector (PR #66430)

2023-09-19 Thread Richard Smith via cfe-commits
@@ -0,0 +1,322 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-19 Thread Richard Smith via cfe-commits
@@ -0,0 +1,322 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

<    1   2   3   4   5   6   7   8   9   10   >