[clang] [llvm] [Sema] Implement support for -Wformat-signedness (PR #74440)

2024-03-21 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > I need to extend the tablegen backend ClangDiagnosticsEmitter with some > > kind of new option to handle this, right? > > Alternatively, you could probably use `DiagnosticsEngine::isIgnored` to check > if the `-Wformat-signedness` is enabled or not, and control whether

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-21 Thread Harald van Dijk via cfe-commits
hvdijk wrote: Flexible array initialization is, roughly, implemented as building a different type in which the flexible array member is replaced by an array of the right size, initializing that, and then pretending it was the original type. It does not surprise me too much that this does not w

[clang] [clang][AST][NFC] Add '[[fallthrough]]' to cases fall through (PR #85921)

2024-03-21 Thread via cfe-commits
Sirraide wrote: > Is this addressing a diagnostic you're seeing in the wild? This shouldn't be > necessary because the `case` statements are adjacent to one another with only > comments/whitespace between them: https://godbolt.org/z/oM7x65hq9 > > (I'd like to understand the motivation better b

[clang] [clang][AST][NFC] Add '[[fallthrough]]' to cases fall through (PR #85921)

2024-03-21 Thread via cfe-commits
Sirraide wrote: Admittedly, it doesn’t seem to be too common, and most other occurrences of this seem to be in LLVM proper and not in Clang. https://github.com/llvm/llvm-project/pull/85921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [clang][AST][NFC] Add '[[fallthrough]]' to cases fall through (PR #85921)

2024-03-21 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > E.g: > > https://github.com/llvm/llvm-project/blob/50801f1095d33e712c3a51fdeef82569bd09007f/clang/lib/Interpreter/IncrementalParser.cpp#L141-L151 I think this is a demonstration of exactly what we *don't* want to see in the code base. That's just purely noise IMO. https:

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread Daniel M. Katz via cfe-commits
katzdm wrote: @Sirraide Thanks for the quick review! I've applied your feedback. Here is an example error message with the patch applied: ``` test.cpp:4:20: error: namespace alias must be a single identifier 4 | namespace alias::extra::qualifiers = ::myns; |^~~~

[clang] [llvm] Update documentation and release notes for llvm-profgen COFF support (PR #84864)

2024-03-21 Thread Tim Creech via cfe-commits
https://github.com/tcreech-intel updated https://github.com/llvm/llvm-project/pull/84864 >From 4dc108d0d290ee5fd6a73c029c051fdb2215d00a Mon Sep 17 00:00:00 2001 From: Tim Creech Date: Mon, 11 Mar 2024 22:35:59 -0400 Subject: [PATCH 1/5] Update documentation and release notes for llvm-profgen C

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread Daniel M. Katz via cfe-commits
https://github.com/katzdm updated https://github.com/llvm/llvm-project/pull/86122 >From 319b7d99b4010514a1680ffd99fb0586b5e7221d Mon Sep 17 00:00:00 2001 From: Dan Katz Date: Thu, 21 Mar 2024 09:47:04 -0400 Subject: [PATCH 1/2] Raise an error on namespace aliases with qualified names. Current

[clang] [llvm] Reapply "[analyzer] Accept C library functions from the `std` namespace" again (PR #85791)

2024-03-21 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus approved this pull request. Lets hope it works fine this time around :) https://github.com/llvm/llvm-project/pull/85791 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [llvm] Update documentation and release notes for llvm-profgen COFF support (PR #84864)

2024-03-21 Thread Tim Creech via cfe-commits
tcreech-intel wrote: > please resolve the conflicts. Thanks for the review, @williamweixiao. I've resolved the conflicts in 2312821. https://github.com/llvm/llvm-project/pull/84864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [llvm] [InstCombine] Canonicalize `(sitofp x)` -> `(uitofp x)` if `x >= 0` (PR #82404)

2024-03-21 Thread via cfe-commits
goldsteinn wrote: See: https://github.com/llvm/llvm-project/pull/86141 which adds `nneg` flag to IR. Once that gets in I have patches for instcombine,cvp,sccp to do the transform. https://github.com/llvm/llvm-project/pull/82404 ___ cfe-commits mailin

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread Daniel M. Katz via cfe-commits
https://github.com/katzdm updated https://github.com/llvm/llvm-project/pull/86122 >From 319b7d99b4010514a1680ffd99fb0586b5e7221d Mon Sep 17 00:00:00 2001 From: Dan Katz Date: Thu, 21 Mar 2024 09:47:04 -0400 Subject: [PATCH 1/3] Raise an error on namespace aliases with qualified names. Current

[clang] [llvm] Reapply "[analyzer] Accept C library functions from the `std` namespace" again (PR #85791)

2024-03-21 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: NagyDonat wrote: I'll delay reapplying this commit a bit because I realized that it has minor unintended side effects in MallocChecker. https://github.com/llvm/llvm-project/pull/85791 ___ cfe-commits

[clang] Add `clang_getCursorCallExprKind` to get the underlying type of CallExpr (PR #86143)

2024-03-21 Thread via cfe-commits
https://github.com/16bit-ykiko created https://github.com/llvm/llvm-project/pull/86143 Currently, libclang only has the CursorKind: `CXCursor_CallExpr`. Any class inherited from CallExpr is reported as CallExpr. the core code is [here](https://github.com/llvm/llvm-project/blob/main/clang/tool

[clang] Add `clang_getCursorCallExprKind` to get the underlying type of CallExpr (PR #86143)

2024-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: ykiko (16bit-ykiko) Changes Currently, libclang only has the CursorKind: `CXCursor_CallExpr`. Any class inherited from CallExpr is reported as CallExpr. the core code is [here](https://github.com/llvm/llvm-project/blob/main/clang/tools/l

[clang] Add `clang_getCursorCallExprKind` to get the underlying type of CallExpr (PR #86143)

2024-03-21 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 f5c90f3000bc75a344bf01bd4e0401e3fb7f9453 36a7389c7c9c9668146a04f66af22e1f7be0dbb7 --

[clang] [llvm] [InstallAPI] Report exports discovered in binary but not in interface (PR #86025)

2024-03-21 Thread Juergen Ributzka via cfe-commits
@@ -520,5 +515,136 @@ void DylibVerifier::VerifierContext::emitDiag( Report(); } +// The existence of weak-defined RTTI can not always be inferred from the +// header files because they can be generated as part of an implementation +// file. +// InstallAPI doesn't warn about

[clang] [llvm] [InstallAPI] Report exports discovered in binary but not in interface (PR #86025)

2024-03-21 Thread Juergen Ributzka via cfe-commits
@@ -21,6 +21,9 @@ CHECK-NEXT: CPP.h:5:7: error: declaration has external linkage, but symbol has i CHECK-NEXT: CPP.h:6:7: error: dynamic library symbol '(weak-def) Bar::init()' is weak defined, but its declaration is not CHECK-NEXT: int init(); CHECK-NEXT: ^ +CHECK-NE

[clang] [llvm] [InstallAPI] Report exports discovered in binary but not in interface (PR #86025)

2024-03-21 Thread Juergen Ributzka via cfe-commits
@@ -520,5 +515,136 @@ void DylibVerifier::VerifierContext::emitDiag( Report(); } +// The existence of weak-defined RTTI can not always be inferred from the +// header files because they can be generated as part of an implementation +// file. +// InstallAPI doesn't warn about

[clang] Split -Wcast-function-type into a separate group (PR #86131)

2024-03-21 Thread Nathan Chancellor via cfe-commits
nathanchance wrote: This seems reasonable to me. From the perspective of the Linux kernel, this seems like it should be a no-op, as we enable `-Wcast-function-type` and disable `-Wcast-function-type-strict` (under a normal build, it is on with `W=1`) explicitly: ``` $ rg 'cast-function-type(-

[clang] Add `clang_getCursorCallExprKind` to get the underlying type of CallExpr (PR #86143)

2024-03-21 Thread via cfe-commits
https://github.com/16bit-ykiko updated https://github.com/llvm/llvm-project/pull/86143 >From 32d4fc35f3d52b54e308b76c00c292497afe9621 Mon Sep 17 00:00:00 2001 From: ykiko Date: Fri, 22 Mar 2024 00:00:30 +0800 Subject: [PATCH 1/2] add `clang_getCursorCallExprKind` to get the underlying type of

[clang] [llvm] [InstallAPI] Report exports discovered in binary but not in interface (PR #86025)

2024-03-21 Thread Juergen Ributzka via cfe-commits
@@ -520,5 +515,136 @@ void DylibVerifier::VerifierContext::emitDiag( Report(); } +// The existence of weak-defined RTTI can not always be inferred from the +// header files because they can be generated as part of an implementation +// file. +// InstallAPI doesn't warn about

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-21 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/83027 From a061464b75ac02c21e5d74fc4dff8d8afdbba66b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Wed, 20 Mar 2024 10:49:08 +0100 Subject: [PATCH 01/22]

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-21 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -376,3 +377,122 @@ void fflush_on_open_failed_stream(void) { } fclose(F); } + +void getline_null_file() { + char *buffer = NULL; + size_t n = 0; + getline(&buffer, &n, NULL); // expected-warning {{Stream pointer might be NULL}} +} + +void getdelim_null_file() { + ch

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-21 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -376,3 +377,122 @@ void fflush_on_open_failed_stream(void) { } fclose(F); } + +void getline_null_file() { + char *buffer = NULL; + size_t n = 0; + getline(&buffer, &n, NULL); // expected-warning {{Stream pointer might be NULL}} +} + +void getdelim_null_file() { + ch

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-21 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -376,3 +377,122 @@ void fflush_on_open_failed_stream(void) { } fclose(F); } + +void getline_null_file() { + char *buffer = NULL; + size_t n = 0; + getline(&buffer, &n, NULL); // expected-warning {{Stream pointer might be NULL}} +} + +void getdelim_null_file() { + ch

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-21 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -376,3 +377,122 @@ void fflush_on_open_failed_stream(void) { } fclose(F); } + +void getline_null_file() { + char *buffer = NULL; + size_t n = 0; + getline(&buffer, &n, NULL); // expected-warning {{Stream pointer might be NULL}} +} + +void getdelim_null_file() { + ch

[clang] [clang] Implement __builtin_{clzg,ctzg} (PR #83431)

2024-03-21 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: @overmighty do you need one of us to commit this for you? Thanks for working on it! https://github.com/llvm/llvm-project/pull/83431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] Add `clang_getCursorCallExprKind` to get the underlying type of CallExpr (PR #86143)

2024-03-21 Thread via cfe-commits
https://github.com/16bit-ykiko updated https://github.com/llvm/llvm-project/pull/86143 >From 32d4fc35f3d52b54e308b76c00c292497afe9621 Mon Sep 17 00:00:00 2001 From: ykiko Date: Fri, 22 Mar 2024 00:00:30 +0800 Subject: [PATCH 1/3] add `clang_getCursorCallExprKind` to get the underlying type of

[clang] [clang][SPIRV] Don't warn on -mcmodel (PR #86039)

2024-03-21 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks edited https://github.com/llvm/llvm-project/pull/86039 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reapply "[analyzer] Accept C library functions from the `std` namespace" again (PR #85791)

2024-03-21 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/85791 >From 3fbc8da42726aa63ad0aef7ba12141125197279b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Tue, 19 Mar 2024 14:

[clang] [clang][AST][NFC] Add '[[fallthrough]]' to cases fall through (PR #85921)

2024-03-21 Thread via cfe-commits
Sirraide wrote: > I think this is a demonstration of exactly what we _don't_ want to see in the > code base. That's just purely noise IMO. Its seem pretty unnecessary, yeah. I was fine w/ the one in this pr mainly because of the comment; my thinking was that there ought to be a reason why thi

[clang] [clang] Implement __builtin_{clzg,ctzg} (PR #83431)

2024-03-21 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers closed https://github.com/llvm/llvm-project/pull/83431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstallAPI] Report exports discovered in binary but not in interface (PR #86025)

2024-03-21 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/86025 >From 9c75bb6dac672fedef114618500cd8600501f8aa Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 20 Mar 2024 15:50:01 -0700 Subject: [PATCH 1/3] [InstallAPI] Report exports discovered in binary but not

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
Sirraide wrote: > ``` > test.cpp:4:20: error: namespace alias must be a single identifier > 4 | namespace alias::extra::qualifiers = ::myns; > |^~~ > 1 error generated. > ``` Nice, that is pretty much exactly what I had in mind. https://github.c

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
https://github.com/Sirraide requested changes to this pull request. LGTM except for a minor comment wrt the release note. https://github.com/llvm/llvm-project/pull/86122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
@@ -394,6 +394,8 @@ Bug Fixes to C++ Support expression references to an entity declared outside of the lambda. (#GH64808) - Clang's __builtin_bit_cast will now produce a constant value for records with empty bases. See: (#GH82383) +- Fix an issue where a namespace alias c

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-21 Thread Kees Cook via cfe-commits
kees wrote: Ah, well, regardless, I think I found where the `StructuredList->setInitializedFieldInUnion` was actually missing, and then I could undo my zero-init-only and everything still appears fixed. Doing a full debug build test run now... https://github.com/llvm/llvm-project/pull/84428 _

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread Daniel M. Katz via cfe-commits
@@ -394,6 +394,8 @@ Bug Fixes to C++ Support expression references to an entity declared outside of the lambda. (#GH64808) - Clang's __builtin_bit_cast will now produce a constant value for records with empty bases. See: (#GH82383) +- Fix an issue where a namespace alias c

[clang] [llvm] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
Sirraide wrote: You can ignore the merge conflicts in the release notes; it’s better to let whoever ends up merging this (probably me) take care of that when it comes to the release notes (because they get updated constantly). https://github.com/llvm/llvm-project/pull/86122 ___

[clang] [llvm] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
@@ -33,6 +33,7 @@ def get_num_tests(self, path, litConfig, localConfig): [path, "--gtest_list_tests", "--gtest_filter=-*DISABLED_*"] ) try: +localConfig.environment['DYLD_LIBRARY_PATH'] = '' Sirraide wrote: Don’t think y

[clang] [llvm] Raise an error on namespace aliases with qualified names. (PR #86122)

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

[clang] [llvm] [InstallAPI] Report exports discovered in binary but not in interface (PR #86025)

2024-03-21 Thread Cyndy Ishida via cfe-commits
@@ -21,6 +21,9 @@ CHECK-NEXT: CPP.h:5:7: error: declaration has external linkage, but symbol has i CHECK-NEXT: CPP.h:6:7: error: dynamic library symbol '(weak-def) Bar::init()' is weak defined, but its declaration is not CHECK-NEXT: int init(); CHECK-NEXT: ^ +CHECK-NE

[clang] [llvm] [InstallAPI] Report exports discovered in binary but not in interface (PR #86025)

2024-03-21 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/86025 >From 9c75bb6dac672fedef114618500cd8600501f8aa Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 20 Mar 2024 15:50:01 -0700 Subject: [PATCH 1/4] [InstallAPI] Report exports discovered in binary but not

[clang] [llvm] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 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 8e5de66af3da8c2fc79b8fe2cbc26f94b677434d...c5997eedca3ada4c1d644ad41159933c3b8da051 llvm/

[clang] c1c2551 - [clang] Implement __builtin_{clzg,ctzg} (#83431)

2024-03-21 Thread via cfe-commits
Author: OverMighty Date: 2024-03-21T09:33:16-07:00 New Revision: c1c2551a2876f536b5a06f48fa809aeedbc3d7ba URL: https://github.com/llvm/llvm-project/commit/c1c2551a2876f536b5a06f48fa809aeedbc3d7ba DIFF: https://github.com/llvm/llvm-project/commit/c1c2551a2876f536b5a06f48fa809aeedbc3d7ba.diff LO

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

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

[clang] [llvm] [CodeGen][LLVM] Make the `va_list` related intrinsics generic. (PR #85460)

2024-03-21 Thread Alex Voicu via cfe-commits
@@ -700,10 +700,13 @@ class MSBuiltin { //===--- Variable Argument Handling Intrinsics ===// // -def int_vastart : DefaultAttrsIntrinsic<[], [llvm_ptr_ty], [], "llvm.va_start">; -def int_vacopy : DefaultAttrsIntrinsic<[], [llvm_ptr_ty, llvm_ptr_t

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread Daniel M. Katz via cfe-commits
https://github.com/katzdm updated https://github.com/llvm/llvm-project/pull/86122 >From 1998809477ce9ef03516278e1f0e9084426ea7f2 Mon Sep 17 00:00:00 2001 From: Dan Katz Date: Thu, 21 Mar 2024 09:47:04 -0400 Subject: [PATCH 1/4] Raise an error on namespace aliases with qualified names. Current

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread Daniel M. Katz via cfe-commits
@@ -33,6 +33,7 @@ def get_num_tests(self, path, litConfig, localConfig): [path, "--gtest_list_tests", "--gtest_filter=-*DISABLED_*"] ) try: +localConfig.environment['DYLD_LIBRARY_PATH'] = '' katzdm wrote: Done, thanks fo

[clang] Split -Wcast-function-type into a separate group (PR #86131)

2024-03-21 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan approved this pull request. I've also tested this locally, and it resolves the issue I saw earlier on the PPC bots. https://github.com/llvm/llvm-project/pull/86131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-21 Thread Kees Cook via cfe-commits
https://github.com/kees updated https://github.com/llvm/llvm-project/pull/84428 >From eb5138b45fa450737600050ad8dabdcb27513d42 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Thu, 7 Mar 2024 17:03:09 -0800 Subject: [PATCH 1/7] [Clang][Sema]: Allow flexible arrays in unions and alone in structs

[clang] [llvm] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread Daniel M. Katz via cfe-commits
https://github.com/katzdm updated https://github.com/llvm/llvm-project/pull/86122 >From 319b7d99b4010514a1680ffd99fb0586b5e7221d Mon Sep 17 00:00:00 2001 From: Dan Katz Date: Thu, 21 Mar 2024 09:47:04 -0400 Subject: [PATCH 1/4] Raise an error on namespace aliases with qualified names. Current

[clang] [clang-format] Added AlignConsecutiveTableGenBreakingDAGArgColons option. (PR #86150)

2024-03-21 Thread Hirofumi Nakamura via cfe-commits
https://github.com/hnakamura5 created https://github.com/llvm/llvm-project/pull/86150 This is the option to specify the style of alignment of the colons inside TableGen's DAGArg. >From 4a0d3cd3d20220b7f363922b49eae8cd0c740426 Mon Sep 17 00:00:00 2001 From: hnakamura5 Date: Fri, 22 Mar 2024 01

[clang] [llvm] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
https://github.com/Sirraide requested changes to this pull request. https://github.com/llvm/llvm-project/pull/86122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Added AlignConsecutiveTableGenBreakingDAGArgColons option. (PR #86150)

2024-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format @llvm/pr-subscribers-clang Author: Hirofumi Nakamura (hnakamura5) Changes This is the option to specify the style of alignment of the colons inside TableGen's DAGArg. --- Full diff: https://github.com/llvm/llvm-project/pull/86150.diff 9

[clang] [llvm] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread Daniel M. Katz via cfe-commits
@@ -33,6 +33,7 @@ def get_num_tests(self, path, litConfig, localConfig): [path, "--gtest_list_tests", "--gtest_filter=-*DISABLED_*"] ) try: +localConfig.environment['DYLD_LIBRARY_PATH'] = '' katzdm wrote: I did not.

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
Sirraide wrote: > > You can ignore the merge conflicts in the release notes; it’s better to let > > whoever ends up merging this (probably me) take care of that when it comes > > to the release notes (because they get updated constantly). > > Ah, missed this - already fixed it. Will ignore if

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-21 Thread Balázs Kéri via cfe-commits
@@ -376,3 +377,122 @@ void fflush_on_open_failed_stream(void) { } fclose(F); } + +void getline_null_file() { + char *buffer = NULL; + size_t n = 0; + getline(&buffer, &n, NULL); // expected-warning {{Stream pointer might be NULL}} +} + +void getdelim_null_file() { + ch

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. https://github.com/llvm/llvm-project/pull/86122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread Daniel M. Katz via cfe-commits
katzdm wrote: > You can ignore the merge conflicts in the release notes; it’s better to let > whoever ends up merging this (probably me) take care of that when it comes to > the release notes (because they get updated constantly). Ah, missed this - already fixed it. Will ignore if it happens a

[clang] [clang-format] Support of TableGen formatting. (PR #76059)

2024-03-21 Thread Hirofumi Nakamura via cfe-commits
hnakamura5 wrote: Alignment option for DAGArg: https://github.com/llvm/llvm-project/pull/86150 https://github.com/llvm/llvm-project/pull/76059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [Clang][Sema] Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-21 Thread Kees Cook via cfe-commits
https://github.com/kees edited https://github.com/llvm/llvm-project/pull/84428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-21 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/85104 >From 0f964127ed91e23f8e969e08ce680535cfeb8906 Mon Sep 17 00:00:00 2001 From: Andreas Steinhausen Date: Wed, 13 Mar 2024 17:07:53 +0100 Subject: [PATCH 01/12] Adapted MemRegion::getDescriptiveName to handle Ele

[clang] [Clang][Sema] Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-21 Thread Kees Cook via cfe-commits
https://github.com/kees updated https://github.com/llvm/llvm-project/pull/84428 >From eb5138b45fa450737600050ad8dabdcb27513d42 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Thu, 7 Mar 2024 17:03:09 -0800 Subject: [PATCH 1/7] [Clang][Sema]: Allow flexible arrays in unions and alone in structs

[clang] [llvm] goldsteinn/uitofp nneg folds and analysis (PR #86154)

2024-03-21 Thread via cfe-commits
https://github.com/goldsteinn created https://github.com/llvm/llvm-project/pull/86154 - **[InstCombine] Add canonicalization of `sitofp` -> `uitofp nneg`** - **[CVP] Add tests for adding `nneg` flag to `uitofp` and converting `sitofp` -> `uitofp nneg`; NFC** - **[CVP] Convert `sitofp` -> `uitof

[clang] [llvm] [InstCombine][CVP][SCCP] Add support for `uitofp nneg` (PR #86154)

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

[clang] [llvm] [InstCombine][CVP][SCCP] Add support for `uitofp nneg` (PR #86154)

2024-03-21 Thread via cfe-commits
goldsteinn wrote: I looked into adding support in `SCEV` but it didn't seem worth it to add complete support for `uitofp`/`sitofp` just for this. Any opinions on if I should revisit / any other passes that I should add support for? Mostly I just copied where we do the same for `zext`. https://gi

[clang] [llvm] [InstCombine][CVP][SCCP] Add support for `uitofp nneg` (PR #86154)

2024-03-21 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 4bf8dc1a0f9546afb2c13c121e34237ce16cfca6 94808c55086d48520acd77d9df3676ed210109c3 --

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

2024-03-21 Thread Thurston Dang via cfe-commits
thurstond wrote: > > I believe this patch is causing some issues on two PPC bots. Would you be > > able to help take a look? > > https://lab.llvm.org/buildbot/#/builders/57/builds/33601/steps/5/logs/stdio > > https://lab.llvm.org/buildbot/#/builders/36/builds/43759/steps/12/logs/stdio > > I g

[clang] [llvm] [InstCombine] Canonicalize `(sitofp x)` -> `(uitofp x)` if `x >= 0` (PR #82404)

2024-03-21 Thread via cfe-commits
goldsteinn wrote: > > Well, I'm not sure how proper that wold be as a reproducer, > > I extracted the mentioned test to a program: > > ``` > > #include > > > > #include "third_party/swiftshader/src/Reactor/Coroutine.hpp" > > #include "third_party/swiftshader/src/Reactor/Reactor.hpp" > > > > us

[clang] [llvm] goldsteinn/uitofp nneg folds and analysis (PR #86154)

2024-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (goldsteinn) Changes - **[InstCombine] Add canonicalization of `sitofp` -> `uitofp nneg`** - **[CVP] Add tests for adding `nneg` flag to `uitofp` and converting `sitofp` -> `uitofp nneg`; NFC** - **[CVP] Convert `sitofp` -> `uitofp nn

[clang] [llvm] [InstCombine] Canonicalize `(sitofp x)` -> `(uitofp x)` if `x >= 0` (PR #82404)

2024-03-21 Thread Craig Topper via cfe-commits
topperc wrote: > > > Well, I'm not sure how proper that wold be as a reproducer, > > > I extracted the mentioned test to a program: > > > ``` > > > #include > > > > > > #include "third_party/swiftshader/src/Reactor/Coroutine.hpp" > > > #include "third_party/swiftshader/src/Reactor/Reactor.hpp"

[clang] [llvm] [InstCombine][CVP][SCCP] Add support for `uitofp nneg` (PR #86154)

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

[clang] [libcxx] [libc++] Implement LWG3528 (`make_from_tuple` can perform (the equivalent of) a C-style cast) (PR #85263)

2024-03-21 Thread Mark de Wever via cfe-commits
https://github.com/mordante edited https://github.com/llvm/llvm-project/pull/85263 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [libc++] Implement LWG3528 (`make_from_tuple` can perform (the equivalent of) a C-style cast) (PR #85263)

2024-03-21 Thread Mark de Wever via cfe-commits
https://github.com/mordante commented: Thanks a lot! I have one minor comment after that I'm happy. I'd like to have a quick look at your fix. https://github.com/llvm/llvm-project/pull/85263 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [libcxx] [libc++] Implement LWG3528 (`make_from_tuple` can perform (the equivalent of) a C-style cast) (PR #85263)

2024-03-21 Thread Mark de Wever via cfe-commits
@@ -1386,9 +1386,19 @@ inline _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) apply(_Fn&& __f, _Tuple&& std::forward<_Tuple>(__t), typename __make_tuple_indices>>::type{})) +#if _LIBCPP_STD_VER >= 20 template inline _LIBCPP_HIDE_FROM_ABI constexpr _Tp __mak

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-21 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/85211 >From bde85e0d145049a6661afba6f4585865c5630792 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Thu, 14 Mar 2024 12:38:12 +0100 Subject: [PATCH 1/4] [analyzer] Wrap SymbolicRegions by ElementRegions before ge

[clang] [Clang][Sema] Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-21 Thread Kees Cook via cfe-commits
https://github.com/kees edited https://github.com/llvm/llvm-project/pull/84428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add `clang_getCursorCallExprKind` to get the underlying type of CallExpr (PR #86143)

2024-03-21 Thread via cfe-commits
https://github.com/16bit-ykiko updated https://github.com/llvm/llvm-project/pull/86143 >From 32d4fc35f3d52b54e308b76c00c292497afe9621 Mon Sep 17 00:00:00 2001 From: ykiko Date: Fri, 22 Mar 2024 00:00:30 +0800 Subject: [PATCH 1/4] add `clang_getCursorCallExprKind` to get the underlying type of

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-21 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/85211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstallAPI] Report exports discovered in binary but not in interface (PR #86025)

2024-03-21 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka approved this pull request. https://github.com/llvm/llvm-project/pull/86025 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Factor out built-in boolean model into an explicit module. (PR #82950)

2024-03-21 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand updated https://github.com/llvm/llvm-project/pull/82950 >From 33f753d99bbb477ad37614d29658e964aa590a80 Mon Sep 17 00:00:00 2001 From: Yitzhak Mandelbaum Date: Fri, 23 Feb 2024 20:15:36 + Subject: [PATCH 1/3] [clang][dataflow] Factor out built-in boolean model into a

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-21 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/85104 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-21 Thread via cfe-commits
github-actions[bot] wrote: @T-Gruber Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build

[clang] [clang][analyzer] Bring cplusplus.ArrayDelete out of alpha (PR #83985)

2024-03-21 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/83985 >From 881701d528255e2c49ed64f5f1df98f0f44c1d7b Mon Sep 17 00:00:00 2001 From: Viktor Date: Tue, 5 Mar 2024 09:46:26 + Subject: [PATCH] [clang][analyzer] Bring cplusplus.ArrayDelete out of alpha --- clang/d

[clang] [clang][analyzer] Bring cplusplus.ArrayDelete out of alpha (PR #83985)

2024-03-21 Thread Balazs Benics via cfe-commits
steakhal wrote: Retriggered the premerge checks. https://github.com/llvm/llvm-project/pull/83985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c877294 - [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (#85211)

2024-03-21 Thread via cfe-commits
Author: Balazs Benics Date: 2024-03-21T18:22:22+01:00 New Revision: c8772940ee4d85b1a4578b3faea7c825300ce59f URL: https://github.com/llvm/llvm-project/commit/c8772940ee4d85b1a4578b3faea7c825300ce59f DIFF: https://github.com/llvm/llvm-project/commit/c8772940ee4d85b1a4578b3faea7c825300ce59f.diff

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-21 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= ,Pol M Message-ID: In-Reply-To: Destroyerrrocket wrote: @RKSimon Hi, Sorry I have not reached out! Yes, I plan to do some work on this in the next two weeks; on a normal work week I end up way too tired to work more in the weekend,

[clang] [analyzer] Fix false double free when including 3rd-party headers with overloaded delete operator as system headers (PR #85224)

2024-03-21 Thread Balazs Benics via cfe-commits
@@ -1090,7 +1090,8 @@ static bool isStandardNewDelete(const FunctionDecl *FD) { // If the header for operator delete is not included, it's still defined // in an invalid source location. Check to make sure we don't crash. return !L.isValid() || - FD->getASTContext

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-21 Thread Balazs Benics via cfe-commits
steakhal wrote: @NagyDonat Thank you for the excellent feedback. Great recommendations, with fixes. Thanks! All applied. https://github.com/llvm/llvm-project/pull/85211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [clang] Implement __builtin_{clzg,ctzg} (PR #83431)

2024-03-21 Thread via cfe-commits
overmighty wrote: I do need one of you to commit this for me. You're welcome. :) https://github.com/llvm/llvm-project/pull/83431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 86d479f - Adapted MemRegion::getDescriptiveName to handle ElementRegions (#85104)

2024-03-21 Thread via cfe-commits
Author: T-Gruber Date: 2024-03-21T18:27:53+01:00 New Revision: 86d479fd7c837e97be116ffb9e4c92812b87360f URL: https://github.com/llvm/llvm-project/commit/86d479fd7c837e97be116ffb9e4c92812b87360f DIFF: https://github.com/llvm/llvm-project/commit/86d479fd7c837e97be116ffb9e4c92812b87360f.diff LOG:

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-21 Thread Balazs Benics via cfe-commits
steakhal wrote: I'm sorry, but I'm out of bandwidth. Maybe someone else can step up for the review. https://github.com/llvm/llvm-project/pull/83675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/86129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-21 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,82 @@ +//===--- EnumInitialValueCheck.cpp - clang-tidy ---===// +// +// 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-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-21 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,82 @@ +//===--- EnumInitialValueCheck.cpp - clang-tidy ---===// +// +// 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-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-21 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,31 @@ +//===--- EnumInitialValueCheck.h - clang-tidy ---*- 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-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Few things to consider. Overall looks +- fine. https://github.com/llvm/llvm-project/pull/86129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-21 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %check_clang_tidy %s readability-enum-initial-value %t + +enum class EError { + // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: inital value in enum EError has readability issue, explicit initialization of all of enumerators + EError_a = 1, + EError_b, +

<    1   2   3   4   >