[clang] [llvm] [RISCV] Add Syntacore SCR7 processor definition (PR #108406)

2024-09-12 Thread Anton Sidorenko via cfe-commits
https://github.com/asi-sc created https://github.com/llvm/llvm-project/pull/108406 Syntacore SCR7 is a high-performance Linux-capable RISC-V processor core. The core has rv64imafdcv_zba_zbb_zbc_zbs_zkn march. Overview: https://syntacore.com/products/scr7 Scheduling model will be added in a subs

[clang] [llvm] [RISCV] Add Syntacore SCR7 processor definition (PR #108406)

2024-09-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Anton Sidorenko (asi-sc) Changes Syntacore SCR7 is a high-performance Linux-capable RISC-V processor core. The core has rv64imafdcv_zba_zbb_zbc_zbs_zkn march. Overview: https://syntacore.com/products/scr7 Scheduling model will be

[clang] [llvm] [RISCV] Add Syntacore SCR7 processor definition (PR #108406)

2024-09-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Anton Sidorenko (asi-sc) Changes Syntacore SCR7 is a high-performance Linux-capable RISC-V processor core. The core has rv64imafdcv_zba_zbb_zbc_zbs_zkn march. Overview: https://syntacore.com/products/scr7 Scheduling model will be added in

[clang] [CGData] Clang Options (PR #90304)

2024-09-12 Thread Jan Svoboda via cfe-commits
@@ -1894,6 +1894,18 @@ def fprofile_selected_function_group : Visibility<[ClangOption, CC1Option]>, MetaVarName<"">, HelpText<"Partition functions into N groups using -fprofile-function-groups and select only functions in group i to be instrumented. The valid range is 0 to

[clang] [clang-scan-deps] Infer the target from the executable name (PR #108189)

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

[clang] [RISCV][FMV] Support target_clones (PR #85786)

2024-09-12 Thread Sam Elliott via cfe-commits
@@ -0,0 +1,441 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-globals all --include-generated-funcs --version 4 +// RUN: %clang_cc1 -triple riscv64-linux-gnu -target-feature +i -emit-llvm -o - %s | FileCheck %s + +__attribute_

[clang] [Modules] Add -cc1 -flate-module-map-file to load module maps after PCMs (PR #88893)

2024-09-12 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. Thanks for the explanation! This LGTM, but I agree with the sentiment that I'd be nice to have this as the default behavior. Any effort towards that would be appreciated! https://github.com/llvm/llvm-project/pull/88893 ___

[clang] [clang-scan-deps] Infer the target from the executable name (PR #108189)

2024-09-12 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: Thanks! How do you feel about potentially backporting this to 19.x after a while? It’s not an urgent fix for a regression or something like that, but it’s kinda trivial enough. (In any case, it’d be after the first 19.1.0 is cut.) https://github.com/llvm/llvm-project/pull/10818

[clang] Make PCH's respect any VFS specified. (PR #106577)

2024-09-12 Thread Jan Svoboda via cfe-commits
@@ -4772,6 +4772,23 @@ bool ASTWriter::PreparePathForOutput(SmallVectorImpl &Path) { Changed = true; } + // If we are generating a normal PCH (EG. not a C++ module). + if (!WritingModule) { +// Use the vfs overlay if it exists to translate paths. +auto &FileSy

[clang] Make PCH's respect any VFS specified. (PR #106577)

2024-09-12 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: rm -rf %t +// RUN: mkdir -p %t/From +// RUN: mkdir -p %t/To +// RUN: echo '#pragma once' > %t/From/B.h jansvoboda11 wrote: Could you rewrite the test using `split-file`? That is much easier to read. https://github.com/llvm/llvm-project/

[clang] Make PCH's respect any VFS specified. (PR #106577)

2024-09-12 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 commented: Instead of using VFS overlays to make the AST file relocatable, have you considered making use of `adjustFilenameForRelocatableAST()` (i.e. storing relative paths to the AST file) and then setting the CWD accordingly when loading? https://github.com/

[clang] [clang-scan-deps] Infer the target from the executable name (PR #108189)

2024-09-12 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: No objections on my part. https://github.com/llvm/llvm-project/pull/108189 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Make PCH's respect any VFS specified. (PR #106577)

2024-09-12 Thread Neil Henning via cfe-commits
sheredom wrote: > Instead of using VFS overlays to make the AST file relocatable, have you > considered making use of `adjustFilenameForRelocatableAST()` (i.e. storing > relative paths to the AST file) and then setting the CWD accordingly when > loading? The problem we've got is that while we

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-12 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/107397 >From 621578de568be1e71665254060956ea1971965c9 Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Thu, 5 Sep 2024 05:42:26 -0700 Subject: [PATCH 1/5] [NFC] Move warning from COdeGen to Sema. --- clang/i

[clang] [analyzer] Explicitly register NoStoreFuncVisitor from alpha.unix.cst… (PR #108373)

2024-09-12 Thread Donát Nagy via cfe-commits
@@ -69,6 +69,7 @@ class CheckerContext { /// the state of the program before the checker ran. Note, checkers should /// not retain the node in their state since the nodes might get invalidated. ExplodedNode *getPredecessor() { return Pred; } + const ProgramPoint getLocat

[clang] [analyzer] Explicitly register NoStoreFuncVisitor from alpha.unix.cst… (PR #108373)

2024-09-12 Thread Donát Nagy via cfe-commits
@@ -718,6 +718,91 @@ class NoStateChangeFuncVisitor : public BugReporterVisitor { PathSensitiveBugReport &R) final; }; +/// Put a diagnostic on return statement of all inlined functions +/// for which the region of interest \p RegionOfInter

[clang] [analyzer] Explicitly register NoStoreFuncVisitor from alpha.unix.cst… (PR #108373)

2024-09-12 Thread Donát Nagy via cfe-commits
@@ -538,7 +541,8 @@ ProgramStateRef CStringChecker::checkInit(CheckerContext &C, OS << ") in the "; printIdxWithOrdinalSuffix(OS, Buffer.ArgumentIndex + 1); OS << " argument is undefined"; -emitUninitializedReadBug(C, State, Buffer.Expression, OS.str()); +em

[clang] [analyzer] Explicitly register NoStoreFuncVisitor from alpha.unix.cst… (PR #108373)

2024-09-12 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: I like this simplified variant, it's really straightforward now. I added a few inline comments (mostly copied from #106982), but after that I'm satisfied with the change. https://github.com/llvm/llvm-project/pull/108373 __

[clang] [analyzer] Explicitly register NoStoreFuncVisitor from alpha.unix.cst… (PR #108373)

2024-09-12 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/108373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Explicitly register NoStoreFuncVisitor from alpha.unix.cst… (PR #108373)

2024-09-12 Thread Donát Nagy via cfe-commits
@@ -263,6 +263,23 @@ bool SVal::isZeroConstant() const { // Pretty-Printing. //===--===// +StringRef SVal::getKindStr() const { + switch (getKind()) { +#define BASIC_SVAL(Id, Parent)

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-12 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 f77f60400f7a4c0c50bc3e3144cdade3bdf9aa3d 51acb49fa02ce4306e251649d7d7d23c65477d07 --e

[clang] eb8cc89 - [NFC] Claim OpenMP feature - target_device selector set

2024-09-12 Thread via cfe-commits
Author: cchen Date: 2024-09-12T11:10:38-05:00 New Revision: eb8cc89295fca2d6436afc38938ca5365a82707c URL: https://github.com/llvm/llvm-project/commit/eb8cc89295fca2d6436afc38938ca5365a82707c DIFF: https://github.com/llvm/llvm-project/commit/eb8cc89295fca2d6436afc38938ca5365a82707c.diff LOG: [N

[clang] [-Wunsafe-buffer-usage] Reduce false positives with constant arrays in libc warnings (PR #108308)

2024-09-12 Thread via cfe-commits
https://github.com/jkorous-apple approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/108308 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improve documentation of bugprone-pointer-arithmetic-on-polymorphic-object (PR #108324)

2024-09-12 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank edited https://github.com/llvm/llvm-project/pull/108324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improve documentation of bugprone-pointer-arithmetic-on-polymorphic-object (PR #108324)

2024-09-12 Thread Nicolas van Kempen via cfe-commits
@@ -19,20 +19,35 @@ Example: .. code-block:: c++ struct Base { -virtual void ~Base(); +virtual ~Base(); +int i; }; - + nicovank wrote: Nit here and below, no whitespace on blank lines for consistency. https://github.com/llvm/llvm-project/p

[clang-tools-extra] [clang-tidy] Improve documentation of bugprone-pointer-arithmetic-on-polymorphic-object (PR #108324)

2024-09-12 Thread Nicolas van Kempen via cfe-commits
@@ -19,20 +19,35 @@ Example: .. code-block:: c++ struct Base { -virtual void ~Base(); +virtual ~Base(); +int i; }; - + struct Derived : public Base {}; - - void foo() { -Base *b = new Derived[10]; - + + // Function that takes a pointer and perform

[clang-tools-extra] [clang-tidy] Improve documentation of bugprone-pointer-arithmetic-on-polymorphic-object (PR #108324)

2024-09-12 Thread Nicolas van Kempen via cfe-commits
@@ -50,14 +65,19 @@ Options void bar() { Base *b = new Base[10]; b += 1; // warning, as Base declares a virtual destructor - + delete[] b; - + Derived *d = new Derived[10]; // Derived overrides the destructor, and

[clang-tools-extra] [clang-tidy] Improve documentation of bugprone-pointer-arithmetic-on-polymorphic-object (PR #108324)

2024-09-12 Thread Nicolas van Kempen via cfe-commits
@@ -50,14 +65,19 @@ Options void bar() { Base *b = new Base[10]; nicovank wrote: Also pass `b` and `d` as parameters instead of `new`/`delete`. https://github.com/llvm/llvm-project/pull/108324 ___ cfe-commi

[clang-tools-extra] [clang-tidy] Improve documentation of bugprone-pointer-arithmetic-on-polymorphic-object (PR #108324)

2024-09-12 Thread Nicolas van Kempen via cfe-commits
@@ -19,20 +19,35 @@ Example: .. code-block:: c++ struct Base { -virtual void ~Base(); +virtual ~Base(); +int i; }; - + struct Derived : public Base {}; - - void foo() { -Base *b = new Derived[10]; - + + // Function that takes a pointer and perform

[clang-tools-extra] [clang-tidy] Improve documentation of bugprone-pointer-arithmetic-on-polymorphic-object (PR #108324)

2024-09-12 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank commented: Thanks! Some whitespace and comment nits. https://github.com/llvm/llvm-project/pull/108324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improve documentation of bugprone-pointer-arithmetic-on-polymorphic-object (PR #108324)

2024-09-12 Thread Nicolas van Kempen via cfe-commits
@@ -19,20 +19,35 @@ Example: .. code-block:: c++ struct Base { -virtual void ~Base(); +virtual ~Base(); +int i; }; - + struct Derived : public Base {}; - - void foo() { -Base *b = new Derived[10]; - + + // Function that takes a pointer and perform

[clang] Make PCH's respect any VFS specified. (PR #106577)

2024-09-12 Thread Ben Langmuir via cfe-commits
@@ -1115,13 +1115,13 @@ void ASTWriter::WriteBlockInfoBlock() { } /// Prepares a path for being written to an AST file by converting it -/// to an absolute path and removing nested './'s. +/// to an absolute path and removing nested './'s and '../'s. /// /// \return \c true

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-09-12 Thread Arthur Eubanks via cfe-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw==?=,Kyungwoo Lee ,Dmitry Polukhin ,Dmitry Polukhin Message-ID: In-Reply-To: aeubanks wrote: let me try to come up with a reduced repro https://github.com/llvm/llvm-project/pull/104512 ___ cfe-commits mail

[clang] [clang][Sema] Improve `collectViableConversionCandidates` (PR #97908)

2024-09-12 Thread via cfe-commits
@@ -6504,29 +6504,22 @@ static void collectViableConversionCandidates(Sema &SemaRef, Expr *From, QualType ToType, UnresolvedSetImpl &ViableConversions, OverloadCandidateSet &CandidateSet) { - for (unsigned I =

[clang] [clang-tools-extra] Remove ^^ as a token in OpenCL (PR #108224)

2024-09-12 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I think that the diagnostic change is reasonable. Clang doesn't support > OpenCL C++ at present so we won't need to worry about it. However the mission > of C++ for OpenCL is to track C++ and track OpenCL i.e. we may want to update > to C++ with reflection. So it would be

[clang] [HLSL] Allow narrowing in initialization lists (PR #108035)

2024-09-12 Thread Cooper Partin via cfe-commits
https://github.com/coopp approved this pull request. looks fine. Curious, why is this extra RUN: line added? Doesn't the other one already contain the same parameters `-ast-dump -o - %s | FileCheck %s` ? RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -ast-dump -o - %s | FileCheck %s

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-12 Thread via cfe-commits
https://github.com/joaosaffran deleted https://github.com/llvm/llvm-project/pull/107292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Allow narrowing in initialization lists (PR #108035)

2024-09-12 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/108035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CGData] Clang Options (PR #90304)

2024-09-12 Thread Kyungwoo Lee via cfe-commits
https://github.com/kyulee-com updated https://github.com/llvm/llvm-project/pull/90304 >From 966922b9921669d48eb750c36ce3c9b792ba8161 Mon Sep 17 00:00:00 2001 From: Kyungwoo Lee Date: Fri, 26 Apr 2024 12:58:54 -0700 Subject: [PATCH 1/3] [CGData] Clang Optinos --- clang/include/clang/Driver/Opt

[clang] [compiler-rt] [llvm] [FMV][AArch64] Unify ls64, ls64_v and ls64_accdata. (PR #108024)

2024-09-12 Thread Andrew Carlotti via cfe-commits
@@ -73,8 +73,6 @@ enum CPUFeatures { FEAT_SSBS, FEAT_SSBS2, FEAT_BTI, - FEAT_LS64, - FEAT_LS64_V, andrewcarlotti wrote: I think we might need to keep the enum values stable, although I'm not sure whether this could actually cause any issues yet. (c.f.

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-09-12 Thread Aaron Ballman via cfe-commits
@@ -870,7 +872,8 @@ class DiagnosticsEngine : public RefCountedBase { /// \param FormatString A fixed diagnostic format string that will be hashed /// and mapped to a unique DiagID. template - unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) { + [[depr

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-09-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/70976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Allow narrowing in initialization lists (PR #108035)

2024-09-12 Thread Chris B via cfe-commits
llvm-beanz wrote: > looks fine. Curious, why is this extra RUN: line added? Doesn't the other one > already contain the same parameters `-ast-dump -o - %s | FileCheck %s` ? > > RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -ast-dump -o - %s | > FileCheck %s The diff is a bit awkward

[clang] 6eb3519 - [HLSL] Allow narrowing in initialization lists (#108035)

2024-09-12 Thread via cfe-commits
Author: Chris B Date: 2024-09-12T12:03:25-05:00 New Revision: 6eb3519fd70bb50bc3773fdf0bf9435dae2abfe7 URL: https://github.com/llvm/llvm-project/commit/6eb3519fd70bb50bc3773fdf0bf9435dae2abfe7 DIFF: https://github.com/llvm/llvm-project/commit/6eb3519fd70bb50bc3773fdf0bf9435dae2abfe7.diff LOG:

[clang] [HLSL] Allow narrowing in initialization lists (PR #108035)

2024-09-12 Thread Chris B via cfe-commits
https://github.com/llvm-beanz closed https://github.com/llvm/llvm-project/pull/108035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-12 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/107292 >From c6434c06d17a2442863f8843e75dc870966fb97c Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 3 Sep 2024 19:06:22 + Subject: [PATCH 1/5] Adding `asuint` implementation to hlsl --- clang/includ

[clang-tools-extra] [clang-tidy] Improve documentation of bugprone-pointer-arithmetic-on-polymorphic-object (PR #108324)

2024-09-12 Thread Mainak Sil via cfe-commits
https://github.com/MainakSil updated https://github.com/llvm/llvm-project/pull/108324 >From edb6664fbdafb5127d141fde633779865a90dde1 Mon Sep 17 00:00:00 2001 From: Mainak Sil Date: Thu, 12 Sep 2024 08:58:15 +0530 Subject: [PATCH 1/2] Improve documentation for bugprone-pointer-arithmetic-on-pol

[clang] [clang-tools-extra] Fix OOM in FormatDiagnostic (PR #108187)

2024-09-12 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > Have you run your changes with address and ub sanitizers to see if there > > are some uncaught edge cases? > > Not quire sure I get the point about UB-sanitizers. I tested this changes > against my proprietary code which caused the issue with OOM/infinite-loop and > it

[clang] [llvm] [Utils] Add new --update-tests flag to llvm-lit (PR #108425)

2024-09-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Henrik G. Olsson (hnrklssn) Changes This adds a flag to lit for detecting and updating failing tests when possible to do so automatically. The flag uses a plugin architecture where config files can add additional auto-updaters for the typ

[clang] [llvm] [Utils] Add new --update-tests flag to llvm-lit (PR #108425)

2024-09-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-testing-tools Author: Henrik G. Olsson (hnrklssn) Changes This adds a flag to lit for detecting and updating failing tests when possible to do so automatically. The flag uses a plugin architecture where config files can add additional auto-updaters for

[clang] [llvm] [Utils] Add new --update-tests flag to llvm-lit (PR #108425)

2024-09-12 Thread Henrik G. Olsson via cfe-commits
hnrklssn wrote: Note that the first 4 commits are from https://github.com/llvm/llvm-project/pull/97369; only the last 2 are new. I'll merge that tomorrow when I have more time to be ready to revert in case something should happen. https://github.com/llvm/llvm-project/pull/108425 _

[clang] Make PCH's respect any VFS specified. (PR #106577)

2024-09-12 Thread Neil Henning via cfe-commits
@@ -4772,6 +4772,23 @@ bool ASTWriter::PreparePathForOutput(SmallVectorImpl &Path) { Changed = true; } + // If we are generating a normal PCH (EG. not a C++ module). + if (!WritingModule) { sheredom wrote: Note that without this guard the following t

[clang] [llvm] [Utils] Add new --update-tests flag to llvm-lit (PR #108425)

2024-09-12 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 c1c42518c1356e78a10bf252a4a5a643b2bb9efd...5e0817746633736adc7e135160777c8ae39e0e45 clang

[clang] Make PCH's respect any VFS specified. (PR #106577)

2024-09-12 Thread Neil Henning via cfe-commits
@@ -1115,13 +1115,13 @@ void ASTWriter::WriteBlockInfoBlock() { } /// Prepares a path for being written to an AST file by converting it -/// to an absolute path and removing nested './'s. +/// to an absolute path and removing nested './'s and '../'s. /// /// \return \c true

[clang] Make PCH's respect any VFS specified. (PR #106577)

2024-09-12 Thread Neil Henning via cfe-commits
@@ -1115,13 +1115,13 @@ void ASTWriter::WriteBlockInfoBlock() { } /// Prepares a path for being written to an AST file by converting it -/// to an absolute path and removing nested './'s. +/// to an absolute path and removing nested './'s and '../'s. /// /// \return \c true

[clang] Make PCH's respect any VFS specified. (PR #106577)

2024-09-12 Thread Neil Henning via cfe-commits
@@ -4772,6 +4772,23 @@ bool ASTWriter::PreparePathForOutput(SmallVectorImpl &Path) { Changed = true; } + // If we are generating a normal PCH (EG. not a C++ module). + if (!WritingModule) { +// Use the vfs overlay if it exists to translate paths. +auto &FileSy

[clang] Make PCH's respect any VFS specified. (PR #106577)

2024-09-12 Thread Neil Henning via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: rm -rf %t +// RUN: mkdir -p %t/From +// RUN: mkdir -p %t/To +// RUN: echo '#pragma once' > %t/From/B.h sheredom wrote: Never knew that existed and haven't used it before. But happy to port over for sure! https://github.com/llvm/llvm-pr

[clang] Make PCH's respect any VFS specified. (PR #106577)

2024-09-12 Thread Neil Henning via cfe-commits
@@ -1115,13 +1115,13 @@ void ASTWriter::WriteBlockInfoBlock() { } /// Prepares a path for being written to an AST file by converting it -/// to an absolute path and removing nested './'s. +/// to an absolute path and removing nested './'s and '../'s. /// /// \return \c true

[clang] Make PCH's respect any VFS specified. (PR #106577)

2024-09-12 Thread Neil Henning via cfe-commits
@@ -4772,6 +4772,23 @@ bool ASTWriter::PreparePathForOutput(SmallVectorImpl &Path) { Changed = true; } + // If we are generating a normal PCH (EG. not a C++ module). + if (!WritingModule) { +// Use the vfs overlay if it exists to translate paths. +auto &FileSy

[clang] [libclang/python] Do not rely on `ctypes`' `errcheck` (PR #105490)

2024-09-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Any chance you were able to test those changes? https://github.com/llvm/llvm-project/pull/105490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Do not rely on `ctypes`' `errcheck` (PR #105490)

2024-09-12 Thread Vlad Serebrennikov via cfe-commits
@@ -2454,7 +2480,7 @@ def element_type(self): If accessed on a type that is not an array, complex, or vector type, an exception will be raised. """ -result = conf.lib.clang_getElementType(self) +result = Type.from_result(conf.lib.clang_ge

[clang] [libclang/python] Do not rely on `ctypes`' `errcheck` (PR #105490)

2024-09-12 Thread Vlad Serebrennikov via cfe-commits
@@ -3743,82 +3765,62 @@ def write_main_file_to_stdout(self): ("clang_equalLocations", [SourceLocation, SourceLocation], bool), ("clang_equalRanges", [SourceRange, SourceRange], bool), ("clang_equalTypes", [Type, Type], bool), -("clang_formatDiagnostic", [Diagnos

[clang] [libclang/python] Do not rely on `ctypes`' `errcheck` (PR #105490)

2024-09-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/105490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Do not rely on `ctypes`' `errcheck` (PR #105490)

2024-09-12 Thread Vlad Serebrennikov via cfe-commits
@@ -3524,16 +3564,20 @@ def getCompileCommands(self, filename): Get an iterable object providing all the CompileCommands available to build filename. Returns None if filename is not found in the database. """ -return conf.lib.clang_CompilationDat

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-12 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/107397 >From 621578de568be1e71665254060956ea1971965c9 Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Thu, 5 Sep 2024 05:42:26 -0700 Subject: [PATCH 1/6] [NFC] Move warning from COdeGen to Sema. --- clang/i

[clang] Reland "[clang] Add nuw attribute to GEPs (#105496)" (PR #107257)

2024-09-12 Thread Arseny Kapoulkine via cfe-commits
zeux wrote: This change leads to a miscompilation; I've extracted a somewhat minimal repro case from the referenced issue above, in the comment: https://github.com/zeux/pugixml/issues/629#issuecomment-2346839855 The code, when compiled with `-O2 -g` by latest clang on Linux/X64, generates the

[clang] 2d47a0b - Add step builtins and step HLSL function to DirectX and SPIR-V backend (#106471)

2024-09-12 Thread via cfe-commits
Author: Joshua Batista Date: 2024-09-12T10:26:38-07:00 New Revision: 2d47a0baba6f18b5cdf14c007e01b79e37d15c72 URL: https://github.com/llvm/llvm-project/commit/2d47a0baba6f18b5cdf14c007e01b79e37d15c72 DIFF: https://github.com/llvm/llvm-project/commit/2d47a0baba6f18b5cdf14c007e01b79e37d15c72.diff

[clang] [llvm] Add step builtins and step HLSL function to DirectX and SPIR-V backend (PR #106471)

2024-09-12 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 closed https://github.com/llvm/llvm-project/pull/106471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improve documentation of bugprone-pointer-arithmetic-on-polymorphic-object (PR #108324)

2024-09-12 Thread Mainak Sil via cfe-commits
https://github.com/MainakSil updated https://github.com/llvm/llvm-project/pull/108324 >From edb6664fbdafb5127d141fde633779865a90dde1 Mon Sep 17 00:00:00 2001 From: Mainak Sil Date: Thu, 12 Sep 2024 08:58:15 +0530 Subject: [PATCH 1/3] Improve documentation for bugprone-pointer-arithmetic-on-pol

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-09-12 Thread Chris Warner via cfe-commits
https://github.com/cwarner-8702 updated https://github.com/llvm/llvm-project/pull/101073 >From 24f52fbfb9117a6498769cebdc7b09ecbd7e019e Mon Sep 17 00:00:00 2001 From: Chris Warner Date: Wed, 17 Jul 2024 11:22:39 -0700 Subject: [PATCH 1/5] [clang-tidy] bugprone-implicit-widening ignores unsigned

[clang-tools-extra] [clang-tidy] Improve documentation of bugprone-pointer-arithmetic-on-polymorphic-object (PR #108324)

2024-09-12 Thread Mainak Sil via cfe-commits
MainakSil wrote: I have addressed the feedback: 1. Removed unnecessary whitespace. 2. Removed redundant comments and the `FinalDerived` example. 3. Replaced `new/delete` with direct array passing. Please let me know if further changes are needed. https://github.com/llvm/llvm-project/pull/108324

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2024-09-12 Thread Paul Heidekrüger via cfe-commits
paulhdk wrote: Hi all, just giving this a polite bump. Please do let us know if you have any questions or if there's anything we can do to make reviewing easier. https://github.com/llvm/llvm-project/pull/95220 ___ cfe-commits mailing list cfe-commits

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2024-09-12 Thread via cfe-commits
Paul =?utf-8?q?Heidekr=C3=BCger?= , Paul =?utf-8?q?Heidekr=C3=BCger?= , Paul =?utf-8?q?Heidekr=C3=BCger?= , Paul =?utf-8?q?Heidekr=C3=BCger?= , Paul =?utf-8?q?Heidekr=C3=BCger?= , Paul =?utf-8?q?Heidekr=C3=BCger?= , Paul =?utf-8?q?Heidekr=C3=BCger?= , Paul =?utf-8?q?Heidekr=C3=BCger?= , Paul =?utf-

[clang] [clang-tools-extra] Fix OOM in FormatDiagnostic (PR #108187)

2024-09-12 Thread Vakhurin Sergei via cfe-commits
https://github.com/igelbox updated https://github.com/llvm/llvm-project/pull/108187 >From aee4cf70dedaa3c8b7b6508238e01f92d60c631c Mon Sep 17 00:00:00 2001 From: Sergei Date: Tue, 10 Sep 2024 16:19:05 + Subject: [PATCH 1/2] fix quick OOM in FormatDiagnostic --- .../ClangTidyDiagnosticCons

[clang] [clang-tools-extra] Fix OOM in FormatDiagnostic (PR #108187)

2024-09-12 Thread Vakhurin Sergei via cfe-commits
@@ -571,8 +571,7 @@ DiagnosticIDs::getDiagnosticSeverity(unsigned DiagID, SourceLocation Loc, } // If explicitly requested, map fatal errors to errors. - if (Result == diag::Severity::Fatal && - Diag.CurDiagID != diag::fatal_too_many_errors && Diag.FatalsAsError) --

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-09-12 Thread via cfe-commits
pirama-arumuga-nainar wrote: @rjmccall and @efriedma-quic, do you have any other comments on this PR? https://github.com/llvm/llvm-project/pull/97121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-12 Thread Michael Jones via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-12 Thread Michael Jones via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-12 Thread Michael Jones via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-12 Thread Michael Jones via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-12 Thread Michael Jones via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-12 Thread Michael Jones via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-12 Thread Michael Jones via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-12 Thread Michael Jones via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-12 Thread Michael Jones via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-12 Thread Michael Jones via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-12 Thread Michael Jones via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] Make PCH's respect any VFS specified. (PR #106577)

2024-09-12 Thread Neil Henning via cfe-commits
@@ -1115,13 +1115,13 @@ void ASTWriter::WriteBlockInfoBlock() { } /// Prepares a path for being written to an AST file by converting it -/// to an absolute path and removing nested './'s. +/// to an absolute path and removing nested './'s and '../'s. /// /// \return \c true

[clang] [clang-tools-extra] Fix OOM in FormatDiagnostic (PR #108187)

2024-09-12 Thread Vakhurin Sergei via cfe-commits
@@ -538,24 +511,51 @@ bool DiagnosticsEngine::EmitCurrentDiagnostic(bool Force) { Emitted = (DiagLevel != DiagnosticIDs::Ignored); if (Emitted) { // Emit the diagnostic regardless of suppression level. - Diags->EmitDiag(*this, DiagLevel); + Diags->EmitD

[clang] Reland "[clang] Add nuw attribute to GEPs (#105496)" (PR #107257)

2024-09-12 Thread Arseny Kapoulkine via cfe-commits
zeux wrote: Here's a slightly smaller reproducer that just reads one element from the array. Similarly, this crashes because the compiler generates a load from an absolute `-1` address. The crash is after the first `printf` call in this case during the computation of the argument to the second

[clang] Thread Safety Analysis: Differentiate between lock sets at real join points and expected/actual sets at function end (PR #105526)

2024-09-12 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: The warning is arguably wrong, and this might even be considered a regression. However, operations on asserted capabilities have been an issue before this change, and this worked for scoped capabilities only accidentally. If you do this without a scoped capability, you get

[clang] [llvm] [HLSL] Implement elementwise popcount (PR #108121)

2024-09-12 Thread Damyan Pepper via cfe-commits
damyanp wrote: Seems that this change is doing a bit more than just adding a new version of popcount. Can the description be updated appropriately please? https://github.com/llvm/llvm-project/pull/108121 ___ cfe-commits mailing list cfe-commits@lists

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-12 Thread Зишан Мирза via cfe-commits
zimirza wrote: I am so sorry about this. I have now fixed them all. https://github.com/llvm/llvm-project/pull/107285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improve documentation of bugprone-pointer-arithmetic-on-polymorphic-object (PR #108324)

2024-09-12 Thread Nicolas van Kempen via cfe-commits
@@ -19,20 +19,23 @@ Example: .. code-block:: c++ struct Base { -virtual void ~Base(); +virtual ~Base(); +int i; }; - nicovank wrote: Sorry I wasn't clear, I meant to keep the spacing here between structs/functions, but when there is a blank

[clang-tools-extra] [clang-tidy] Improve documentation of bugprone-pointer-arithmetic-on-polymorphic-object (PR #108324)

2024-09-12 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank approved this pull request. https://github.com/llvm/llvm-project/pull/108324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CGData] Clang Options (PR #90304)

2024-09-12 Thread Kyungwoo Lee via cfe-commits
https://github.com/kyulee-com updated https://github.com/llvm/llvm-project/pull/90304 >From 966922b9921669d48eb750c36ce3c9b792ba8161 Mon Sep 17 00:00:00 2001 From: Kyungwoo Lee Date: Fri, 26 Apr 2024 12:58:54 -0700 Subject: [PATCH 1/4] [CGData] Clang Optinos --- clang/include/clang/Driver/Opt

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-09-12 Thread Nikolas Klauser via cfe-commits
@@ -269,11 +268,60 @@ CATEGORY(INSTALLAPI, REFACTORING) return Found; } -DiagnosticMapping DiagnosticIDs::getDefaultMapping(unsigned DiagID) { +//===--===// +// Custom Diagnostic information +//===--

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-09-12 Thread Nikolas Klauser via cfe-commits
@@ -200,7 +273,33 @@ class DiagnosticIDs : public RefCountedBase { // FIXME: Replace this function with a create-only facilty like // createCustomDiagIDFromFormatString() to enforce safe usage. At the time of // writing, nearly all callers of this function were invalid.

[clang-tools-extra] 030c6da - [clang] Extend diagnose_if to accept more detailed warning information (#70976)

2024-09-12 Thread via cfe-commits
Author: Nikolas Klauser Date: 2024-09-12T20:15:01+02:00 New Revision: 030c6da7af826b641db005be925b20f956c3a6bb URL: https://github.com/llvm/llvm-project/commit/030c6da7af826b641db005be925b20f956c3a6bb DIFF: https://github.com/llvm/llvm-project/commit/030c6da7af826b641db005be925b20f956c3a6bb.dif

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-09-12 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/70976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   >