[clang] [flang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Leandro Lupori (luporl) Changes If DEFAULT_SYSROOT is not specfied when building flang, then the -isysroot flag is needed to link binaries against system libraries on Darwin. It's also needed when linking against a non-default sysroot.

[clang] [flang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-08 Thread Leandro Lupori via cfe-commits
https://github.com/luporl created https://github.com/llvm/llvm-project/pull/77365 If DEFAULT_SYSROOT is not specfied when building flang, then the -isysroot flag is needed to link binaries against system libraries on Darwin. It's also needed when linking against a non-default sysroot. >From

[libcxx] [flang] [lldb] [lld] [clang] [libc] [clang-tools-extra] [compiler-rt] [llvm] [msan] Unwind stack before fatal reports (PR #77168)

2024-01-08 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/77168 >From d4953b7a14dfb1d351b543e2546d710ae30173ed Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Fri, 5 Jan 2024 18:42:43 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-01-08 Thread via cfe-commits
pizzud wrote: A coworker was able to help me get this working by rebasing against upstream, so I think we're good to go at this point. Thanks for all the feedback! https://github.com/llvm/llvm-project/pull/67467 ___ cfe-commits mailing list

[clang] [CMake][PGO] Use check targets to generate profdata for PGO builds (PR #77347)

2024-01-08 Thread Tom Stellard via cfe-commits
tstellar wrote: My goal right now is to make this simple and easy to use. I'm not opposed to making something configurable, but it would be nice to have a default that actually helped improve performance, so that a new user or a distribution maintainer could just use the cache file as is.

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-01-08 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From ab886883db259b7a70fd4c7761e2b4fe2781892b Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH] [clang-tidy] Add bugprone-move-shared-pointer-contents check.

[clang] [clang] Bounds checking on unclosed parentheses, brackets or braces in Expanded Tokens (PR #69849)

2024-01-08 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > I am slightly suspicious of source locations pointing at `eof` in the AST in > the first place, even in invalid code. I wonder if we would be better off > just having an invalid source location there instead of pointing at `eof`. I think in this case it's deliberate.

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna commented: I left some comments. Looking good overall but `LocalDeclMap` doesn't seem to serve the purpose for this PR. And I'm not sure the code block using it would be actually necessary. Please see my inlined review.

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Yeoul Na via cfe-commits
@@ -944,22 +951,262 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction , return nullptr; } +namespace { + +/// \p StructAccessBase returns the base \p Expr of a field access. It returns +/// either a \p DeclRefExpr, representing the base pointer to the struct,

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Yeoul Na via cfe-commits
@@ -944,22 +951,259 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction , return nullptr; } +namespace { + +/// \p StructAccessBase returns the base \p Expr of a field access. It returns +/// either a \p DeclRefExpr, representing the base pointer to the struct,

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Yeoul Na via cfe-commits
@@ -818,6 +819,189 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } +const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberField( +ASTContext , const RecordDecl *RD,

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Yeoul Na via cfe-commits
@@ -818,6 +819,189 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } +const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberField( +ASTContext , const RecordDecl *RD,

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Yeoul Na via cfe-commits
@@ -944,22 +951,259 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction , return nullptr; } +namespace { + +/// \p StructAccessBase returns the base \p Expr of a field access. It returns +/// either a \p DeclRefExpr, representing the base pointer to the struct,

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Yeoul Na via cfe-commits
@@ -944,22 +951,259 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction , return nullptr; } +namespace { + +/// \p StructAccessBase returns the base \p Expr of a field access. It returns +/// either a \p DeclRefExpr, representing the base pointer to the struct,

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Yeoul Na via cfe-commits
@@ -818,6 +819,189 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } +const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberField( +ASTContext , const RecordDecl *RD,

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Yeoul Na via cfe-commits
@@ -1155,15 +1159,14 @@ const FieldDecl *CodeGenFunction::FindCountedByField(const FieldDecl *FD) { return nullptr; auto GetNonAnonStructOrUnion = [](const RecordDecl *RD) { -while (RD && !RD->getDeclName()) - if (const auto *R =

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna edited https://github.com/llvm/llvm-project/pull/76348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-01-08 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 97323d0083f51361158891acffcf708faa443c51 Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH] [clang-tidy] Add bugprone-move-shared-pointer-contents check.

[llvm] [clang] New calling convention preserve_none (PR #76868)

2024-01-08 Thread via cfe-commits
https://github.com/weiguozhi updated https://github.com/llvm/llvm-project/pull/76868 >From 90e14918a0eb13e2187f8548416ac72491d966c1 Mon Sep 17 00:00:00 2001 From: Guozhi Wei Date: Thu, 21 Dec 2023 19:04:44 + Subject: [PATCH 1/2] New calling convention preserve_none The new calling

[compiler-rt] [clang] [llvm] [libcxx] [clang-tools-extra] [libc] [openmp] [flang] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-01-08 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 6d5d35e1273f595e8a0382053d5183cbce7a9d8a Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 1/7] [clang-tidy] Add bugprone-move-shared-pointer-contents

[clang] [ASTMatchers] fix captureVars assertion failure on capturesVariables (PR #76619)

2024-01-08 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Thank you for the fix, can you add more details to your summary. The summary is what usually goes into the git log. We would like those to be as descriptive as possible to avoid having to do extra digging to understand the change at a high level.

[libc] [compiler-rt] [libcxx] [llvm] [flang] [openmp] [clang] [clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-01-08 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 6d5d35e1273f595e8a0382053d5183cbce7a9d8a Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 1/6] [clang-tidy] Add bugprone-move-shared-pointer-contents

[flang] [clang] [flang][Driver] Support -pthread in the frontend (PR #77360)

2024-01-08 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: Thanks, I am not sure how I missed that. @banach-space, Is the intention for the `-pthread` option to be illegal in flang? At the last flang community call

[clang] [flang] [Flang][Driver] Enable gpulibc/nogpulibc options for Flang, which allows linking of GPU LIBC for the fortran and OpenMP runtime (PR #77135)

2024-01-08 Thread via cfe-commits
agozillon wrote: Thank you very much for your time and review @banach-space and @jhuber6 I'll land this tomorrow afternoon (for EU timezones) so that I can more easily babysit the buildbots on the very small chance something goes wrong. https://github.com/llvm/llvm-project/pull/77135

[clang] [clang-format] Handle templated elaborated type specifier in function… (PR #77013)

2024-01-08 Thread via cfe-commits
@@ -3903,6 +3903,15 @@ void UnwrappedLineParser::parseRecord(bool ParseAsExpr) { parseParens(); } + auto IsTemplate = [&] { +FormatToken *Tok = InitialToken.Previous; +while (Tok) { + if (Tok->is(tok::kw_template)) +return true; + Tok =

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Bill Wendling via cfe-commits
@@ -850,6 +1034,13 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E, unsigned Type, } } + if (IsDynamic) { +// Emit special code for a flexible array member with the "counted_by" +// attribute. +if (Value *V = emitFlexibleArrayMemberSize(E, Type,

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Bill Wendling via cfe-commits
@@ -365,6 +365,10 @@ class DefaultFilterCCC final : public CorrectionCandidateCallback { template class DeclFilterCCC final : public CorrectionCandidateCallback { public: + explicit DeclFilterCCC(const IdentifierInfo *Typo = nullptr, +

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Bill Wendling via cfe-commits
@@ -818,6 +819,189 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } +const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberField( +ASTContext , const RecordDecl *RD,

[clang] [flang] [Flang][Driver] Enable gpulibc/nogpulibc options for Flang, which allows linking of GPU LIBC for the fortran and OpenMP runtime (PR #77135)

2024-01-08 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space approved this pull request. LGTM, ta! https://github.com/llvm/llvm-project/pull/77135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang] [HLSL] Vector standard conversions (PR #71098)

2024-01-08 Thread Chris B via cfe-commits
@@ -4763,6 +4763,20 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType, CK_ZeroToOCLOpaqueType, From->getValueKind()).get(); break; + case ICK_HLSL_Vector_Truncation: { +// Note: HLSL vectors are

[flang] [clang] [flang][Driver] Support -pthread in the frontend (PR #77360)

2024-01-08 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: Please review the discussion in https://github.com/llvm/llvm-project/pull/75739 before proceeding. https://github.com/llvm/llvm-project/pull/77360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Fix assertion failure when initializing union with FAM (PR #77298)

2024-01-08 Thread John McCall via cfe-commits
https://github.com/rjmccall approved this pull request. https://github.com/llvm/llvm-project/pull/77298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Support -pthread in the frontend (PR #77360)

2024-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tarun Prabhu (tarunprabhu) Changes The -pthread option is supported by both clang and gfortran. The -pthread option seems to be extensively tested for various platforms by clang. We should be able to piggy-back on those tests since we

[flang] [clang] [flang][Driver] Support -pthread in the frontend (PR #77360)

2024-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver Author: Tarun Prabhu (tarunprabhu) Changes The -pthread option is supported by both clang and gfortran. The -pthread option seems to be extensively tested for various platforms by clang. We should be able to piggy-back on those tests

[flang] [clang] [flang][Driver] Support -pthread in the frontend (PR #77360)

2024-01-08 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu created https://github.com/llvm/llvm-project/pull/77360 The -pthread option is supported by both clang and gfortran. The -pthread option seems to be extensively tested for various platforms by clang. We should be able to piggy-back on those tests since we use

[clang] [CUDA][HIP] warn incompatible redeclare (PR #77359)

2024-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yaxun (Sam) Liu (yxsamliu) Changes nvcc warns about the following code: `void f(); __device__ void f() {}` but clang does not since clang allows device function to overload host function. Users want clang to emit similar warning to help

[clang] [CUDA][HIP] warn incompatible redeclare (PR #77359)

2024-01-08 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu created https://github.com/llvm/llvm-project/pull/77359 nvcc warns about the following code: `void f(); __device__ void f() {}` but clang does not since clang allows device function to overload host function. Users want clang to emit similar warning to help code

[libc] [clang-tools-extra] [openmp] [flang] [compiler-rt] [polly] [llvm] [libcxxabi] [mlir] [clang] [lldb] [libcxx] [OpenMP] Patch for Support to loop bind clause : Checking Parent Region (PR #76938)

2024-01-08 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/76938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Remove `_Private` suffix from framework auto-link hints. (PR #77120)

2024-01-08 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka closed https://github.com/llvm/llvm-project/pull/77120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f4bc70e - [clang][modules] Remove `_Private` suffix from framework auto-link hints. (#77120)

2024-01-08 Thread via cfe-commits
Author: Juergen Ributzka Date: 2024-01-08T11:04:22-08:00 New Revision: f4bc70e886f2eb1b646d84871b93897db749c826 URL: https://github.com/llvm/llvm-project/commit/f4bc70e886f2eb1b646d84871b93897db749c826 DIFF:

[clang] [compiler-rt] [libcxx] [polly] [llvm] [flang] [libcxxabi] [mlir] [lldb] [openmp] [libc] [clang-tools-extra] [OpenMP] Patch for Support to loop bind clause : Checking Parent Region (PR #76938)

2024-01-08 Thread via cfe-commits
https://github.com/SunilKuravinakop updated https://github.com/llvm/llvm-project/pull/76938 >From 1dcd4703002acdde370a285089008e409043717b Mon Sep 17 00:00:00 2001 From: Sunil Kuravinakop Date: Thu, 4 Jan 2024 04:08:28 -0600 Subject: [PATCH 1/4] Changes uploaded to the phabricator on Dec 16th

[clang] [Clang] Wide delimiters ('{{{') for expect strings (PR #77326)

2024-01-08 Thread Erich Keane via cfe-commits
@@ -3458,8 +3461,34 @@ A range can also be specified by ``-``. For example: In this example, the diagnostic may appear only once, if at all. +.. _DiagnosticMatching: + +Matching Modes +~~ + +The default matching mode is simple string, which looks for the

[clang] [clang][modules] Remove `_Private` suffix from framework auto-link hints. (PR #77120)

2024-01-08 Thread Juergen Ributzka via cfe-commits
ributzka wrote: Thanks for the review Jan. https://github.com/llvm/llvm-project/pull/77120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Wide delimiters ('{{{') for expect strings (PR #77326)

2024-01-08 Thread via cfe-commits
@@ -3458,8 +3461,34 @@ A range can also be specified by ``-``. For example: In this example, the diagnostic may appear only once, if at all. +.. _DiagnosticMatching: + +Matching Modes +~~ + +The default matching mode is simple string, which looks for the

[clang] [Clang] Wide delimiters ('{{{') for expect strings (PR #77326)

2024-01-08 Thread Erich Keane via cfe-commits
@@ -157,3 +157,33 @@ unexpected b; // expected-error@33 1-1 {{unknown type}} // what-error {{huh?}} // CHECK9: error: 'what-error' diagnostics expected but not seen: #endif + +#ifdef TEST_WIDE_DELIM +// RUN: not %clang_cc1 -DTEST_WIDE_DELIM -verify %s 2>&1 | FileCheck

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Nick Desaulniers via cfe-commits
@@ -850,6 +1034,13 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E, unsigned Type, } } + if (IsDynamic) { +// Emit special code for a flexible array member with the "counted_by" +// attribute. +if (Value *V = emitFlexibleArrayMemberSize(E, Type,

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Nick Desaulniers via cfe-commits
@@ -818,6 +819,189 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } +const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberField( +ASTContext , const RecordDecl *RD,

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Nick Desaulniers via cfe-commits
@@ -365,6 +365,10 @@ class DefaultFilterCCC final : public CorrectionCandidateCallback { template class DeclFilterCCC final : public CorrectionCandidateCallback { public: + explicit DeclFilterCCC(const IdentifierInfo *Typo = nullptr, +

[clang] [Clang] Wide delimiters ('{{{') for expect strings (PR #77326)

2024-01-08 Thread via cfe-commits
@@ -157,3 +157,33 @@ unexpected b; // expected-error@33 1-1 {{unknown type}} // what-error {{huh?}} // CHECK9: error: 'what-error' diagnostics expected but not seen: #endif + +#ifdef TEST_WIDE_DELIM +// RUN: not %clang_cc1 -DTEST_WIDE_DELIM -verify %s 2>&1 | FileCheck

[clang] [clang][modules] Remove `_Private` suffix from framework auto-link hints. (PR #77120)

2024-01-08 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. https://github.com/llvm/llvm-project/pull/77120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Remove `_Private` suffix from framework auto-link hints. (PR #77120)

2024-01-08 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,25 @@ +// Test that autolink hints for frameworks don't use the private module name. jansvoboda11 wrote: Makes sense, thanks! https://github.com/llvm/llvm-project/pull/77120 ___ cfe-commits mailing list

[clang] [Clang] Wide delimiters ('{{{') for expect strings (PR #77326)

2024-01-08 Thread via cfe-commits
@@ -157,3 +157,33 @@ unexpected b; // expected-error@33 1-1 {{unknown type}} // what-error {{huh?}} // CHECK9: error: 'what-error' diagnostics expected but not seen: #endif + +#ifdef TEST_WIDE_DELIM +// RUN: not %clang_cc1 -DTEST_WIDE_DELIM -verify %s 2>&1 | FileCheck

[clang] [Clang] Wide delimiters ('{{{') for expect strings (PR #77326)

2024-01-08 Thread Erich Keane via cfe-commits
@@ -157,3 +157,33 @@ unexpected b; // expected-error@33 1-1 {{unknown type}} // what-error {{huh?}} // CHECK9: error: 'what-error' diagnostics expected but not seen: #endif + +#ifdef TEST_WIDE_DELIM +// RUN: not %clang_cc1 -DTEST_WIDE_DELIM -verify %s 2>&1 | FileCheck

[clang] [Clang] Wide delimiters ('{{{') for expect strings (PR #77326)

2024-01-08 Thread via cfe-commits
@@ -157,3 +157,33 @@ unexpected b; // expected-error@33 1-1 {{unknown type}} // what-error {{huh?}} // CHECK9: error: 'what-error' diagnostics expected but not seen: #endif + +#ifdef TEST_WIDE_DELIM +// RUN: not %clang_cc1 -DTEST_WIDE_DELIM -verify %s 2>&1 | FileCheck

[clang] [Clang] Wide delimiters ('{{{') for expect strings (PR #77326)

2024-01-08 Thread via cfe-commits
@@ -157,3 +157,33 @@ unexpected b; // expected-error@33 1-1 {{unknown type}} // what-error {{huh?}} // CHECK9: error: 'what-error' diagnostics expected but not seen: #endif + +#ifdef TEST_WIDE_DELIM +// RUN: not %clang_cc1 -DTEST_WIDE_DELIM -verify %s 2>&1 | FileCheck

[clang] [Clang] Wide delimiters ('{{{') for expect strings (PR #77326)

2024-01-08 Thread Erich Keane via cfe-commits
@@ -3458,8 +3461,34 @@ A range can also be specified by ``-``. For example: In this example, the diagnostic may appear only once, if at all. +.. _DiagnosticMatching: + +Matching Modes +~~ + +The default matching mode is simple string, which looks for the

[clang] [Clang] Wide delimiters ('{{{') for expect strings (PR #77326)

2024-01-08 Thread Erich Keane via cfe-commits
@@ -157,3 +157,33 @@ unexpected b; // expected-error@33 1-1 {{unknown type}} // what-error {{huh?}} // CHECK9: error: 'what-error' diagnostics expected but not seen: #endif + +#ifdef TEST_WIDE_DELIM +// RUN: not %clang_cc1 -DTEST_WIDE_DELIM -verify %s 2>&1 | FileCheck

[clang] [clang][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72235)

2024-01-08 Thread Michael Buch via cfe-commits
Michael137 wrote: @dwblaikie merged the fix, let me know if you're still seeing problems https://github.com/llvm/llvm-project/pull/72235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-01-08 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 %s -fsyntax-only -Wextra -verify nickdesaulniers wrote: I would just remove the newly created clang/test/Sema/warn-extra-cast-function-type-strict.c. If you have cases that expose bugs in the implementation, that is

[clang] [CMake][PGO] Use check targets to generate profdata for PGO builds (PR #77347)

2024-01-08 Thread Petr Hosek via cfe-commits
petrhosek wrote: I'd also prefer to make this configurable, we're using our own corpus which in my experiments both produces better results and takes less time than `check-llvm` and `check-clang`. We should also consider updating the documentation since I don't think that `check-llvm` and

[clang] [Clang] Wide delimiters ('{{{') for expect strings (PR #77326)

2024-01-08 Thread via cfe-commits
https://github.com/sethp updated https://github.com/llvm/llvm-project/pull/77326 >From cd0b9aed2d9e53f9b38aaa0f73336acae06bfbee Mon Sep 17 00:00:00 2001 From: Seth Pellegrino Date: Sat, 6 Jan 2024 07:54:31 -0800 Subject: [PATCH 1/3] [Clang] Wide delimiters ('{{{') for expect strings Prior to

[clang] [clang][modules] Remove `_Private` suffix from framework auto-link hints. (PR #77120)

2024-01-08 Thread Jan Svoboda via cfe-commits
@@ -984,7 +984,9 @@ static void inferFrameworkLink(Module *Mod) { assert(!Mod->isSubFramework() && "Can only infer linking for top-level frameworks"); - Mod->LinkLibraries.push_back(Module::LinkLibrary(Mod->Name, + StringRef FrameworkName(Mod->Name); +

[clang] [llvm] [SpecialCaseList] Use glob by default (PR #74809)

2024-01-08 Thread David Blaikie via cfe-commits
dwblaikie wrote: (this sort of example reinforces my concerns expressed earlier that this kind of silent change in behavior is problematic - moreso in the wild, rather than in Google's fairly constrained environment (frequent updates, good test coverage, and good bisection infrastructure, etc

[clang] [CMake][PGO] Use check targets to generate profdata for PGO builds (PR #77347)

2024-01-08 Thread Chris B via cfe-commits
llvm-beanz wrote: Looping in some Apple people. I'm unsure if Apple is still using this infrastructure for generating PGO data. If so this change will impact them. When I wrote this, Apple had some additional test cases that got layered on top of the publicly available tests. It might make

[clang] [CMake][PGO] Use check targets to generate profdata for PGO builds (PR #77347)

2024-01-08 Thread Tom Stellard via cfe-commits
https://github.com/tstellar edited https://github.com/llvm/llvm-project/pull/77347 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMake][PGO] Use check-clang target to generate profdata for PGO builds (PR #77347)

2024-01-08 Thread Tom Stellard via cfe-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/77347 >From 127e2ae83f33843cfb9c5cca314afa2fc9844239 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 6 Jan 2024 07:46:01 + Subject: [PATCH 1/2] [CMake][PGO] Use check-clang target to generate profdata for

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-01-08 Thread Abhin P Jose via cfe-commits
https://github.com/Abhinkop edited https://github.com/llvm/llvm-project/pull/77178 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-01-08 Thread Abhin P Jose via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 %s -fsyntax-only -Wextra -verify Abhinkop wrote: No I was thinking of adding extra runs for both -Wcast-function-type and -Wextra or should the one for -Wcast-function-type be done in a different issue?

[clang] [clang][modules] Remove `_Private` suffix from framework auto-link hints. (PR #77120)

2024-01-08 Thread Juergen Ributzka via cfe-commits
@@ -984,7 +984,9 @@ static void inferFrameworkLink(Module *Mod) { assert(!Mod->isSubFramework() && "Can only infer linking for top-level frameworks"); - Mod->LinkLibraries.push_back(Module::LinkLibrary(Mod->Name, + StringRef FrameworkName(Mod->Name); +

[llvm] [clang] [SPARC] Consume `tune-cpu` directive in the backend (PR #77195)

2024-01-08 Thread Sergei Barannikov via cfe-commits
@@ -45,7 +45,8 @@ class SparcSubtarget : public SparcGenSubtargetInfo { public: SparcSubtarget(const Triple , const std::string , - const std::string , const TargetMachine , bool is64bit); + const std::string , const std::string ,

[clang] [llvm] [SPARC] Consume `tune-cpu` directive in the backend (PR #77195)

2024-01-08 Thread Sergei Barannikov via cfe-commits
https://github.com/s-barannikov approved this pull request. https://github.com/llvm/llvm-project/pull/77195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPARC] Consume `tune-cpu` directive in the backend (PR #77195)

2024-01-08 Thread Sergei Barannikov via cfe-commits
https://github.com/s-barannikov edited https://github.com/llvm/llvm-project/pull/77195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMake][PGO] Use check-clang target to generate profdata for PGO builds (PR #77347)

2024-01-08 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 597086c60959dd5b3c032552e8b42dd1d053f233...127e2ae83f33843cfb9c5cca314afa2fc9844239

[clang] [CMake][PGO] Use check-clang target to generate profdata for PGO builds (PR #77347)

2024-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tom Stellard (tstellar) Changes When doing a multi-stage PGO build of clang, run the check-clang and check-llvm targets using the instrumented clang and use that profile data for building the final stage2 clang. This is what is

[clang] [CMake][PGO] Use check-clang target to generate profdata for PGO builds (PR #77347)

2024-01-08 Thread Tom Stellard via cfe-commits
tstellar wrote: @kwk fyi https://github.com/llvm/llvm-project/pull/77347 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMake][PGO] Use check-clang target to generate profdata for PGO builds (PR #77347)

2024-01-08 Thread Tom Stellard via cfe-commits
https://github.com/tstellar created https://github.com/llvm/llvm-project/pull/77347 When doing a multi-stage PGO build of clang, run the check-clang and check-llvm targets using the instrumented clang and use that profile data for building the final stage2 clang. This is what is recommended

[clang] [CMake][Release] Add option for enabling LTO to cache file (PR #77035)

2024-01-08 Thread Tom Stellard via cfe-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/77035 >From db643899042aea45da93c1738b523f139f307295 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 5 Jan 2024 00:58:58 + Subject: [PATCH] [CMake][Release] Add option for enabling LTO to cache file This

[clang] [llvm] [CMake][Release] Add option for enabling LTO to cache file (PR #77035)

2024-01-08 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 597086c60959dd5b3c032552e8b42dd1d053f233...df8296d418eac2b4db9d955a0aec25c4c1c22a9c

[clang] [clang][modules] Remove `_Private` suffix from framework auto-link hints. (PR #77120)

2024-01-08 Thread Juergen Ributzka via cfe-commits
@@ -0,0 +1,25 @@ +// Test that autolink hints for frameworks don't use the private module name. ributzka wrote: The auto-link hint is supposed to provide a framework name, which is incorrect when you pass the name of the private module. The linker ignores

[clang] [llvm] [CMake][Release] Add option for enabling LTO to cache file (PR #77035)

2024-01-08 Thread Tom Stellard via cfe-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/77035 >From db643899042aea45da93c1738b523f139f307295 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 5 Jan 2024 00:58:58 + Subject: [PATCH 1/3] [CMake][Release] Add option for enabling LTO to cache file

[clang] [Sema] Clean up -Wc++11-narrowing-const-reference code after #76094. NFC (PR #77278)

2024-01-08 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/77278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a146505 - [Sema] Clean up -Wc++11-narrowing-const-reference code after #76094. NFC (#77278)

2024-01-08 Thread via cfe-commits
Author: Fangrui Song Date: 2024-01-08T09:31:57-08:00 New Revision: a14650572c2752c0e08a66ce94c43578abf378f8 URL: https://github.com/llvm/llvm-project/commit/a14650572c2752c0e08a66ce94c43578abf378f8 DIFF: https://github.com/llvm/llvm-project/commit/a14650572c2752c0e08a66ce94c43578abf378f8.diff

[clang] [clang][modules] Remove `_Private` suffix from framework auto-link hints. (PR #77120)

2024-01-08 Thread Jan Svoboda via cfe-commits
@@ -984,7 +984,9 @@ static void inferFrameworkLink(Module *Mod) { assert(!Mod->isSubFramework() && "Can only infer linking for top-level frameworks"); - Mod->LinkLibraries.push_back(Module::LinkLibrary(Mod->Name, + StringRef FrameworkName(Mod->Name); +

[clang] [clang][modules] Remove `_Private` suffix from framework auto-link hints. (PR #77120)

2024-01-08 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,25 @@ +// Test that autolink hints for frameworks don't use the private module name. jansvoboda11 wrote: Why is this desired? What happens if the private module name is provided? https://github.com/llvm/llvm-project/pull/77120

[clang] [llvm] [clang-tools-extra] [LoopVectorize] Refine runtime memory check costs when there is an outer loop (PR #76034)

2024-01-08 Thread David Sherwood via cfe-commits
https://github.com/david-arm updated https://github.com/llvm/llvm-project/pull/76034 >From a4caa47dc8d2db75f6bb2ac3f880da4e1f6bea82 Mon Sep 17 00:00:00 2001 From: David Sherwood Date: Tue, 19 Dec 2023 16:07:33 + Subject: [PATCH 1/6] Add tests showing runtime checks cost with low trip

[clang] [clang][analyzer] Add function 'ungetc' to StreamChecker. (PR #77331)

2024-01-08 Thread via cfe-commits
@@ -916,6 +922,44 @@ void StreamChecker::evalFputx(const FnDescription *Desc, const CallEvent , C.addTransition(StateFailed); } +void StreamChecker::evalUngetc(const FnDescription *Desc, const CallEvent , + CheckerContext ) const { +

[clang] [clang][analyzer] Add function 'ungetc' to StreamChecker. (PR #77331)

2024-01-08 Thread via cfe-commits
https://github.com/NagyDonat approved this pull request. At first glance LGTM. https://github.com/llvm/llvm-project/pull/77331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Add function 'ungetc' to StreamChecker. (PR #77331)

2024-01-08 Thread via cfe-commits
@@ -916,6 +922,44 @@ void StreamChecker::evalFputx(const FnDescription *Desc, const CallEvent , C.addTransition(StateFailed); } +void StreamChecker::evalUngetc(const FnDescription *Desc, const CallEvent , + CheckerContext ) const { +

[clang] [clang][analyzer] Add function 'ungetc' to StreamChecker. (PR #77331)

2024-01-08 Thread via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/77331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Wide delimiters ('{{{') for expect strings (PR #77326)

2024-01-08 Thread via cfe-commits
sethp wrote: Ah, perfect! I'll look into that, thank you! https://github.com/llvm/llvm-project/pull/77326 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Wide delimiters ('{{{') for expect strings (PR #77326)

2024-01-08 Thread via cfe-commits
cor3ntin wrote: actually, we could add tests in `test/Frontend/verify.c`, probably. https://github.com/llvm/llvm-project/pull/77326 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Wide delimiters ('{{{') for expect strings (PR #77326)

2024-01-08 Thread via cfe-commits
sethp wrote: @shafik I can, though I'm not quite sure where: my actual use-case is in a file that [doesn't exist yet](https://github.com/llvm/llvm-project/pull/74852/files#diff-f097ac693293d4002c0f9613238b5eaad14b46e30e8c2c9b1f43d8bdedfb06e1R10-R11). There's already accidentally a couple of

[clang] [libcxx] [lld] [lldb] [compiler-rt] [clang-tools-extra] [openmp] [mlir] [llvm] [flang] [clang] Add `intrin0.h` header to mimic `intrin0.h` used by MSVC STL for clang-cl (PR #75711)

2024-01-08 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > If we land this as-is, it'll tank build time on Windows. I would like some measurements so we can compare build times on Windows. https://github.com/llvm/llvm-project/pull/75711 ___ cfe-commits mailing list

[llvm] [clang] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2024-01-08 Thread via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/67999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]unused using decls only check cpp files (PR #77335)

2024-01-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/77335 >From 832bb78fd8cac372ec5560bb280f11e11be8d2e6 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 9 Jan 2024 00:41:33 +0800 Subject: [PATCH] [clang-tidy]unused using decls only check cpp files ---

[llvm] [clang] [AArch64][PAC] Support ptrauth builtins and -fptrauth-intrinsics. (PR #65996)

2024-01-08 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 f9aba820eb6478a617145eb690ba8b06490d7ac5 c4e7c86eb967b4313e19587e33fdc6b50c8cd6a7 --

[llvm] [clang] [AArch64][PAC] Support ptrauth builtins and -fptrauth-intrinsics. (PR #65996)

2024-01-08 Thread Ahmed Bougacha via cfe-commits
https://github.com/ahmedbougacha updated https://github.com/llvm/llvm-project/pull/65996 >From c4e7c86eb967b4313e19587e33fdc6b50c8cd6a7 Mon Sep 17 00:00:00 2001 From: Ahmed Bougacha Date: Wed, 16 Aug 2023 09:17:12 -0700 Subject: [PATCH] [AArch64][PAC] Support and document ptrauth builtins and

[clang] [clang-format] Handle templated elaborated type specifier in function… (PR #77013)

2024-01-08 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. https://github.com/llvm/llvm-project/pull/77013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle templated elaborated type specifier in function… (PR #77013)

2024-01-08 Thread Emilia Kond via cfe-commits
https://github.com/rymiel edited https://github.com/llvm/llvm-project/pull/77013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle templated elaborated type specifier in function… (PR #77013)

2024-01-08 Thread Emilia Kond via cfe-commits
@@ -3903,6 +3903,15 @@ void UnwrappedLineParser::parseRecord(bool ParseAsExpr) { parseParens(); } + auto IsTemplate = [&] { +FormatToken *Tok = InitialToken.Previous; +while (Tok) { + if (Tok->is(tok::kw_template)) +return true; + Tok =

<    1   2   3   4   5   >