[clang] [analyzer] Fix uninitialized base class with initializer list when ctor is not declared in the base class (#70464) (PR #70792)

2023-10-31 Thread Balazs Benics via cfe-commits
@@ -1222,6 +1222,15 @@ void ExprEngine::ProcessInitializer(const CFGInitializer CFGInit, PostInitializer PP(BMI, FieldLoc.getAsRegion(), stackFrame); evalBind(Tmp, Init, Pred, FieldLoc, InitVal, /*isInit=*/true, &PP); } + } else if (BMI->isBaseInitializer() &&

[clang] [analyzer] Fix uninitialized base class with initializer list when ctor is not declared in the base class (#70464) (PR #70792)

2023-10-31 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,69 @@ +// Refer issue 70464 for more details. +// +// When the base class does not have a declared constructor, the base +// initializer in the constructor of the derived class should use the given +// initializer list to finish the initialization of the base class. +//

[clang] [analyzer] Fix uninitialized base class with initializer list when ctor is not declared in the base class (#70464) (PR #70792)

2023-10-31 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,69 @@ +// Refer issue 70464 for more details. +// +// When the base class does not have a declared constructor, the base +// initializer in the constructor of the derived class should use the given +// initializer list to finish the initialization of the base class. +//

[clang] [analyzer] Fix uninitialized base class with initializer list when ctor is not declared in the base class (#70464) (PR #70792)

2023-10-31 Thread Balazs Benics via cfe-commits
@@ -1222,6 +1222,15 @@ void ExprEngine::ProcessInitializer(const CFGInitializer CFGInit, PostInitializer PP(BMI, FieldLoc.getAsRegion(), stackFrame); evalBind(Tmp, Init, Pred, FieldLoc, InitVal, /*isInit=*/true, &PP); } + } else if (BMI->isBaseInitializer() &&

[clang] [analyzer] Fix uninitialized base class with initializer list when ctor is not declared in the base class (#70464) (PR #70792)

2023-10-31 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,69 @@ +// Refer issue 70464 for more details. +// +// When the base class does not have a declared constructor, the base +// initializer in the constructor of the derived class should use the given +// initializer list to finish the initialization of the base class. +//

[clang] [analyzer] Fix uninitialized base class with initializer list when ctor is not declared in the base class (#70464) (PR #70792)

2023-10-31 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,69 @@ +// Refer issue 70464 for more details. steakhal wrote: Feel free to put a full link if you want. https://github.com/llvm/llvm-project/pull/70792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer] Fix uninitialized base class with initializer list when ctor is not declared in the base class (#70464) (PR #70792)

2023-10-31 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,69 @@ +// Refer issue 70464 for more details. +// +// When the base class does not have a declared constructor, the base +// initializer in the constructor of the derived class should use the given +// initializer list to finish the initialization of the base class. +//

[clang] [StackProtector] Do not emit the stack protector on GPU architectures (PR #70799)

2023-10-31 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 562ce8bbd23d96ee64992bcda041bf67e7c51057 c1c5174d9a9bb82ba42de0aabd0a3e129cc87aa5 --

[clang-tools-extra] [Clangd] Sanitize path before recording into IncludeStructure during buildPreamble (PR #70798)

2023-10-31 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 562ce8bbd23d96ee64992bcda041bf67e7c51057 65c1b38c4eb83469794e53328caed492e956a728 --

[clang-tools-extra] [Clangd] Sanitize path before recording into IncludeStructure during buildPreamble (PR #70798)

2023-10-31 Thread via cfe-commits
https://github.com/Maddobun updated https://github.com/llvm/llvm-project/pull/70798 >From f2dd9b98a6dab3bf6c1cc06df8262313d62ecbe0 Mon Sep 17 00:00:00 2001 From: Leo Zhu Date: Tue, 31 Oct 2023 09:27:47 -0400 Subject: [PATCH] Sanitize path before recording into IncludeStructure addresses https:

[clang-tools-extra] Apply format only if --format is specified (PR #70801)

2023-10-31 Thread via cfe-commits
https://github.com/kuganv created https://github.com/llvm/llvm-project/pull/70801 clang-apply-replacements is now applying format even when --format is not specified. Methods like createReplacementsForHeaders only takes the Spec.Style and would re-order the headers even when it was not reques

[clang-tools-extra] [clang-apply-replacements] Apply format only if --format is specified (PR #70801)

2023-10-31 Thread via cfe-commits
https://github.com/kuganv edited https://github.com/llvm/llvm-project/pull/70801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Update CallDescription of 'tmpfile' & 'fopen' in StreamChecker (PR #70540)

2023-10-31 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/70540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Update CallDescription of 'tmpfile' & 'fopen' in StreamChecker (PR #70540)

2023-10-31 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_analyze_cc1 -fno-builtin -analyzer-checker=core,alpha.unix.Stream -verify %s +// expected-no-diagnostics + +typedef struct _FILE FILE; + +// These functions are not standard C library functions. +FILE *tmpfile(const char *restrict path); +FILE *fo

[clang] [clang][analyzer] Update CallDescription of 'tmpfile' & 'fopen' in StreamChecker (PR #70540)

2023-10-31 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. Still looks good to me. I recommended a couple comments here and there to clarify the intent of the test, and to raise awareness. I'd suggest to reword the PR title (and the commit title ofc) to something like `[analyzer] Restr

[clang] [clang][analyzer] Update CallDescription of 'tmpfile' & 'fopen' in StreamChecker (PR #70540)

2023-10-31 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_analyze_cc1 -fno-builtin -analyzer-checker=core,alpha.unix.Stream -verify %s +// expected-no-diagnostics + +typedef struct _FILE FILE; + +// These functions are not standard C library functions. +FILE *tmpfile(const char *restrict path); +FILE *fo

[PATCH] D151730: [RISCV] Support target attribute for function

2023-10-31 Thread Piyou Chen via Phabricator via cfe-commits
BeMg updated this revision to Diff 557943. BeMg added a comment. Herald added a reviewer: aaron.ballman. Align with spec 1. duplicate target attribute will cause compilation fail Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151730/new/ https://re

[clang] 913a1d5 - [NFC][tests] Fix target OS check for module test

2023-10-31 Thread via cfe-commits
Author: Jake Egan Date: 2023-10-31T09:38:45-04:00 New Revision: 913a1d5a5a1ba6e85144b21cde82a27a9c7e1a70 URL: https://github.com/llvm/llvm-project/commit/913a1d5a5a1ba6e85144b21cde82a27a9c7e1a70 DIFF: https://github.com/llvm/llvm-project/commit/913a1d5a5a1ba6e85144b21cde82a27a9c7e1a70.diff LOG

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-10-31 Thread Felix via cfe-commits
@@ -846,6 +859,19 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) { return MCSymbolRefExpr::VariantKind::VK_PPC_AIX_TLSGDM; if (MO.getTargetFlags() & PPCII::MO_TLSGD_FLAG) return MCSymbolRefExpr::VariantKind::VK_PPC_AIX_TLSGD; +if (MO.getTarg

[clang] [analyzer] Improve reports from ArrayBoundCheckerV2 (PR #70056)

2023-10-31 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -174,9 +176,119 @@ compareValueToThreshold(ProgramStateRef State, NonLoc Value, NonLoc Threshold, return {nullptr, nullptr}; } -void ArrayBoundCheckerV2::checkLocation(SVal location, bool isLoad, -

[clang] [analyzer] Improve reports from ArrayBoundCheckerV2 (PR #70056)

2023-10-31 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/70056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Improve reports from ArrayBoundCheckerV2 (PR #70056)

2023-10-31 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -174,9 +176,119 @@ compareValueToThreshold(ProgramStateRef State, NonLoc Value, NonLoc Threshold, return {nullptr, nullptr}; } -void ArrayBoundCheckerV2::checkLocation(SVal location, bool isLoad, -

[clang] [analyzer] Improve reports from ArrayBoundCheckerV2 (PR #70056)

2023-10-31 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal requested changes to this pull request. Looks good. I only have minor remarks. Consider renaming the PR `Improve reports` -> `Improve messages`, or `diagnostics`, to highlight that the "messages" aspect is improved, n

[clang] [analyzer] Improve reports from ArrayBoundCheckerV2 (PR #70056)

2023-10-31 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -174,9 +176,119 @@ compareValueToThreshold(ProgramStateRef State, NonLoc Value, NonLoc Threshold, return {nullptr, nullptr}; } -void ArrayBoundCheckerV2::checkLocation(SVal location, bool isLoad, -

[clang] [analyzer] Improve reports from ArrayBoundCheckerV2 (PR #70056)

2023-10-31 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -174,9 +176,119 @@ compareValueToThreshold(ProgramStateRef State, NonLoc Value, NonLoc Threshold, return {nullptr, nullptr}; } -void ArrayBoundCheckerV2::checkLocation(SVal location, bool isLoad, -

[clang] [AMDGPU] Accept/Ignore any -mcmodel arguments. (PR #70760)

2023-10-31 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: Needs test https://github.com/llvm/llvm-project/pull/70760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][Clang] Refactor code to emit SVE & SME builtins (PR #70662)

2023-10-31 Thread Kerry McLaughlin via cfe-commits
@@ -9893,24 +9888,40 @@ Value *CodeGenFunction::FormSVEBuiltinResult(Value *Call) { return Call; } -Value *CodeGenFunction::EmitAArch64SVEBuiltinExpr(unsigned BuiltinID, - const CallExpr *E) { +void CodeGenFunction::GetAArch6

[clang] [AArch64][Clang] Refactor code to emit SVE & SME builtins (PR #70662)

2023-10-31 Thread Kerry McLaughlin via cfe-commits
@@ -9893,24 +9888,40 @@ Value *CodeGenFunction::FormSVEBuiltinResult(Value *Call) { return Call; } -Value *CodeGenFunction::EmitAArch64SVEBuiltinExpr(unsigned BuiltinID, - const CallExpr *E) { +void CodeGenFunction::GetAArch6

[clang] [StackProtector] Do not emit the stack protector on GPU architectures (PR #70799)

2023-10-31 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. I think the changes make sense. https://github.com/llvm/llvm-project/pull/70799 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Improve reports from ArrayBoundCheckerV2 (PR #70056)

2023-10-31 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/DonatNagyE updated https://github.com/llvm/llvm-project/pull/70056 >From 77143e74edda6177248bebdf0424db915aa68a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Mon, 2 Oct 2023 13:

[clang] [clang] Use new interpreter in EvaluateAsConstantExpr if requested (PR #70763)

2023-10-31 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I don't have a good idea how a release note could be phrased here, but if you could try one, it would be appreciated and I think it is worth doing. Side note: it would be really cool if at the end of the release cycle, you did a section in the release-n

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

2023-10-31 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

[llvm] [compiler-rt] [clang] [Profile] Refactor profile correlation. (PR #70712)

2023-10-31 Thread Zequan Wu via cfe-commits
ZequanWu wrote: I think it's fine to land as this is already reviewed & approved at https://github.com/llvm/llvm-project/pull/69656 https://github.com/llvm/llvm-project/pull/70712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[llvm] [compiler-rt] [clang] [Profile] Refactor profile correlation. (PR #70712)

2023-10-31 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu closed https://github.com/llvm/llvm-project/pull/70712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4b383d0 - [Profile] Refactor profile correlation. (#70712)

2023-10-31 Thread via cfe-commits
Author: Zequan Wu Date: 2023-10-31T10:41:01-04:00 New Revision: 4b383d0af93136b80841fc140da0823dfc441dd4 URL: https://github.com/llvm/llvm-project/commit/4b383d0af93136b80841fc140da0823dfc441dd4 DIFF: https://github.com/llvm/llvm-project/commit/4b383d0af93136b80841fc140da0823dfc441dd4.diff LOG

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-31 Thread Yeoul Na via cfe-commits
rapidsna wrote: > The other experimental flags I see start with experimental, this one ends > with it. Why isn't this called `-fexerimental-bounds-safety`? Oh, I can see most of them start with `-fexperimental`, not everything though. I can fix this. Is there a formal convention? https://gith

[llvm] [clang-tools-extra] [clang] [clang][driver] Fix an issue where clang does not correctly resolve the system header if invoked via symlink (on MacOS) (PR #68091)

2023-10-31 Thread Liviu Ionescu via cfe-commits
https://github.com/ilg-ul updated https://github.com/llvm/llvm-project/pull/68091 >From f3812174546270051c4a2903b9a99408bf5b7ba0 Mon Sep 17 00:00:00 2001 From: Liviu Ionescu Date: Tue, 3 Oct 2023 14:07:48 +0300 Subject: [PATCH 1/6] [clang][driver] Use platform specific calls to get the executa

[clang] [clang] Change representation of CurLexerKind (PR #70381)

2023-10-31 Thread Aaron Ballman via cfe-commits
@@ -817,7 +817,7 @@ For later versions of Visual Studio, no setup is required--> {IncludeMacroStack._Mypair._Myval2._Mylast - 1,na} {CurLexer._Mypair._Myval2,na} Expanding Macro: {CurTokenLexer._Mypair._Myval2,na} - AaronBallman wrote: Yeah,

[clang] [clang] Change representation of CurLexerKind (PR #70381)

2023-10-31 Thread Aaron Ballman via cfe-commits
@@ -767,7 +762,7 @@ class Preprocessor { /// \#included, and macros currently being expanded from, not counting /// CurLexer/CurTokenLexer. struct IncludeStackInfo { -enum CurLexerKind CurLexerKind; +LexerCallback CurLexerCallback; Aaron

[clang] [analyzer] Improve reports from ArrayBoundCheckerV2 (PR #70056)

2023-10-31 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -174,9 +176,119 @@ compareValueToThreshold(ProgramStateRef State, NonLoc Value, NonLoc Threshold, return {nullptr, nullptr}; } -void ArrayBoundCheckerV2::checkLocation(SVal location, bool isLoad,

[llvm] [clang] [clang-tools-extra] [clang][driver] Fix an issue where clang does not correctly resolve the system header if invoked via symlink (on MacOS) (PR #68091)

2023-10-31 Thread Liviu Ionescu via cfe-commits
https://github.com/ilg-ul closed https://github.com/llvm/llvm-project/pull/68091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [clang-tools-extra] [clang] [llvm] [libc++] Fix complexity guarantee in ranges::clamp (PR #68413)

2023-10-31 Thread Louis Dionne via cfe-commits
@@ -37,9 +37,10 @@ struct __fn { _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))), ldionne wrote: @var-const I think we have an interesting case here. This assertion causes the complexity guar

[clang] [analyzer] Improve reports from ArrayBoundCheckerV2 (PR #70056)

2023-10-31 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -174,9 +176,119 @@ compareValueToThreshold(ProgramStateRef State, NonLoc Value, NonLoc Threshold, return {nullptr, nullptr}; } -void ArrayBoundCheckerV2::checkLocation(SVal location, bool isLoad,

[compiler-rt] [clang] [llvm] [Profile] Refactor profile correlation. (PR #70712)

2023-10-31 Thread Zequan Wu via cfe-commits
ZequanWu wrote: Reverted at db7a1ed9a22fadacfa651e88d0f75f365d44af9a. The [build](https://lab.llvm.org/buildbot/#/builders/139/builds/52535/steps/6/logs/stdio) shows bunch linking failures, but I can build those failed targets locally. https://github.com/llvm/llvm-project/pull/70712 _

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread via cfe-commits
@@ -3553,6 +3553,49 @@ static unsigned getPackIndexForParam(Sema &S, llvm_unreachable("parameter index would not be produced from template"); } +// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl` +// we try to instantiate and update its explicit specifie

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -3553,6 +3553,49 @@ static unsigned getPackIndexForParam(Sema &S, llvm_unreachable("parameter index would not be produced from template"); } +// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl` +// we try to instantiate and update its explicit specifie

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -3553,6 +3553,49 @@ static unsigned getPackIndexForParam(Sema &S, llvm_unreachable("parameter index would not be produced from template"); } +// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl` +// we try to instantiate and update its explicit specifie

[llvm] [clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-31 Thread Aaron Ballman via cfe-commits
@@ -49,7 +49,7 @@ struct ExprDependenceScope { using ExprDependence = ExprDependenceScope::ExprDependence; struct TypeDependenceScope { - enum TypeDependence : uint8_t { + enum TypeDependence : unsigned { AaronBallman wrote: Now that we're reviewing https:/

[clang] 49fd28d - [clang][NFC] Refactor `ArrayType::ArraySizeModifier`

2023-10-31 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-10-31T18:06:34+03:00 New Revision: 49fd28d9601dde429436655ec74234e895c60b89 URL: https://github.com/llvm/llvm-project/commit/49fd28d9601dde429436655ec74234e895c60b89 DIFF: https://github.com/llvm/llvm-project/commit/49fd28d9601dde429436655ec74234e895c60b89.

[llvm] [clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-31 Thread Vlad Serebrennikov via cfe-commits
@@ -49,7 +49,7 @@ struct ExprDependenceScope { using ExprDependence = ExprDependenceScope::ExprDependence; struct TypeDependenceScope { - enum TypeDependence : uint8_t { + enum TypeDependence : unsigned { Endilll wrote: Yeah, I'm putting this on hold for a

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

2023-10-31 Thread via cfe-commits
@@ -4016,7 +4016,63 @@ Clang expects the GCC executable "gcc.exe" compiled for AIX ^^^ +TOC Data Transformation +""" +TOC data transformation is off by default (``-mno-tocdata``). +When ``-mtocdata`` is specified, the TOC data transformation will be applied

[clang] [clang][driver] Add \/../include/c++/v1 to include path on Darwin (PR #70817)

2023-10-31 Thread Liviu Ionescu via cfe-commits
https://github.com/ilg-ul created https://github.com/llvm/llvm-project/pull/70817 On macOS, when clang is invoked via a symlink, since the InstalledDir is where the link is located, the C++ headers are not identified and the default system headers are used. ```console % ln -s /Users/ilg/Libr

[clang] [clang][driver] Add \/../include/c++/v1 to include path on Darwin (PR #70817)

2023-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Liviu Ionescu (ilg-ul) Changes On macOS, when clang is invoked via a symlink, since the InstalledDir is where the link is located, the C++ headers are not identified and the default system headers are used. ```console % ln -s /Use

[clang] [lldb] [clang][DebugInfo] Emit global variable definitions for static data members with constant initializers (PR #70639)

2023-10-31 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/70639 >From 18db082fc5008283f77cc98d9c733a47c63b7096 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 27 Oct 2023 16:19:47 +0100 Subject: [PATCH 1/4] [clang][DebugInfo] Emit global variable definitions for st

[llvm] [clang] [clang-tools-extra] [llvm-objcopy] Add --gap-fill and --pad-to options (PR #65815)

2023-10-31 Thread via cfe-commits
https://github.com/quic-akaryaki updated https://github.com/llvm/llvm-project/pull/65815 >From 21ba98fbed6ef3b9bbbef96feb6dfeb0679f7ce8 Mon Sep 17 00:00:00 2001 From: Alexey Karyakin Date: Tue, 5 Sep 2023 15:46:34 -0700 Subject: [PATCH 1/6] [llvm-objcopy] Add --gap-fill and --pad-to options `-

[clang] [clang-scan-deps] [P1689] Keep consistent behavior for make dependencies with clang (PR #69551)

2023-10-31 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/69551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang-tools-extra] [llvm-objcopy] Add --gap-fill and --pad-to options (PR #65815)

2023-10-31 Thread via cfe-commits
@@ -2636,30 +2636,30 @@ template Error ELFWriter::finalize() { } Error BinaryWriter::write() { - SmallVector LoadableSections; + SmallVector BitsSections; quic-akaryaki wrote: Done. https://github.com/llvm/llvm-project/pull/65815

[llvm] [clang-tools-extra] [clang] [llvm-objcopy] Add --gap-fill and --pad-to options (PR #65815)

2023-10-31 Thread via cfe-commits
@@ -67,12 +67,18 @@ using namespace llvm::object; // The name this program was invoked as. static StringRef ToolName; -static ErrorSuccess reportWarning(Error E) { +namespace llvm { +namespace objcopy { + +ErrorSuccess reportWarning(Error E) { quic-akaryaki wr

[llvm] [clang] [clang-tools-extra] [llvm-objcopy] Add --gap-fill and --pad-to options (PR #65815)

2023-10-31 Thread via cfe-commits
@@ -163,8 +163,8 @@ Sections: EntSize: 0x0001 Content: 4743433A -## In this test, output sections are defined out of in respect to their load -## addresses. Verify that gaps are still correctly filled. +## In this test, output sections are defined out o

[clang-tools-extra] f5f4c5b - [clang][NFC] Follow up to ArraySizeModifier refactoring

2023-10-31 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-10-31T18:21:36+03:00 New Revision: f5f4c5b313fc809b9b1b9d600d0ec3cec0d12941 URL: https://github.com/llvm/llvm-project/commit/f5f4c5b313fc809b9b1b9d600d0ec3cec0d12941 DIFF: https://github.com/llvm/llvm-project/commit/f5f4c5b313fc809b9b1b9d600d0ec3cec0d12941.

[clang] [Clang][RISCV] Add vcreate intrinsics for RVV non-tuple types (PR #70355)

2023-10-31 Thread Yueh-Ting Chen via cfe-commits
https://github.com/eopXD closed https://github.com/llvm/llvm-project/pull/70355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [clang] [llvm] [Profile] Refactor profile correlation. (PR #70712)

2023-10-31 Thread Zequan Wu via cfe-commits
ZequanWu wrote: I can repro the linking failures when using the same cmake invocation. Here is the full command: ``` $ /usr/bin/c++ -std=c++11 -Wno-documentation-deprecated-sync -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wn

[clang] [clang][driver] Add \/../include/c++/v1 to include path on Darwin (PR #70817)

2023-10-31 Thread Liviu Ionescu via cfe-commits
ilg-ul wrote: @Endilll, @AaronBallman, @bjope, @mstorsjo, this is a cleanup of a previous PR (#68091) where you contributed. Could you take a second look? https://github.com/llvm/llvm-project/pull/70817 ___ cfe-commits mailing list cfe-commits@lists.

[llvm] [clang] [clang-tools-extra] Improve selection of conditional branch on amdgcn.ballot!=0 condition in SelectionDAG. (PR #68714)

2023-10-31 Thread Valery Pykhtin via cfe-commits
@@ -396,3 +396,115 @@ true: false: ret i32 33 } + +declare i32 @llvm.amdgcn.icmp.i32(i1, i1, i32) + +define amdgpu_cs i32 @branch_divergent_simulated_negated_ballot_ne_zero_and(i32 %v1, i32 %v2) { +; CHECK-LABEL: branch_divergent_simulated_negated_ballot_ne_zero_and: +; CHEC

[clang] b099709 - [StackProtector] Do not emit the stack protector on GPU architectures (#70799)

2023-10-31 Thread via cfe-commits
Author: Joseph Huber Date: 2023-10-31T10:41:59-05:00 New Revision: b0997097355b3578c8061373899770928096f36b URL: https://github.com/llvm/llvm-project/commit/b0997097355b3578c8061373899770928096f36b DIFF: https://github.com/llvm/llvm-project/commit/b0997097355b3578c8061373899770928096f36b.diff

[clang] [StackProtector] Do not emit the stack protector on GPU architectures (PR #70799)

2023-10-31 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/70799 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Warn on deprecated specializations used in system headers. (PR #70353)

2023-10-31 Thread Louis Dionne via cfe-commits
ldionne wrote: @cor3ntin This is really nice, thanks for the patch! The CI should pass if you merge `main` into your branch -- you were the victim of a temporary CI issue that has been fixed since then. https://github.com/llvm/llvm-project/pull/70353 ___

[clang] [CGExprConstant] stop calling into ConstExprEmitter for Reference type destinations (PR #70366)

2023-10-31 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: > Might be good to backport this to 17.x, given the regression was introduced > on the 17 branch after 17.0.0 https://github.com/llvm/llvm-project-release-prs/pull/765 https://github.com/llvm/llvm-project/pull/70366 ___ cfe-com

[llvm] [clang] [clang-tools-extra] Improve selection of conditional branch on amdgcn.ballot!=0 condition in SelectionDAG. (PR #68714)

2023-10-31 Thread Valery Pykhtin via cfe-commits
vpykhtin wrote: With the latest commit I added a guard to skip _ballot.i64_ in wave32 mode because it's lowered with _i64 AMDGPUISD::SETCC_ - this should be fixed with i32 result similar to ICMP/FCMP intrinsics. After a fix that follows this PR I'm going to turn the guard into assert - TODO is

[clang] [clang] Remove diagnostic that came with `[[clang::preferred_type]]` (PR #70632)

2023-10-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. Because we're on the fence about whether this has value and we're getting early feedback about diagnostic chattiness and we lack adequate test coverage for the changes, I think it's reasonable to back this out for now. It might make m

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread via cfe-commits
https://github.com/LYP951018 updated https://github.com/llvm/llvm-project/pull/70548 From a5929ddc33057416cee75d91f13a1252f4357524 Mon Sep 17 00:00:00 2001 From: letrec Date: Sat, 28 Oct 2023 18:05:36 +0800 Subject: [PATCH 1/4] Defer the instantiation of explicit-specifier after constraint che

[clang] e107c94 - [clang-scan-deps] [P1689] Keep consistent behavior for make dependencies with clang (#69551)

2023-10-31 Thread via cfe-commits
Author: Chuanqi Xu Date: 2023-10-31T23:59:47+08:00 New Revision: e107c9468b9c734fba016166fccc82a7e2b6527b URL: https://github.com/llvm/llvm-project/commit/e107c9468b9c734fba016166fccc82a7e2b6527b DIFF: https://github.com/llvm/llvm-project/commit/e107c9468b9c734fba016166fccc82a7e2b6527b.diff LO

[clang] [clang-scan-deps] [P1689] Keep consistent behavior for make dependencies with clang (PR #69551)

2023-10-31 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/69551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread via cfe-commits
@@ -3553,6 +3553,49 @@ static unsigned getPackIndexForParam(Sema &S, llvm_unreachable("parameter index would not be produced from template"); } +// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl` +// we try to instantiate and update its explicit specifie

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread via cfe-commits
https://github.com/LYP951018 edited https://github.com/llvm/llvm-project/pull/70548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread via cfe-commits
https://github.com/LYP951018 updated https://github.com/llvm/llvm-project/pull/70548 From a5929ddc33057416cee75d91f13a1252f4357524 Mon Sep 17 00:00:00 2001 From: letrec Date: Sat, 28 Oct 2023 18:05:36 +0800 Subject: [PATCH 1/4] Defer the instantiation of explicit-specifier after constraint che

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-31 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,11 @@ +// RUN: %clang -c %s -### 2>&1 | FileCheck -check-prefix T0 %s nickdesaulniers wrote: I would have expected a test like this to be added to clang/test/Driver/clang_f_opts.c --- why are the new tests in clang/test/BoundsSafety/ rather than the

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-31 Thread Nick Desaulniers via cfe-commits
@@ -330,6 +330,14 @@ def warn_alias_with_section : Warning< "as the %select{aliasee|resolver}2">, InGroup; +let CategoryName = "Bounds Safety Issue" in { +def err_bounds_safety_lang_not_supported : Error< + "bounds safety is only supported for C">; +def warn_bounds_safety

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-31 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: not %clang -fbounds-safety-experimental -x c++ %s 2>&1 | FileCheck -check-prefix ERR %s + +// RUN: not %clang -fbounds-safety-experimental -x objective-c %s 2>&1 | FileCheck -check-prefix ERR %s + +// RUN: not %clang -fbounds-safety-experimental -x obje

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-31 Thread Nick Desaulniers via cfe-commits
@@ -3618,6 +3618,30 @@ void CompilerInvocationBase::GenerateLangArgs(const LangOptions &Opts, GenerateArg(Consumer, OPT_frandomize_layout_seed_EQ, Opts.RandstructSeed); } +static void CheckBoundsSafetyLang(InputKind IK, DiagnosticsEngine &Diags) { + // Currently, bounds

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 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 39b939555f959b93061b3c4c8fffc13a63737074 991212294aefaff304610213baaee927634a6c55 --

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread via cfe-commits
https://github.com/LYP951018 updated https://github.com/llvm/llvm-project/pull/70548 From a5929ddc33057416cee75d91f13a1252f4357524 Mon Sep 17 00:00:00 2001 From: letrec Date: Sat, 28 Oct 2023 18:05:36 +0800 Subject: [PATCH 1/4] Defer the instantiation of explicit-specifier after constraint che

[clang] [analyzer] Fix uninitialized base class with initializer list when ctor is not declared in the base class (#70464) (PR #70792)

2023-10-31 Thread Ella Ma via cfe-commits
https://github.com/Snape3058 updated https://github.com/llvm/llvm-project/pull/70792 >From fa7f1d1a862d584d42e9f4a44660f6f61501b150 Mon Sep 17 00:00:00 2001 From: Ella Ma Date: Tue, 31 Oct 2023 18:41:14 +0800 Subject: [PATCH] [analyzer] Fix uninitialized base class with initializer list when c

[clang] 1adb898 - Mark headers as textual and unbreak the modules build

2023-10-31 Thread Adrian Prantl via cfe-commits
Author: Adrian Prantl Date: 2023-10-31T09:10:50-07:00 New Revision: 1adb898e2db980fc402b8eac7ebc762c75d05826 URL: https://github.com/llvm/llvm-project/commit/1adb898e2db980fc402b8eac7ebc762c75d05826 DIFF: https://github.com/llvm/llvm-project/commit/1adb898e2db980fc402b8eac7ebc762c75d05826.diff

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-31 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay requested changes to this pull request. https://github.com/llvm/llvm-project/pull/70480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-31 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/70480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-31 Thread Fangrui Song via cfe-commits
@@ -330,6 +330,14 @@ def warn_alias_with_section : Warning< "as the %select{aliasee|resolver}2">, InGroup; +let CategoryName = "Bounds Safety Issue" in { +def err_bounds_safety_lang_not_supported : Error< + "bounds safety is only supported for C">; +def warn_bounds_safety

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread via cfe-commits
@@ -3553,6 +3553,49 @@ static unsigned getPackIndexForParam(Sema &S, llvm_unreachable("parameter index would not be produced from template"); } +// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl` +// we try to instantiate and update its explicit specifie

[clang] [analyzer] Fix uninitialized base class with initializer list when ctor is not declared in the base class (#70464) (PR #70792)

2023-10-31 Thread Ella Ma via cfe-commits
@@ -0,0 +1,69 @@ +// Refer issue 70464 for more details. +// +// When the base class does not have a declared constructor, the base +// initializer in the constructor of the derived class should use the given +// initializer list to finish the initialization of the base class. +//

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-31 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,11 @@ +// RUN: %clang -c %s -### 2>&1 | FileCheck -check-prefix T0 %s MaskRay wrote: `clang/test/Driver/clang_f_opts.c` mixes a lot of options. Newer `-fxxx` tests can go to a dedicated `clang/test/Driver/fxxx.c` https://github.com/llvm/llvm-project/

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-31 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,5 @@ +; RUN: %clang -fbounds-safety-experimental -x ir -S %s -o /dev/null 2>&1 | FileCheck %s +; RUN: %clang_cc1 -fbounds-safety-experimental -x ir -S %s -o /dev/null 2>&1 | FileCheck %s + MaskRay wrote: We usually test `%clang` for driver and `%clan

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-31 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: not %clang -fbounds-safety-experimental -x c++ %s 2>&1 | FileCheck -check-prefix ERR %s + MaskRay wrote: We use a terse style and use a blank line to group different sets of tests. Here the blank line use is unnecessary and harms reada

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-31 Thread Chuanqi Xu via cfe-commits
@@ -2005,14 +2039,7 @@ void ASTWriter::WriteDeclAbbrevs() { // Decl Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // DeclContext Abv->Add(BitCodeAbbrevOp(0)); // LexicalDeclContext - Abv->Add(BitCodeAbbrevOp(0)); // isInv

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-31 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/69287 >From ae4ee482f5b6b5d2487ed642b92e513ffd269781 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 16 Oct 2023 16:41:31 +0800 Subject: [PATCH 1/3] [Serializer] Pack bits into integers Previously, the boolean

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-31 Thread Chuanqi Xu via cfe-commits
@@ -2005,14 +2039,11 @@ void ASTWriter::WriteDeclAbbrevs() { // Decl Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // DeclContext Abv->Add(BitCodeAbbrevOp(0)); // LexicalDeclContext - Abv->Add(BitCodeAbbrevOp(0)); // isIn

[openmp] [clang] [clang-tools-extra] [libcxx] [mlir] [llvm] [Clang] Warn against unused parameters in C++ coroutines with `-Wunused-parameters` (PR #70567)

2023-10-31 Thread Wei Wang via cfe-commits
https://github.com/apolloww closed https://github.com/llvm/llvm-project/pull/70567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [mlir] [libcxx] [clang] [openmp] [llvm] [Clang] Warn against unused parameters in C++ coroutines with `-Wunused-parameters` (PR #70567)

2023-10-31 Thread Wei Wang via cfe-commits
apolloww wrote: > Thanks for looking into this. I haven't looked into the details. But I guess > it may be a good idea to teach `DiagnoseUnusedParameters` to understand > coroutines. Yeah, I think it could also make user aware of unused parameters so https://github.com/llvm/llvm-project/pull/

[clang-tools-extra] [mlir] [libcxx] [clang] [openmp] [llvm] [Clang] Warn against unused parameters in C++ coroutines with `-Wunused-parameters` (PR #70567)

2023-10-31 Thread Wei Wang via cfe-commits
https://github.com/apolloww reopened https://github.com/llvm/llvm-project/pull/70567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread via cfe-commits
https://github.com/LYP951018 edited https://github.com/llvm/llvm-project/pull/70548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread via cfe-commits
https://github.com/LYP951018 updated https://github.com/llvm/llvm-project/pull/70548 From b62beb7553f098488e64c81995558c19cd36d785 Mon Sep 17 00:00:00 2001 From: letrec Date: Sat, 28 Oct 2023 18:05:36 +0800 Subject: [PATCH 1/4] Defer the instantiation of explicit-specifier after constraint che

<    1   2   3   4   5   6   >