[clang] [clang-format][NFC] Add getNextNonComment() to FormatTokenSource (PR #87868)

2024-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/87868.diff 2 Files Affected: - (modified) clang/lib/Format/FormatTokenSource.h (+9) - (modified) clang/lib/Format/UnwrappedLineParser.cpp

[clang] [clang-format][NFC] Add getNextNonComment() to FormatTokenSource (PR #87868)

2024-04-05 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/87868 None >From 5c614fec2b54c146841a9ef3089dee1a63f72543 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 5 Apr 2024 22:45:47 -0700 Subject: [PATCH] [clang-format][NFC] Add getNextNonComment() to FormatTokenSource

[clang] 7702023 - [clang-format][NFC] Rename `kind` to `Kind`

2024-04-05 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-04-05T22:17:50-07:00 New Revision: 770202343ebce1f2bc0745c78e298e251f204bee URL: https://github.com/llvm/llvm-project/commit/770202343ebce1f2bc0745c78e298e251f204bee DIFF: https://github.com/llvm/llvm-project/commit/770202343ebce1f2bc0745c78e298e251f204bee.diff

[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty (PR #87866)

2024-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Fangrui Song (MaskRay) Changes Follow-up to #81037. ToolChain::LibraryPaths holds the new compiler-rt library directory (e.g. `/tmp/Debug/lib/clang/19/lib/x86_64-unknown-linux-gnu`). However, it might be empty when the directory

[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty (PR #87866)

2024-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Fangrui Song (MaskRay) Changes Follow-up to #81037. ToolChain::LibraryPaths holds the new compiler-rt library directory (e.g. `/tmp/Debug/lib/clang/19/lib/x86_64-unknown-linux-gnu`). However, it might be empty when the directory

[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty (PR #87866)

2024-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fangrui Song (MaskRay) Changes Follow-up to #81037. ToolChain::LibraryPaths holds the new compiler-rt library directory (e.g. `/tmp/Debug/lib/clang/19/lib/x86_64-unknown-linux-gnu`). However, it might be empty when the directory does not

[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty (PR #87866)

2024-04-05 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/87866 Follow-up to #81037. ToolChain::LibraryPaths holds the new compiler-rt library directory (e.g. `/tmp/Debug/lib/clang/19/lib/x86_64-unknown-linux-gnu`). However, it might be empty when the directory does not

[clang] [clang][NFC] Introduce `SemaBase` (PR #87634)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/87634 >From 311e2ef14dda46686b473e813028a2c3b2ac1254 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 4 Apr 2024 16:07:35 +0300 Subject: [PATCH] [clang][NFC] Introduce `SemaBase` This is a follow-up to

[clang] 0b021c4 - [clang] Claim conformance for CWG466 (#87748)

2024-04-05 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-04-06T08:11:58+04:00 New Revision: 0b021c4b603b4e076f9e54572a4eef3e43ab57c0 URL: https://github.com/llvm/llvm-project/commit/0b021c4b603b4e076f9e54572a4eef3e43ab57c0 DIFF:

[clang] [clang] Claim conformance for CWG466 (PR #87748)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/87748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add test for CWG392 (PR #87744)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/87744 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cd0f5b2 - [clang] Add test for CWG392 (#87744)

2024-04-05 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-04-06T08:10:53+04:00 New Revision: cd0f5b2e58fad3973f2f50936b0467b2de3b3e12 URL: https://github.com/llvm/llvm-project/commit/cd0f5b2e58fad3973f2f50936b0467b2de3b3e12 DIFF:

[clang] [clang] Reject VLAs in `__is_layout_compatible()` (PR #87737)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/87737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 813f68c - [clang] Reject VLAs in `__is_layout_compatible()` (#87737)

2024-04-05 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-04-06T08:09:54+04:00 New Revision: 813f68caf42260452ad7a5cc224ef199a2ad0067 URL: https://github.com/llvm/llvm-project/commit/813f68caf42260452ad7a5cc224ef199a2ad0067 DIFF:

[clang] Fix/interp init list unnamed bitfields (PR #87799)

2024-04-05 Thread Timm Baeder via cfe-commits
@@ -884,8 +884,36 @@ bool ByteCodeExprGen::visitInitList(ArrayRef Inits, if (!this->emitDupPtr(E)) return false; +// guard relatively expensive base check behind an almost-always-false tbaederr wrote: The comment sounds like this is just a

[clang] Fix/interp init list unnamed bitfields (PR #87799)

2024-04-05 Thread Timm Baeder via cfe-commits
@@ -0,0 +1,114 @@ +// UNSUPPORTED: asserts +// REQUIRES: asserts +// ^ this attempts to say "don't actually run this test", because it's broken +// +// The point of this test is to demonstrate something that ExprConstant accepts, +// but Interp rejects. I had hoped to express

[clang] Fix/interp init list unnamed bitfields (PR #87799)

2024-04-05 Thread Timm Baeder via cfe-commits
@@ -0,0 +1,114 @@ +// UNSUPPORTED: asserts +// REQUIRES: asserts +// ^ this attempts to say "don't actually run this test", because it's broken tbaederr wrote: It's broken even with the changes in this PR? https://github.com/llvm/llvm-project/pull/87799

[clang] Clang: Return new layout path if cannot find CRT (PR #87319)

2024-04-05 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay requested changes to this pull request. I don't think we should add another copy of `buildCompilerRTBasename` to `getCompilerRT` to make it more complex. Let's keep the discussion in #87150 https://github.com/llvm/llvm-project/pull/87319

[clang-tools-extra] [clang-tidy] Fix readability-duplicate-include for includes with macro (PR #87433)

2024-04-05 Thread via cfe-commits
https://github.com/FruitClover closed https://github.com/llvm/llvm-project/pull/87433 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] ed4e505 - [clang-tidy] Fix readability-duplicate-include for includes with macro (#87433)

2024-04-05 Thread via cfe-commits
Author: Mike Date: 2024-04-06T04:38:08+03:00 New Revision: ed4e505c219fe6c7464ea5a056e90d8cd94c7332 URL: https://github.com/llvm/llvm-project/commit/ed4e505c219fe6c7464ea5a056e90d8cd94c7332 DIFF: https://github.com/llvm/llvm-project/commit/ed4e505c219fe6c7464ea5a056e90d8cd94c7332.diff LOG:

[clang] [clang][modules] Only compute affecting module maps with implicit search (PR #87849)

2024-04-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/87849 None >From 158ecc0736f0011f7da2c737ae323ddf5ef599c9 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 4 Apr 2024 12:31:09 -0700 Subject: [PATCH] [clang][modules] Only compute affecting module maps with

[clang] [clang][modules] Do not resolve `HeaderFileInfo` externally in `ASTWriter` (PR #87848)

2024-04-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/87848 None >From ee56548604be9473f33cd809c901886f37a3d8e9 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 5 Apr 2024 15:12:39 -0700 Subject: [PATCH] [clang][modules] Do not resolve `HeaderFileInfo`

[clang] Match against all plugins when parsing microsoft attributes (PR #86426)

2024-04-05 Thread via cfe-commits
@@ -345,6 +345,9 @@ Bug Fixes to Compiler Builtins Bug Fixes to Attribute Support ^^ +- Clang now correctly matches plugin attributes with microsoft ``[attribute]`` syntax. apache-hb wrote: Microsoft attributes use single

[clang] Match against all plugins when parsing microsoft attributes (PR #86426)

2024-04-05 Thread via cfe-commits
https://github.com/apache-hb updated https://github.com/llvm/llvm-project/pull/86426 >From 245a21512d8658225b17b91b8af4764f54084e01 Mon Sep 17 00:00:00 2001 From: Elliot <35050275+apache...@users.noreply.github.com> Date: Sun, 24 Mar 2024 03:03:47 -0400 Subject: [PATCH 1/7] Match against all

[clang] [Flang] responds to Clang Tidy feedback (PR #87847)

2024-04-05 Thread Christopher Di Bella via cfe-commits
https://github.com/cjdb updated https://github.com/llvm/llvm-project/pull/87847 >From b8e67dfae63ee64753724dba8735799b39f4fcc0 Mon Sep 17 00:00:00 2001 From: Christopher Di Bella Date: Sat, 6 Apr 2024 00:13:29 + Subject: [PATCH 1/2] [Flang] responds to Clang Tidy feedback Line 267:

[clang] [Flang] responds to Clang Tidy feedback (PR #87847)

2024-04-05 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 8bd391457fbd5108610557efdb26c2397aa0bd24 b8e67dfae63ee64753724dba8735799b39f4fcc0 --

[clang] [Flang] responds to Clang Tidy feedback (PR #87847)

2024-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Christopher Di Bella (cjdb) Changes Line 267: performance-unnecessary-copy-initialization Line 592: readability-container-size-empty --- Full diff: https://github.com/llvm/llvm-project/pull/87847.diff 1 Files Affected: - (modified)

[clang] [Flang] responds to Clang Tidy feedback (PR #87847)

2024-04-05 Thread Christopher Di Bella via cfe-commits
https://github.com/cjdb created https://github.com/llvm/llvm-project/pull/87847 Line 267: performance-unnecessary-copy-initialization Line 592: readability-container-size-empty >From b8e67dfae63ee64753724dba8735799b39f4fcc0 Mon Sep 17 00:00:00 2001 From: Christopher Di Bella Date: Sat, 6 Apr

[clang] [llvm] [llvm] Add triples for managarm (PR #87845)

2024-04-05 Thread via cfe-commits
https://github.com/no92 edited https://github.com/llvm/llvm-project/pull/87845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm] Add triples for managarm (PR #87845)

2024-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-adt Author: no92 (no92) Changes This PR aims to add a target for [managarm](https://github.com/managarm/managarm). The targets `{x86_64,aarch64,riscv64}-pc-managarm-{kernel,system}` are enabled by this PR and have been tested to work on

[clang] [llvm] [llvm] Add triples for managarm (PR #87845)

2024-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: no92 (no92) Changes This PR aims to add a target for [managarm](https://github.com/managarm/managarm). The targets `{x86_64,aarch64,riscv64}-pc-managarm-{kernel,system}` are enabled by this PR and have been tested to work on

[clang] [llvm] [llvm] Add triples for managarm (PR #87845)

2024-04-05 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you,

[clang] [llvm] [llvm] Add triples for managarm (PR #87845)

2024-04-05 Thread via cfe-commits
https://github.com/no92 created https://github.com/llvm/llvm-project/pull/87845 This PR aims to add a target for [managarm](https://github.com/managarm/managarm). The targets `{x86_64,aarch64,riscv64}-pc-managarm-{kernel,system}` are enabled by this PR and have been tested to work on

[clang] [NFC][OpenMP] Split nesting_of_regions test (PR #87842)

2024-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mike Rice (mikerice1969) Changes This test is the bottleneck for OpenMP lit tests, running about twice as long as the others. Break it into five tests based on run lines with the same version. --- Full diff:

[clang] [NFC][OpenMP] Split nesting_of_regions test (PR #87842)

2024-04-05 Thread Mike Rice via cfe-commits
https://github.com/mikerice1969 ready_for_review https://github.com/llvm/llvm-project/pull/87842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][OpenMP] Split nesting_of_regions test (PR #87842)

2024-04-05 Thread Mike Rice via cfe-commits
mikerice1969 wrote: This is one way to improve the overall test time. Open for other suggestions. ``` Before change: Slowest Tests: -- 144.09s: Clang :: OpenMP/nesting_of_regions.cpp 60.81s: Clang ::

[clang] [NFC][OpenMP] Split nesting_of_regions test (PR #87842)

2024-04-05 Thread Mike Rice via cfe-commits
https://github.com/mikerice1969 created https://github.com/llvm/llvm-project/pull/87842 This test is the bottleneck for OpenMP lit tests, running about twice as long as the others. Break it into five tests based on run lines with the same version. >From

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-05 Thread Gábor Horváth via cfe-commits
@@ -385,6 +388,185 @@ getFieldsGlobalsAndFuncs(const Stmt , FieldSet , } } +namespace { + +// Visitor that builds a map from record prvalues to result objects. +// This traverses the body of the function to be analyzed; for each result +// object that it encounters, it

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-05 Thread Gábor Horváth via cfe-commits
@@ -688,22 +689,45 @@ class Environment { /// and functions referenced in `FuncDecl`. `FuncDecl` must have a body. void initFieldsGlobalsAndFuncs(const FunctionDecl *FuncDecl); + static PrValueToResultObject + buildResultObjectMap(DataflowAnalysisContext *DACtx, +

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-05 Thread Gábor Horváth via cfe-commits
@@ -688,22 +689,45 @@ class Environment { /// and functions referenced in `FuncDecl`. `FuncDecl` must have a body. void initFieldsGlobalsAndFuncs(const FunctionDecl *FuncDecl); + static PrValueToResultObject + buildResultObjectMap(DataflowAnalysisContext *DACtx, +

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-05 Thread Gábor Horváth via cfe-commits
@@ -385,6 +388,185 @@ getFieldsGlobalsAndFuncs(const Stmt , FieldSet , } } +namespace { + +// Visitor that builds a map from record prvalues to result objects. +// This traverses the body of the function to be analyzed; for each result +// object that it encounters, it

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-05 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun commented: I did not finish reviewing this, but wanted to send a couple of questions early to parallelize the process a bit. https://github.com/llvm/llvm-project/pull/87320 ___ cfe-commits mailing list

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-05 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/87320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-04-05 Thread Yeoul Na via cfe-commits
@@ -4997,7 +5087,11 @@ void Parser::ParseStructUnionBody(SourceLocation RecordLoc, ParsedAttributes attrs(AttrFactory); // If attributes exist after struct contents, parse them. - MaybeParseGNUAttributes(attrs); + MaybeParseGNUAttributes(attrs, ); + +

[clang] [compiler-rt] Fix "[clang][UBSan] Add implicit conversion check for bitfields" (PR #87761)

2024-04-05 Thread Axel Lundberg via cfe-commits
Zonotora wrote: @vitalybuka yes, seems like all testcases failed due to not explicitly setting BitfieldBits to 0 except one, LeakSanitizer-AddressSanitizer-i386 :: TestCases/leak_check_at_exit.cpp not really sure what the problem is. Also added another testcase

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > FYI, it looks like this change broke `compiler-rt` build, e.g. in > https://lab.llvm.org/buildbot/#/builders/270/builds/12485 Should be resolved by: https://github.com/llvm/llvm-project/commit/fe45029dbdee6b3df2dbeaed17c9dd598ec511f2 I suspect compiler-rt may be relying

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Cyndy Ishida via cfe-commits
@@ -1029,6 +1038,16 @@ macro(add_llvm_executable name) add_llvm_symbol_exports( ${name} ${LLVM_EXPORTED_SYMBOL_FILE} ) endif(LLVM_EXPORTED_SYMBOL_FILE) + if (NOT LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES) +if(LLVM_LINKER_SUPPORTS_NO_EXPORTED_SYMBOLS) +

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Slava Zakharin via cfe-commits
vzakhari wrote: FYI, it looks like this change broke `compiler-rt` build, e.g. in https://lab.llvm.org/buildbot/#/builders/270/builds/12485 https://github.com/llvm/llvm-project/pull/87684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dave Lee via cfe-commits
@@ -1029,6 +1038,16 @@ macro(add_llvm_executable name) add_llvm_symbol_exports( ${name} ${LLVM_EXPORTED_SYMBOL_FILE} ) endif(LLVM_EXPORTED_SYMBOL_FILE) + if (NOT LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES) +if(LLVM_LINKER_SUPPORTS_NO_EXPORTED_SYMBOLS) +

[clang-tools-extra] [clang-tidy] Ignore non-forwarded arguments if they are unnamed (PR #87832)

2024-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang-tidy Author: Danny Mösch (SimplyDanny) Changes Fixes #87697. --- Full diff: https://github.com/llvm/llvm-project/pull/87832.diff 3 Files Affected: - (modified)

[clang-tools-extra] [clang-tidy] Ignore non-forwarded arguments if they are unnamed (PR #87832)

2024-04-05 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny created https://github.com/llvm/llvm-project/pull/87832 Fixes #87697. From b8662eb6681d86ac475f30a70740b6b83eda1de3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Fri, 5 Apr 2024 23:41:50 +0200 Subject: [PATCH] [clang-tidy] Ignore

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/87684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 25cf279 - [cmake] Build executables with -no_exported_symbols when building Apple toolchain (#87684)

2024-04-05 Thread via cfe-commits
Author: Cyndy Ishida Date: 2024-04-05T14:41:20-07:00 New Revision: 25cf27910c3a58e71e37c3d5391235730aa7c488 URL: https://github.com/llvm/llvm-project/commit/25cf27910c3a58e71e37c3d5391235730aa7c488 DIFF: https://github.com/llvm/llvm-project/commit/25cf27910c3a58e71e37c3d5391235730aa7c488.diff

[clang] 27b2d7d - [InstallAPI] Capture & compare load commands that may differ per arch slice (#87674)

2024-04-05 Thread via cfe-commits
Author: Cyndy Ishida Date: 2024-04-05T13:58:24-07:00 New Revision: 27b2d7d4bb790ec1e7430bf18b1bc2f6e0800d0d URL: https://github.com/llvm/llvm-project/commit/27b2d7d4bb790ec1e7430bf18b1bc2f6e0800d0d DIFF: https://github.com/llvm/llvm-project/commit/27b2d7d4bb790ec1e7430bf18b1bc2f6e0800d0d.diff

[clang] [InstallAPI] Capture & compare load commands that may differ per arch slice (PR #87674)

2024-04-05 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/87674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstallAPI] Capture & compare load commands that may differ per arch slice (PR #87674)

2024-04-05 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: Thanks for reviewing @zixu-w ! https://github.com/llvm/llvm-project/pull/87674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] Fix "[clang][UBSan] Add implicit conversion check for bitfields" (PR #87761)

2024-04-05 Thread Axel Lundberg via cfe-commits
https://github.com/Zonotora edited https://github.com/llvm/llvm-project/pull/87761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -4872,6 +4886,79 @@ void Parser::ParseStructDeclaration( } } +// Parse all attributes in LA, and attach them to Decl D. +void Parser::ParseLexedCAttributeList(LateParsedAttrList , bool EnterScope, ParsedAttributes *OutAttrs) { + assert(LA.parseSoon() && +

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -4997,7 +5087,11 @@ void Parser::ParseStructUnionBody(SourceLocation RecordLoc, ParsedAttributes attrs(AttrFactory); // If attributes exist after struct contents, parse them. - MaybeParseGNUAttributes(attrs); + MaybeParseGNUAttributes(attrs, ); + +

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -4872,6 +4886,79 @@ void Parser::ParseStructDeclaration( } } +// Parse all attributes in LA, and attach them to Decl D. +void Parser::ParseLexedCAttributeList(LateParsedAttrList , bool EnterScope, ParsedAttributes *OutAttrs) { + assert(LA.parseSoon() && +

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -4872,6 +4886,79 @@ void Parser::ParseStructDeclaration( } } +// Parse all attributes in LA, and attach them to Decl D. +void Parser::ParseLexedCAttributeList(LateParsedAttrList , bool EnterScope, ParsedAttributes *OutAttrs) { + assert(LA.parseSoon() && +

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Ed Maste via cfe-commits
emaste wrote: Giving this extra scrutiny is certainly warranted given the context, but #63957 is a legitimate bug. https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -2497,7 +2501,9 @@ class Parser : public CodeCompletionHandler { void ParseStructDeclaration( ParsingDeclSpec , - llvm::function_ref FieldsCallback); + llvm::function_ref delcypher wrote: Why are we adding using `Decl*&` as a parameter?

[clang] [InstallAPI] Capture & compare load commands that may differ per arch slice (PR #87674)

2024-04-05 Thread Zixu Wang via cfe-commits
https://github.com/zixu-w approved this pull request. https://github.com/llvm/llvm-project/pull/87674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
https://github.com/delcypher edited https://github.com/llvm/llvm-project/pull/87684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
https://github.com/delcypher edited https://github.com/llvm/llvm-project/pull/87684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
https://github.com/delcypher edited https://github.com/llvm/llvm-project/pull/87684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -258,15 +258,24 @@ if (NOT DEFINED LLVM_LINKER_DETECTED AND NOT WIN32) endif() endif() - # Apple's linker complains about duplicate libraries, which CMake likes to do - # to support ELF platforms. To silence that warning, we can use - #

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -258,15 +258,24 @@ if (NOT DEFINED LLVM_LINKER_DETECTED AND NOT WIN32) endif() endif() - # Apple's linker complains about duplicate libraries, which CMake likes to do - # to support ELF platforms. To silence that warning, we can use - #

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
https://github.com/delcypher approved this pull request. LGTM. Other than the nit about not using `FORCE` to set the CMake cache variable. https://github.com/llvm/llvm-project/pull/87684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > I really appreciate the suggestions. `alias-unused.cpp` and > > `alias-unused-win.cpp` contain test improvement that should be pre-commited > > once they look good enough. Then this PR can be changed to show the > > difference. > > On a separate note, I wanted to clarify

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -258,15 +258,24 @@ if (NOT DEFINED LLVM_LINKER_DETECTED AND NOT WIN32) endif() endif() - # Apple's linker complains about duplicate libraries, which CMake likes to do - # to support ELF platforms. To silence that warning, we can use - #

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -258,15 +258,24 @@ if (NOT DEFINED LLVM_LINKER_DETECTED AND NOT WIN32) endif() endif() - # Apple's linker complains about duplicate libraries, which CMake likes to do - # to support ELF platforms. To silence that warning, we can use - #

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Ed Maste via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s emaste wrote: Git does not track file moves explicitly. You'll find that `git log --follow` will work equally well whether you use `git add` and `git rm` or `git mv`. It

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/87684 >From 3ac6872328334384fa20998541fac841add767d9 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Thu, 4 Apr 2024 12:08:28 -0700 Subject: [PATCH 1/4] [cmake] Build executables with -no_exported_symbols when

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/87821 >From ca5f957bb002d79997e630cdf1aaad5703ea2ba4 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 5 Apr 2024 10:53:47 -0700 Subject: [PATCH 1/2] [OpenACC] Implement Sema work for OpenACC Clauses Now that

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -3594,11 +3595,26 @@ class Parser : public CodeCompletionHandler { OpenACCDirectiveKind DirKind; SourceLocation StartLoc; SourceLocation EndLoc; -// TODO OpenACC: Add Clause list here once we have a type for that. +SmallVector Clauses; // TODO

[clang] [compiler-rt] Fix "[clang][UBSan] Add implicit conversion check for bitfields" (PR #87761)

2024-04-05 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: This is fixed version of https://github.com/llvm/llvm-project/pull/75481 ? https://github.com/llvm/llvm-project/pull/87761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -1029,6 +1038,11 @@ macro(add_llvm_executable name) add_llvm_symbol_exports( ${name} ${LLVM_EXPORTED_SYMBOL_FILE} ) endif(LLVM_EXPORTED_SYMBOL_FILE) + if (NOT LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES AND LLVM_LINKER_SUPPORTS_NO_EXPORTED_SYMBOLS)

[clang] [X86_64] fix arg pass error in struct. (PR #86902)

2024-04-05 Thread Eli Friedman via cfe-commits
@@ -2100,8 +2100,12 @@ void X86_64ABIInfo::classify(QualType Ty, uint64_t OffsetBase, Class , postMerge(Size, Lo, Hi); return; } + + bool InMemory = Offset % getContext().getTypeAlign(i->getType()) || + (i->getType()->getAs() &&

[clang] [OpenMP][CodeGen] Improved codegen for combined loop directives (PR #87278)

2024-04-05 Thread Eli Friedman via cfe-commits
@@ -6135,6 +6137,79 @@ processImplicitMapsWithDefaultMappers(Sema , DSAStackTy *Stack, } } +namespace { +/// A 'teams loop' with a nested 'loop bind(parallel)' or generic function +/// call in the associated loop-nest cannot be a 'parallel for'. +class TeamsLoopChecker

[clang] [UBSAN] Preserve ubsan code with ubsan-unique-traps (PR #83470)

2024-04-05 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/83470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [UBSAN] Preserve ubsan code with ubsan-unique-traps (PR #83470)

2024-04-05 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: abandoning https://github.com/llvm/llvm-project/pull/83470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix quadratic slowdown in AST matcher parent map generation (PR #87824)

2024-04-05 Thread via cfe-commits
higher-performance wrote: @shafik @AaronBallman if you could kindly review this I'd appreciate it! https://github.com/llvm/llvm-project/pull/87824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Fix quadratic slowdown in AST matcher parent map generation (PR #87824)

2024-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (higher-performance) Changes Avoids the need to linearly re-scan all seen parent nodes to check for duplicates, which previously caused a slowdown for ancestry checks in Clang AST matchers. Fixes: #86881 --- Full diff:

[clang] Fix quadratic slowdown in AST matcher parent map generation (PR #87824)

2024-04-05 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you,

[clang] Fix quadratic slowdown in AST matcher parent map generation (PR #87824)

2024-04-05 Thread via cfe-commits
https://github.com/higher-performance created https://github.com/llvm/llvm-project/pull/87824 Avoids the need to linearly re-scan all seen parent nodes to check for duplicates, which previously caused a slowdown for ancestry checks in Clang AST matchers. Fixes: #86881 >From

[clang] [clang][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-04-05 Thread via cfe-commits
@@ -826,6 +842,14 @@ void CXXRecordDecl::addedMember(Decl *D) { ? !Constructor->isImplicit() : (Constructor->isUserProvided() || Constructor->isExplicit())) data().Aggregate = false; + + // A trivially relocatable class is a class: +

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
@@ -12252,6 +12252,8 @@ def warn_acc_clause_unimplemented def err_acc_construct_appertainment : Error<"OpenACC construct '%0' cannot be used here; it can only " "be used in a statement context">; +def err_acc_clause_appertainment +: Error<"OpenACC '%1'

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I hope #87634 will be merged soon, so you can get rid of `SemaRef.Diag()` here. https://github.com/llvm/llvm-project/pull/87821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
@@ -3594,11 +3595,26 @@ class Parser : public CodeCompletionHandler { OpenACCDirectiveKind DirKind; SourceLocation StartLoc; SourceLocation EndLoc; -// TODO OpenACC: Add Clause list here once we have a type for that. +SmallVector Clauses; // TODO

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

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

[clang] [InstallAPI] Capture & compare load commands that may differ per arch slice (PR #87674)

2024-04-05 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/87674 >From 7ef1a803c10cfef8f577a4e439221d778215464a Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 27 Mar 2024 12:17:01 -0400 Subject: [PATCH 1/3] [InstallAPI] Capture and compare load commands that may

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-04-05 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-04-05 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-04-05 Thread zhijian lin via cfe-commits
@@ -0,0 +1,350 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 + +// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -fcomplex-ppc-gnu-abi \ +// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-GNU-DEF +//

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-04-05 Thread zhijian lin via cfe-commits
@@ -5585,6 +5585,15 @@ void Clang::ConstructJob(Compilation , const JobAction , } } + if (Arg *A = Args.getLastArg(options::OPT_fcomplex_ppc_gnu_abi)) { +if (!TC.getTriple().isPPC32() || !TC.getTriple().isOSBinFormatELF()) { +

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-04-05 Thread zhijian lin via cfe-commits
@@ -396,12 +405,80 @@ CharUnits PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const { return CharUnits::fromQuantity(4); } +ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(uint64_t ) const { + llvm::Type *ElemTy; + unsigned RegsNeeded; // Registers Needed for

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-04-05 Thread zhijian lin via cfe-commits
@@ -0,0 +1,350 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 + +// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -fcomplex-ppc-gnu-abi \ +// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-GNU-DEF +//

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-04-05 Thread zhijian lin via cfe-commits
@@ -396,12 +405,80 @@ CharUnits PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const { return CharUnits::fromQuantity(4); } +ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(uint64_t ) const { + llvm::Type *ElemTy; + unsigned RegsNeeded; // Registers Needed for

  1   2   3   4   >