[clang] [clang][AMDGPU] Don't define feature macros on host code (PR #83558)

2024-03-03 Thread Pierre van Houtryve via cfe-commits
https://github.com/Pierre-vh closed https://github.com/llvm/llvm-project/pull/83558 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][vfs] Allow root directory remap. Fix assertion failure. (PR #83766)

2024-03-03 Thread via cfe-commits
https://github.com/yelleyee updated https://github.com/llvm/llvm-project/pull/83766 >From b4e8c6825f39c0748cef53b590a494970409aae9 Mon Sep 17 00:00:00 2001 From: yelleyee Date: Mon, 4 Mar 2024 05:32:13 + Subject: [PATCH] [llvm][vfs] Allow root directory remap Add a new feature allowing

[clang] [llvm] [llvm][vfs] Allow root directory remap. Fix assertion failure. (PR #83766)

2024-03-03 Thread via cfe-commits
https://github.com/yelleyee updated https://github.com/llvm/llvm-project/pull/83766 >From f133ce3ee5f26f18182218949cc19ba4ff5ecd92 Mon Sep 17 00:00:00 2001 From: yelleyee Date: Mon, 4 Mar 2024 05:32:13 + Subject: [PATCH] [llvm][vfs] Allow root directory remap Add a new feature allowing

[clang] [clang][StaticAnalyzer] fix function evalCall() typo in CheckerDocumentation (PR #83677)

2024-03-03 Thread via cfe-commits
https://github.com/mzyKi closed https://github.com/llvm/llvm-project/pull/83677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8715f25 - [clang][StaticAnalyzer] fix function evalCall() typo in CheckerDocumentation (#83677)

2024-03-03 Thread via cfe-commits
Author: Exile Date: 2024-03-04T15:20:24+08:00 New Revision: 8715f256911786520bb727ce067098d7082ac45c URL: https://github.com/llvm/llvm-project/commit/8715f256911786520bb727ce067098d7082ac45c DIFF: https://github.com/llvm/llvm-project/commit/8715f256911786520bb727ce067098d7082ac45c.diff LOG: [c

[clang] [clang][RISCV] Support function attribute __attribute__((target("+attr"))) (PR #83674)

2024-03-03 Thread Piyou Chen via cfe-commits
@@ -0,0 +1,41 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 -triple riscv64 -S -verify %s + +// REQUIRES: riscv-registered-target +#include + +void test_builtin() { + __riscv_vsetvl_e8m8(1); // expected-error {{'__builtin_r

[clang] [clang][RISCV] Support function attribute __attribute__((target("+attr"))) (PR #83674)

2024-03-03 Thread Piyou Chen via cfe-commits
https://github.com/BeMg edited https://github.com/llvm/llvm-project/pull/83674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add __builtin_start_object_lifetime builtin. (PR #82776)

2024-03-03 Thread via cfe-commits
cor3ntin wrote: I am a bit concerned that this does not actually have the desired semantics at all, but @zygoloid seemed to be "happy" with it. I will admit I struggle understanding the motivation of adding a builtin that does...less than it should (when it should do something). Similarly, d

[clang] [clang][RISCV] Support function attribute __attribute__((target("+attr"))) (PR #83674)

2024-03-03 Thread Piyou Chen via cfe-commits
@@ -463,7 +463,8 @@ ParsedTargetAttr RISCVTargetInfo::parseTargetAttr(StringRef Features) const { Ret.Duplicate = "tune="; Ret.Tune = AttrString; -} +} else if (Feature.starts_with("+")) BeMg wrote: This code section will make clang vio

[clang] [llvm] [PowerPC] Add intrinsics for rldimi/rlwimi/rlwnm (PR #82968)

2024-03-03 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises updated https://github.com/llvm/llvm-project/pull/82968 >From a06fa5e18313ad50019d50006e34a6b8249d95cd Mon Sep 17 00:00:00 2001 From: Qiu Chaofan Date: Mon, 26 Feb 2024 16:32:28 +0800 Subject: [PATCH 1/4] [PowerPC] Add intrinsics for rldimi/rlwimi/rlwnm These built

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/83709 >From 91d6e4c6e0ae2e1d79edf496df22978a4e1f3e1a Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 2 Mar 2024 22:08:29 -0800 Subject: [PATCH 1/5] [clang-format] Handle common C++ non-keyword types as such Fixes #

[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-03-03 Thread Chuanqi Xu via cfe-commits
@@ -72,6 +72,10 @@ sections with improvements to Clang's support for those languages. C++ Language Changes +C++14 Feature Support +^ +- Sized deallocation is enabled by default in C++14 onwards. ChuanqiXu9 wrote: It m

[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-03-03 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,44 @@ +//===--- SizedDellocation.h - Sized Deallocation *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-03-03 Thread Wang Pengcheng via cfe-commits
https://github.com/wangpc-pp edited https://github.com/llvm/llvm-project/pull/83774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-03-03 Thread Wang Pengcheng via cfe-commits
https://github.com/wangpc-pp edited https://github.com/llvm/llvm-project/pull/83774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-03-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy @llvm/pr-subscribers-clang @llvm/pr-subscribers-libcxx Author: Wang Pengcheng (wangpc-pp) Changes Since C++14 has been released for about nine years and most standard libraries have implemented sized deallocation functions, it's time to make t

[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-03-03 Thread Wang Pengcheng via cfe-commits
https://github.com/wangpc-pp created https://github.com/llvm/llvm-project/pull/83774 Since C++14 has been released for about nine years and most standard libraries have implemented sized deallocation functions, it's time to make this feature default again. This is another try of https://reviews

[clang] [llvm] [llvm][vfs] Allow root directory remap. Fix assertion failure. (PR #83766)

2024-03-03 Thread via cfe-commits
yelleyee wrote: Refinement: The current implementation suggests that the top `remap-entry` node must be a directory in the tree, which is not consistent with the rest of the tree design. In the reset nodes of the tree, both `directory` and `directory-remap` should be allowed. Therefore, th

[clang] [clang][AMDGPU] Don't define feature macros on host code (PR #83558)

2024-03-03 Thread Matt Arsenault via cfe-commits
@@ -6,32 +6,32 @@ // R600-based processors. // -// RUN: %clang -E -dM -target r600 -mcpu=r600 %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,R600 %s -DCPU=r600 -// RUN: %clang -E -dM -target r600 -mcpu=rv630 %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,R600 %s -DCPU=r600 -

[clang] [llvm] [llvm][vfs] Allow root directory remap. Fix assertion failure. (PR #83766)

2024-03-03 Thread via cfe-commits
https://github.com/yelleyee edited https://github.com/llvm/llvm-project/pull/83766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][vfs] Allow root directory remap (PR #83766)

2024-03-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-llvm-support Author: None (yelleyee) Changes Add a new feature allowing root(/) directory remap by breaking the assumption that remap root must be a directory. Now the config below will be allowed. Directory-re

[clang] [llvm] [llvm][vfs] Allow root directory remap (PR #83766)

2024-03-03 Thread via cfe-commits
https://github.com/yelleyee created https://github.com/llvm/llvm-project/pull/83766 Add a new feature allowing root(/) directory remap by breaking the assumption that remap root must be a directory. Now the config below will be allowed. Directory-remap config of root(/) is not a

[clang-tools-extra] [clangd] [HeuristicResolver] Protect against infinite recursion on DependentNameTypes (PR #83542)

2024-03-03 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/83542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] e6e53ca - [clangd] [HeuristicResolver] Protect against infinite recursion on DependentNameTypes (#83542)

2024-03-03 Thread via cfe-commits
Author: Nathan Ridge Date: 2024-03-04T00:12:56-05:00 New Revision: e6e53ca8470d719882539359ebe3ad8b442a8cb0 URL: https://github.com/llvm/llvm-project/commit/e6e53ca8470d719882539359ebe3ad8b442a8cb0 DIFF: https://github.com/llvm/llvm-project/commit/e6e53ca8470d719882539359ebe3ad8b442a8cb0.diff

[clang-tools-extra] [clangd] [HeuristicResolver] Protect against infinite recursion on DependentNameTypes (PR #83542)

2024-03-03 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > I don't have any other concerns about the refactor, so feel free to land it > or wait for other folks' opinions. Thank you for reviewing! I'm going to merge this sooner rather than later, since due to the severe nature of the bug (crash on standard library headers), I'

[clang-tools-extra] [clangd] [HeuristicResolver] Protect against infinite recursion on DependentNameTypes (PR #83542)

2024-03-03 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Updated patch with two changes: * Added the `even`/`odd` exampls as a second test case * Elaborated on the problem and solution in the commit message https://github.com/llvm/llvm-project/pull/83542 ___ cfe-commits mailing list

[clang-tools-extra] [clangd] [HeuristicResolver] Protect against infinite recursion on DependentNameTypes (PR #83542)

2024-03-03 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/83542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HIP] add --offload-compression-level= option (PR #83605)

2024-03-03 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu edited https://github.com/llvm/llvm-project/pull/83605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HIP] add --offload-compression-level= option (PR #83605)

2024-03-03 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu edited https://github.com/llvm/llvm-project/pull/83605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [HeuristicResolver] Protect against infinite recursion on DependentNameTypes (PR #83542)

2024-03-03 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/83542 >From 1495cd55329d9d9d6ef7f61a9dc3f3cc48a72dac Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Fri, 1 Mar 2024 03:27:51 -0500 Subject: [PATCH] [clangd] [HeuristicResolver] Protect against infinite recur

[clang] [llvm] [HIP] change compress level (PR #83605)

2024-03-03 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/83605 >From f846e24d2ac287f6f9466615536c4f53f6d0e0ed Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Fri, 1 Mar 2024 13:16:45 -0500 Subject: [PATCH] [HIP] add --offload-compression-level= option Added --offloa

[clang] [llvm] [PowerPC] Add intrinsics for rldimi/rlwimi/rlwnm (PR #82968)

2024-03-03 Thread Chen Zheng via cfe-commits
@@ -58,3 +58,18 @@ entry: %8 = or i64 %6, %7 ret i64 %8 } + +define i64 @rldimi_intrinsic(i64 %a) { +; CHECK-LABEL: rldimi_intrinsic: +; CHECK: # %bb.0: +; CHECK-NEXT:rldimi 3, 3, 8, 0 +; CHECK-NEXT:rldimi 3, 3, 16, 0 +; CHECK-NEXT:rldimi 3, 3, 32, 0 +; CH

[clang] [llvm] [PowerPC] Add intrinsics for rldimi/rlwimi/rlwnm (PR #82968)

2024-03-03 Thread Qiu Chaofan via cfe-commits
@@ -1,61 +1,111 @@ -; All of these ands and shifts should be folded into rlwimi's -; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -o %t -; RUN: not grep and %t -; RUN: not grep srawi %t -; RUN: not grep srwi %t -; RUN: not grep slwi %t -; RUN: grep rlwinm %t | count 8 +; N

[clang] [llvm] [PowerPC] Add intrinsics for rldimi/rlwimi/rlwnm (PR #82968)

2024-03-03 Thread Chen Zheng via cfe-commits
@@ -1,61 +1,111 @@ -; All of these ands and shifts should be folded into rlwimi's -; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -o %t -; RUN: not grep and %t -; RUN: not grep srawi %t -; RUN: not grep srwi %t -; RUN: not grep slwi %t -; RUN: grep rlwinm %t | count 8 +; N

[clang] [llvm] [PowerPC] Add intrinsics for rldimi/rlwimi/rlwnm (PR #82968)

2024-03-03 Thread Qiu Chaofan via cfe-commits
@@ -1,61 +1,111 @@ -; All of these ands and shifts should be folded into rlwimi's -; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -o %t -; RUN: not grep and %t -; RUN: not grep srawi %t -; RUN: not grep srwi %t -; RUN: not grep slwi %t -; RUN: grep rlwinm %t | count 8 +; N

[clang] [llvm] [PowerPC] Add intrinsics for rldimi/rlwimi/rlwnm (PR #82968)

2024-03-03 Thread Qiu Chaofan via cfe-commits
@@ -58,3 +58,18 @@ entry: %8 = or i64 %6, %7 ret i64 %8 } + +define i64 @rldimi_intrinsic(i64 %a) { +; CHECK-LABEL: rldimi_intrinsic: +; CHECK: # %bb.0: +; CHECK-NEXT:rldimi 3, 3, 8, 0 +; CHECK-NEXT:rldimi 3, 3, 16, 0 +; CHECK-NEXT:rldimi 3, 3, 32, 0 +; CH

[clang] [llvm] [PowerPC] Add intrinsics for rldimi/rlwimi/rlwnm (PR #82968)

2024-03-03 Thread Chen Zheng via cfe-commits
chenzheng1030 wrote: The failure in the buildkite should be unrelated. But would be better to double confirm. https://github.com/llvm/llvm-project/pull/82968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [llvm] [PowerPC] Add intrinsics for rldimi/rlwimi/rlwnm (PR #82968)

2024-03-03 Thread Chen Zheng via cfe-commits
@@ -1,70 +1,117 @@ -; All of these ands and shifts should be folded into rlwimi's -; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep and -; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep rlwimi | count 8 +; NOTE: Assertions have been autogenerated by u

[clang] [llvm] [PowerPC] Add intrinsics for rldimi/rlwimi/rlwnm (PR #82968)

2024-03-03 Thread Chen Zheng via cfe-commits
@@ -1,61 +1,111 @@ -; All of these ands and shifts should be folded into rlwimi's -; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -o %t -; RUN: not grep and %t -; RUN: not grep srawi %t -; RUN: not grep srwi %t -; RUN: not grep slwi %t -; RUN: grep rlwinm %t | count 8 +; N

[clang] [llvm] [PowerPC] Add intrinsics for rldimi/rlwimi/rlwnm (PR #82968)

2024-03-03 Thread Chen Zheng via cfe-commits
@@ -1,61 +1,111 @@ -; All of these ands and shifts should be folded into rlwimi's -; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -o %t -; RUN: not grep and %t -; RUN: not grep srawi %t -; RUN: not grep srwi %t -; RUN: not grep slwi %t -; RUN: grep rlwinm %t | count 8 +; N

[clang] [llvm] [PowerPC] Add intrinsics for rldimi/rlwimi/rlwnm (PR #82968)

2024-03-03 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 edited https://github.com/llvm/llvm-project/pull/82968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Add intrinsics for rldimi/rlwimi/rlwnm (PR #82968)

2024-03-03 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 approved this pull request. LGTM except two comments in the case change. One is a nit and the other one should be other issue unrelated to this patch. Thanks for implementing this. https://github.com/llvm/llvm-project/pull/82968

[clang] [llvm] [PowerPC] Add intrinsics for rldimi/rlwimi/rlwnm (PR #82968)

2024-03-03 Thread Chen Zheng via cfe-commits
@@ -58,3 +58,18 @@ entry: %8 = or i64 %6, %7 ret i64 %8 } + +define i64 @rldimi_intrinsic(i64 %a) { +; CHECK-LABEL: rldimi_intrinsic: +; CHECK: # %bb.0: +; CHECK-NEXT:rldimi 3, 3, 8, 0 +; CHECK-NEXT:rldimi 3, 3, 16, 0 +; CHECK-NEXT:rldimi 3, 3, 32, 0 +; CH

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/83709 >From 91d6e4c6e0ae2e1d79edf496df22978a4e1f3e1a Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 2 Mar 2024 22:08:29 -0800 Subject: [PATCH 1/4] [clang-format] Handle common C++ non-keyword types as such Fixes #

[clang] 938ddbf - [Driver, Darwin] Simplify libc++ include path after #80527. NFC

2024-03-03 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-03-03T18:30:17-08:00 New Revision: 938ddbf349276c6ded6ef2d65432f41c512a86c6 URL: https://github.com/llvm/llvm-project/commit/938ddbf349276c6ded6ef2d65432f41c512a86c6 DIFF: https://github.com/llvm/llvm-project/commit/938ddbf349276c6ded6ef2d65432f41c512a86c6.diff

[clang] 2b5cd8b - [Driver] Remove InstallDir and getInstalledDir. NFC

2024-03-03 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-03-03T18:10:46-08:00 New Revision: 2b5cd8be3af43e5aa5b76b6aeb1edd3141b803ca URL: https://github.com/llvm/llvm-project/commit/2b5cd8be3af43e5aa5b76b6aeb1edd3141b803ca DIFF: https://github.com/llvm/llvm-project/commit/2b5cd8be3af43e5aa5b76b6aeb1edd3141b803ca.diff

[clang] [clang] Add `intrin0.h` header to mimic `intrin0.h` used by MSVC STL for clang-cl (PR #75711)

2024-03-03 Thread Max Winkler via cfe-commits
MaxEW707 wrote: Just want to say thanks for everyone taking the time to review the PR and providing feedback :). Looking forward to using this in the next release of clang-cl. > I'm a bit worried that we don't have any test coverage for this file to begin > with, so it's a bit hard to validate

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Krzysztof Parzyszek via cfe-commits
@@ -231,6 +244,8 @@ static void EmitDirectivesDecl(RecordKeeper &Records, raw_ostream &OS) { OS << "bool isAllowedClauseForDirective(Directive D, " << "Clause C, unsigned Version);\n"; OS << "\n"; + OS << "const llvm::SmallVector &getLeafConstructs(Directive D);\n";

[clang-tools-extra] [clang-tidy] Add bugprone-suspicious-stringview-data-usage check (PR #83716)

2024-03-03 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/83716 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Krzysztof Parzyszek via cfe-commits
@@ -435,6 +450,213 @@ static void GenerateIsAllowedClause(const DirectiveLanguage &DirLang, OS << "}\n"; // End of function isAllowedClauseForDirective } +// Generate the getLeafConstructs function implementation. +static void GenerateGetLeafConstructs(const DirectiveLangua

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev requested changes to this pull request. https://github.com/llvm/llvm-project/pull/83625 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Alexey Bataev via cfe-commits
@@ -435,6 +450,213 @@ static void GenerateIsAllowedClause(const DirectiveLanguage &DirLang, OS << "}\n"; // End of function isAllowedClauseForDirective } +// Generate the getLeafConstructs function implementation. +static void GenerateGetLeafConstructs(const DirectiveLangua

[clang-tools-extra] [clang-tidy] Let `bugprone-use-after-move` also handle calls to `std::forward` (PR #82673)

2024-03-03 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/82673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-03-03 Thread Phoebe Wang via cfe-commits
phoebewang wrote: Ping~ https://github.com/llvm/llvm-project/pull/83136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Alexey Bataev via cfe-commits
@@ -231,6 +244,8 @@ static void EmitDirectivesDecl(RecordKeeper &Records, raw_ostream &OS) { OS << "bool isAllowedClauseForDirective(Directive D, " << "Clause C, unsigned Version);\n"; OS << "\n"; + OS << "const llvm::SmallVector &getLeafConstructs(Directive D);\n";

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Krzysztof Parzyszek via cfe-commits
@@ -231,6 +244,8 @@ static void EmitDirectivesDecl(RecordKeeper &Records, raw_ostream &OS) { OS << "bool isAllowedClauseForDirective(Directive D, " << "Clause C, unsigned Version);\n"; OS << "\n"; + OS << "const llvm::SmallVector &getLeafConstructs(Directive D);\n";

[clang] [ObjC] Check entire chain of superclasses to see if class layout is statically known (PR #81335)

2024-03-03 Thread via cfe-commits
AtariDreams wrote: > > @JOE1994 Thoughts on this? > > > > I'm not an ideal reviewer for this as I'm unfamiliar with ObjC side of Clang, > > but I'll come back to leave a review and to help merge this if this doesn't > get merged by the end of today :) Alright. Thank you so much! https://gi

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Alexey Bataev via cfe-commits
@@ -231,6 +244,8 @@ static void EmitDirectivesDecl(RecordKeeper &Records, raw_ostream &OS) { OS << "bool isAllowedClauseForDirective(Directive D, " << "Clause C, unsigned Version);\n"; OS << "\n"; + OS << "const llvm::SmallVector &getLeafConstructs(Directive D);\n";

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Krzysztof Parzyszek via cfe-commits
@@ -231,6 +244,8 @@ static void EmitDirectivesDecl(RecordKeeper &Records, raw_ostream &OS) { OS << "bool isAllowedClauseForDirective(Directive D, " << "Clause C, unsigned Version);\n"; OS << "\n"; + OS << "const llvm::SmallVector &getLeafConstructs(Directive D);\n";

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Alexey Bataev via cfe-commits
@@ -231,6 +244,8 @@ static void EmitDirectivesDecl(RecordKeeper &Records, raw_ostream &OS) { OS << "bool isAllowedClauseForDirective(Directive D, " << "Clause C, unsigned Version);\n"; OS << "\n"; + OS << "const llvm::SmallVector &getLeafConstructs(Directive D);\n";

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz edited https://github.com/llvm/llvm-project/pull/83625 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Krzysztof Parzyszek via cfe-commits
@@ -665,60 +617,45 @@ bool clang::isOpenMPTargetDataManagementDirective(OpenMPDirectiveKind DKind) { } bool clang::isOpenMPNestingTeamsDirective(OpenMPDirectiveKind DKind) { - return DKind == OMPD_teams || DKind == OMPD_teams_distribute || - DKind == OMPD_teams_distr

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz updated https://github.com/llvm/llvm-project/pull/83625 >From b62919c2ce24feb3c75a5bbecce3d6b6ee8e5b7e Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Tue, 16 Jan 2024 16:40:47 -0600 Subject: [PATCH 1/5] [Frontend] Add leaf constructs and association to Ope

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Krzysztof Parzyszek via cfe-commits
@@ -231,6 +244,8 @@ static void EmitDirectivesDecl(RecordKeeper &Records, raw_ostream &OS) { OS << "bool isAllowedClauseForDirective(Directive D, " << "Clause C, unsigned Version);\n"; OS << "\n"; + OS << "const llvm::SmallVector &getLeafConstructs(Directive D);\n";

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Alexey Bataev via cfe-commits
@@ -231,6 +244,8 @@ static void EmitDirectivesDecl(RecordKeeper &Records, raw_ostream &OS) { OS << "bool isAllowedClauseForDirective(Directive D, " << "Clause C, unsigned Version);\n"; OS << "\n"; + OS << "const llvm::SmallVector &getLeafConstructs(Directive D);\n";

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Alexey Bataev via cfe-commits
@@ -665,60 +617,45 @@ bool clang::isOpenMPTargetDataManagementDirective(OpenMPDirectiveKind DKind) { } bool clang::isOpenMPNestingTeamsDirective(OpenMPDirectiveKind DKind) { - return DKind == OMPD_teams || DKind == OMPD_teams_distribute || - DKind == OMPD_teams_distr

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Alexey Bataev via cfe-commits
@@ -341,5 +356,19 @@ def TDL_DirA : Directive<"dira"> { // IMPL-NEXT:} // IMPL-NEXT:llvm_unreachable("Invalid Tdl Directive kind"); // IMPL-NEXT: } +// IMPL-NEXT: const llvm::SmallVector &llvm::tdl::getLeafConstructs(llvm::tdl::Directive Dir) { alexe

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz updated https://github.com/llvm/llvm-project/pull/83625 >From b62919c2ce24feb3c75a5bbecce3d6b6ee8e5b7e Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Tue, 16 Jan 2024 16:40:47 -0600 Subject: [PATCH 1/4] [Frontend] Add leaf constructs and association to Ope

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz edited https://github.com/llvm/llvm-project/pull/83625 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz edited https://github.com/llvm/llvm-project/pull/83625 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Krzysztof Parzyszek via cfe-commits
@@ -619,44 +595,22 @@ bool clang::isOpenMPWorksharingDirective(OpenMPDirectiveKind DKind) { } bool clang::isOpenMPTaskLoopDirective(OpenMPDirectiveKind DKind) { - return DKind == OMPD_taskloop || DKind == OMPD_taskloop_simd || - DKind == OMPD_master_taskloop || DKind

[clang] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BS… (PR #83216)

2024-03-03 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/83216 >From 31bb7cee2eb783a242734f3778269efcdb460a4c Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Tue, 27 Feb 2024 21:07:09 -0500 Subject: [PATCH] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BSD

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/83709 >From 91d6e4c6e0ae2e1d79edf496df22978a4e1f3e1a Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 2 Mar 2024 22:08:29 -0800 Subject: [PATCH 1/3] [clang-format] Handle common C++ non-keyword types as such Fixes #

[clang] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BS… (PR #83216)

2024-03-03 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/83216 >From 6c68cdaef71eacbad4fc2f6b81d2845c08b124fd Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Tue, 27 Feb 2024 21:07:09 -0500 Subject: [PATCH] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BSD

[clang] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BS… (PR #83216)

2024-03-03 Thread Brad Smith via cfe-commits
brad0 wrote: I fixed up the tesets. https://github.com/llvm/llvm-project/pull/83216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BS… (PR #83216)

2024-03-03 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/83216 >From 35aee78eda1f3e7ac9e217982227c0769eda5ae1 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Tue, 27 Feb 2024 21:07:09 -0500 Subject: [PATCH] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BSD

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", +"size_t", "uint16_t", "uint32_t", "uint64

[clang] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BS… (PR #83216)

2024-03-03 Thread Brad Smith via cfe-commits
@@ -203,3 +203,12 @@ // RELOCATABLE-NOT: "-l // RELOCATABLE-NOT: crt{{[^./\\]+}}.o +// Check that the -X flag is passed to the linker on riscv64 brad0 wrote: When I was putting the diff together I was questioning whether I should combine the two into one ins

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", +"size_t", "uint16_t", "uint32_t", "uint64

[clang] [clang][Sema] Add diagnostics for out-of-bounds vector access (PR #76569)

2024-03-03 Thread via cfe-commits
https://github.com/implicitfield closed https://github.com/llvm/llvm-project/pull/76569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
owenca wrote: > But looking for a parenthesized single identifier addresses all of the > examples in the issue. I don't think it would work, but you are welcome to submit a patch to prove me wrong. 🙂 https://github.com/llvm/llvm-project/pull/83709

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
owenca wrote: > > This patch does not only fix formatting of C-casting to a C++ standard > > type. It correctly identifies (most of) such types and might have fixed > > other kinds of bugs. > > Sure, this patch seems like a good change. But it does not fix #83400. It does fix the example give

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

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

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Richard Smith via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", +"size_t", "uint16_t", "uint32_t", "uint64

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", +"size_t", "uint16_t", "uint32_t", "uint64

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Richard Smith via cfe-commits
zygoloid wrote: > This patch does not only fix formatting of C-casting to a C++ standard type. > It correctly identifies (most of) such types and might have fixed other kinds > of bugs. Sure, this patch seems like a good change. But it does not fix #83400. https://github.com/llvm/llvm-project

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Richard Smith via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", +"size_t", "uint16_t", "uint32_t", "uint64

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", owenca wrote: Good point abo

[clang] [ObjC] Check entire chain of superclasses to see if class layout is statically known (PR #81335)

2024-03-03 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: > @JOE1994 Thoughts on this? I'm not an ideal reviewer for this as I'm unfamiliar with ObjC side of Clang, but I'll come back to leave a review and to help merge this if this doesn't get merged by the end of the day :) https://github.com/llvm/llvm-project/pull/81335

[clang] [clang][Sema] Warn on return of pointer/reference to compound literal (PR #83741)

2024-03-03 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: > Isn't this warning a duplicate of what is already here? The diganostic warning is not emitted when `clang` is run without the `-analyze` flag. https://github.com/llvm/llvm-project/pull/83741 ___ cfe-commits mailing list cfe-commits@l

[clang] [clang][Sema] Warn on return of pointer/reference to compound literal (PR #83741)

2024-03-03 Thread via cfe-commits
https://github.com/AtariDreams commented: Isn't this warning a duplicate of what is already here? https://github.com/llvm/llvm-project/pull/83741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [clang][Sema] Warn on return of pointer/reference to compound literal (PR #83741)

2024-03-03 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 0c90e8837a9e5f27985ccaf85120083db9e1b43e fc0cb9c44ec7945f1a88420675b667167908e07c --

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
owenca wrote: > > > Another possibility to consider for the original bug: > > > `(single_identifier)` is almost certainly a cast, not redundant > > > parentheses, unless `single_identifier` names a macro argument. So I > > > wonder if that would be a better heuristic to use to fix the regressi

[clang] [ObjC] Check entire chain of superclasses to see if class layout is statically known (PR #81335)

2024-03-03 Thread via cfe-commits
AtariDreams wrote: @JOE1994 Thoughts on this? https://github.com/llvm/llvm-project/pull/81335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Warn on return of pointer/reference to compound literal (PR #83741)

2024-03-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Youngsuk Kim (JOE1994) Changes Emit a warning if pointer/reference to compound literal is returned from a function. In C, compound literals in block scope are lvalues that have automatic storage duration. In C++, compound literals in blo

[clang] [clang][Sema] Warn on return of pointer/reference to compound literal (PR #83741)

2024-03-03 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/83741 Emit a warning if pointer/reference to compound literal is returned from a function. In C, compound literals in block scope are lvalues that have automatic storage duration. In C++, compound literals in block s

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", +"size_t", "uint16_t", "uint32_t", "uint64

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", +"size_t", "uint16_t", "uint32_t", "uint64

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Richard Smith via cfe-commits
zygoloid wrote: > > Another possibility to consider for the original bug: `(single_identifier)` > > is almost certainly a cast, not redundant parentheses, unless > > `single_identifier` names a macro argument. So I wonder if that would be a > > better heuristic to use to fix the regression. >

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
owenca wrote: > Another possibility to consider for the original bug: `(single_identifier)` > is almost certainly a cast, not redundant parentheses, unless > `single_identifier` names a macro argument. So I wonder if that would be a > better heuristic to use to fix the regression. I don’t thi

  1   2   >