[clang] [openmp] [OpenMP] return empty stmt for `nothing` (PR #74042)

2023-12-03 Thread Sandeep Kosuri via cfe-commits
https://github.com/sandeepkosuri closed https://github.com/llvm/llvm-project/pull/74042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ecc080c - [OpenMP] return empty stmt for `nothing` (#74042)

2023-12-03 Thread via cfe-commits
Author: Sandeep Kosuri Date: 2023-12-03T13:33:38+05:30 New Revision: ecc080c07d97f7879ce64e644cac828922a7b0d9 URL: https://github.com/llvm/llvm-project/commit/ecc080c07d97f7879ce64e644cac828922a7b0d9 DIFF: https://github.com/llvm/llvm-project/commit/ecc080c07d97f7879ce64e644cac828922a7b0d9.diff

[clang] [clang] assert fail when number of arguments in pack exceed implement… (PR #74220)

2023-12-03 Thread via cfe-commits
cor3ntin wrote: Thanks for this PR! Emitting a diag in `TransformTemplateParmRefExpr` would probably a better way to go about it. It's not clear to me that the assert` is an improvement , and adding a diag would not be a lot more work. Would that be something you would be willing to explore?

[clang] [clang] Bounds checking on unclosed parentheses, brackets or braces in Expanded Tokens (PR #69849)

2023-12-03 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: I spent a bit more time looking at this. I'd say I'm still quite far from having a complete understanding of this code, but two things occur to me: 1. `TokenBuffer` operates at the level of the preprocessor. "spelledForExpanded" is basically an operation which takes as i

[clang] [clang] Improve bit-field in ref NTTP diagnostic (PR #71077)

2023-12-03 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/71077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improve bit-field in ref NTTP diagnostic (PR #71077)

2023-12-03 Thread via cfe-commits
@@ -5992,6 +5992,15 @@ static ExprResult BuildConvertedConstantExpression(Sema &S, Expr *From, /*InOverloadResolution=*/false, /*AllowObjCWritebackConversion=*/false, /*AllowE

[clang] [clang] Improve bit-field in ref NTTP diagnostic (PR #71077)

2023-12-03 Thread via cfe-commits
https://github.com/cor3ntin commented: Can you add a release note? Thanks. Do we need more tests in other contexts where a converted constant expression is used? https://github.com/llvm/llvm-project/pull/71077 ___ cfe-commits mailing list cfe-commits@

[clang] [clang-format] Add "three dot" diff option to git-clang-format (PR #74230)

2023-12-03 Thread via cfe-commits
@@ -153,7 +157,10 @@ def main(): else: if len(commits) > 2: die('at most two commits allowed; %d given' % len(commits)) - changed_lines = compute_diff_and_extract_lines(commits, files, opts.staged) + changed_lines = compute_diff_and_extract_lines(commits,

[clang] Fix dr2xx clang test (PR #74223)

2023-12-03 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/74223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Remove warnings from -Wchar-subscripts for known positive constants (PR #69061)

2023-12-03 Thread via cfe-commits
cor3ntin wrote: @wheatman can you rebase again? I want to make sure CI passes before merging (and the bots were broken earlier today). Thanks. LGTM otherwise https://github.com/llvm/llvm-project/pull/69061 ___ cfe-commits mailing list cfe-commits@list

[clang] [clang][Sema] Add -Wswitch-default warning option (PR #73077)

2023-12-03 Thread via cfe-commits
cor3ntin wrote: @AaronBallman @erichkeane @shafik WDYT? https://github.com/llvm/llvm-project/pull/73077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Remove duplicates in @property using std::set (PR #74235)

2023-12-03 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/74235 Re-implement ObjCPropertyAttributeOrder using std::set for sorting and removing duplicates. (We can't use llvm::SmallSet because it's unordered.) >From 7323d9261fe8c876fe3a656a98e186af3dd0b2a0 Mon Sep 17 00:00:00

[clang] [clang-format] Remove duplicates in @property using std::set (PR #74235)

2023-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Re-implement ObjCPropertyAttributeOrder using std::set for sorting and removing duplicates. (We can't use llvm::SmallSet because it's unordered.) --- Full diff: https://github.com/llvm/llvm-project/pull/74

[llvm] [libcxx] [libunwind] [libc++] Allow running the test suite with optimizations (PR #68753)

2023-12-03 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 approved this pull request. https://github.com/llvm/llvm-project/pull/68753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Remove duplicates in @property using std::set (PR #74235)

2023-12-03 Thread Owen Pan via cfe-commits
owenca wrote: @jaredgrubb I can't add you to Reviewers. Maybe you can add yourself? https://github.com/llvm/llvm-project/pull/74235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2a3f119 - [clang-format] Fix a bug in `git-clang-format --binary` (#74176)

2023-12-03 Thread via cfe-commits
Author: Owen Pan Date: 2023-12-03T02:07:07-08:00 New Revision: 2a3f1195d61e9fc1837926aa394ea73cc6f90bee URL: https://github.com/llvm/llvm-project/commit/2a3f1195d61e9fc1837926aa394ea73cc6f90bee DIFF: https://github.com/llvm/llvm-project/commit/2a3f1195d61e9fc1837926aa394ea73cc6f90bee.diff LOG:

[clang] [clang-format] Fix a bug in `git-clang-format --binary` (PR #74176)

2023-12-03 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/74176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)

2023-12-03 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Thank you for your efforts! I scratched the surface a bit; not qualified to do an in-depth review. Can you also add a release note? https://github.com/llvm/llvm-project/pull/74155 ___ cfe-commits mailing list cfe-c

[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)

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

[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)

2023-12-03 Thread Vlad Serebrennikov via cfe-commits
@@ -498,3 +498,137 @@ CodeGenTBAA::mergeTBAAInfoForMemoryTransfer(TBAAAccessInfo DestInfo, // access type regardless of their base types. return TBAAAccessInfo::getMayAliasInfo(); } + +// Determine the aliasing kind bit-converting from type Src to type Dst. +CodeGenTBAA::A

[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)

2023-12-03 Thread Vlad Serebrennikov via cfe-commits
@@ -2026,6 +2027,137 @@ static TryCastResult TryConstCast(Sema &Self, ExprResult &SrcExpr, return TC_Success; } +// We're dereferencing E, either by turning into an RValue, or by dereferencing +// it. Check whether it's a deref of a reinterpret cast that has aliasing +// is

[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)

2023-12-03 Thread Vlad Serebrennikov via cfe-commits
@@ -37,6 +38,27 @@ class ASTConsumer { friend class SemaConsumer; +public: + /// Allow type-based aliasing information to be interrogated by the AST + /// producer (for diagnostics). + class TypeAliasing { Endilll wrote: It seems to me that we'd be bett

[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)

2023-12-03 Thread Vlad Serebrennikov via cfe-commits
@@ -498,3 +498,137 @@ CodeGenTBAA::mergeTBAAInfoForMemoryTransfer(TBAAAccessInfo DestInfo, // access type regardless of their base types. return TBAAAccessInfo::getMayAliasInfo(); } + +// Determine the aliasing kind bit-converting from type Src to type Dst. +CodeGenTBAA::A

[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)

2023-12-03 Thread Vlad Serebrennikov via cfe-commits
@@ -128,6 +128,10 @@ class DiagnosticOptions : public RefCountedBase{ /// whether -Wsystem-headers is enabled on a per-module basis. std::vector SystemHeaderWarningsModules; + /// Level of scrutiny reinterpret_casts get for type-unsafe aliasing + /// checks. Requires an

[clang] [clang][Sema] Resolving Inconsistent Arguments Panic in Variadic Template Variables (PR #70280)

2023-12-03 Thread via cfe-commits
knightXun wrote: > @knightXun code looks reasonable, ping me when you have tests and a release > note :) got it, https://github.com/llvm/llvm-project/pull/70280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [clang-tools-extra] [llvm] [ConstraintElim] Add facts implied by llvm.abs (PR #73189)

2023-12-03 Thread Alexander Shaposhnikov via cfe-commits
https://github.com/alexander-shaposhnikov updated https://github.com/llvm/llvm-project/pull/73189 >From a9e76a878edc8bc9cb81b8aa169bbbc467d32026 Mon Sep 17 00:00:00 2001 From: Alexander Shaposhnikov Date: Thu, 23 Nov 2023 00:37:08 + Subject: [PATCH] [ConstraintElim] Add a fact implied by ll

[clang] Remove warnings from -Wchar-subscripts for known positive constants (PR #69061)

2023-12-03 Thread via cfe-commits
https://github.com/wheatman updated https://github.com/llvm/llvm-project/pull/69061 >From df15b6239557edaae8b3d7f63915bad494ad674f Mon Sep 17 00:00:00 2001 From: Brian Wheatman Date: Sat, 14 Oct 2023 12:02:19 -0400 Subject: [PATCH] Remove warnings from -Wchar-subscripts for known positive cons

[clang] 599cba3 - [clang][NFC] Fill in historical data on when C++ DRs 300-399 were fixed

2023-12-03 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-12-03T16:48:53+03:00 New Revision: 599cba3e7c82f046f247aa1cae4948dbbdcb7cb3 URL: https://github.com/llvm/llvm-project/commit/599cba3e7c82f046f247aa1cae4948dbbdcb7cb3 DIFF: https://github.com/llvm/llvm-project/commit/599cba3e7c82f046f247aa1cae4948dbbdcb7cb3.

[clang] [clang][NFC] Refactor expected directives in C++ DRs 300-399 (PR #74243)

2023-12-03 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/74243 This patch continues the work started with ea5b1ef016d020c37f903d6c7d4f623be975dab8. See that commit and its corresponding PR for details. >From 49a5323663b8bc56d9720c6d2ebb9c3d686fd362 Mon Sep 17 00:00:00 2001

[clang] [clang][NFC] Refactor expected directives in C++ DRs 300-399 (PR #74243)

2023-12-03 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This PR is created only for CI purposes. https://github.com/llvm/llvm-project/pull/74243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Refactor expected directives in C++ DRs 300-399 (PR #74243)

2023-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch continues the work started with ea5b1ef016d020c37f903d6c7d4f623be975dab8. See that commit and its corresponding PR for details. --- Patch is 76.50 KiB, truncated to 20.00 KiB below, full v

[clang] Remove warnings from -Wchar-subscripts for known positive constants (PR #69061)

2023-12-03 Thread via cfe-commits
wheatman wrote: @cor3ntin done, thanks for taking a look https://github.com/llvm/llvm-project/pull/69061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bc51a36 - [clang][NFC] Refactor expected directives in C++ DRs 300-399 (#74243)

2023-12-03 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2023-12-03T18:35:49+04:00 New Revision: bc51a36fd67c9ef08259612a1a04db6be51a8b76 URL: https://github.com/llvm/llvm-project/commit/bc51a36fd67c9ef08259612a1a04db6be51a8b76 DIFF: https://github.com/llvm/llvm-project/commit/bc51a36fd67c9ef08259612a1a04db6be51a8b76.

[clang] [clang][NFC] Refactor expected directives in C++ DRs 300-399 (PR #74243)

2023-12-03 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/74243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[openmp] [clang] [mlir] [llvm] [OpenMP] Introduce the KernelLaunchEnvironment as implicit argument (PR #70401)

2023-12-03 Thread via cfe-commits
ronlieb wrote: original perf regressions seem recovered enough, thx. appreciate the info message being added for future triage... https://github.com/llvm/llvm-project/pull/70401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [clang] Improve bit-field in ref NTTP diagnostic (PR #71077)

2023-12-03 Thread Andrey Ali Khan Bolshakov via cfe-commits
https://github.com/bolshakov-a updated https://github.com/llvm/llvm-project/pull/71077 >From bc2ea1ab74b613f700b11390a4715a0f2bec10e7 Mon Sep 17 00:00:00 2001 From: Bolshakov Date: Thu, 2 Nov 2023 19:20:27 +0300 Subject: [PATCH] [clang] Improve bit-field in ref NTTP diagnostic Prior to this, a

[clang] [clang] Improve bit-field in ref NTTP diagnostic (PR #71077)

2023-12-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 9f78edbd20ed922cced9482f7791deb9899a6d82 bc2ea1ab74b613f700b11390a4715a0f2bec10e7 --

[clang] [clang] Improve bit-field in ref NTTP diagnostic (PR #71077)

2023-12-03 Thread Andrey Ali Khan Bolshakov via cfe-commits
bolshakov-a wrote: > Can you add a release note? Do you think this small diagnostic wording change is worth noting in relnotes? > Do we need more tests in other contexts where a converted constant expression > is used? Seems like constant expressions converted to references may currently only

[clang] [clang] Improve bit-field in ref NTTP diagnostic (PR #71077)

2023-12-03 Thread Andrey Ali Khan Bolshakov via cfe-commits
@@ -5992,6 +5992,15 @@ static ExprResult BuildConvertedConstantExpression(Sema &S, Expr *From, /*InOverloadResolution=*/false, /*AllowObjCWritebackConversion=*/false, /*AllowE

[clang] [clang] Improve bit-field in ref NTTP diagnostic (PR #71077)

2023-12-03 Thread Andrey Ali Khan Bolshakov via cfe-commits
https://github.com/bolshakov-a updated https://github.com/llvm/llvm-project/pull/71077 >From ff1b0d96e7beef51a082d59548c49b9c02d79eb0 Mon Sep 17 00:00:00 2001 From: Bolshakov Date: Thu, 2 Nov 2023 19:20:27 +0300 Subject: [PATCH] [clang] Improve bit-field in ref NTTP diagnostic Prior to this, a

[clang] [llvm] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

2023-12-03 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: Could you please rebase this patch on https://github.com/llvm/llvm-project/pull/74246 and add a test for https://github.com/llvm/llvm-project/issues/74242? https://github.com/llvm/llvm-project/pull/73662 ___ cfe-commits mailing list c

[flang] [clang] [flang][driver] Add -fno-fortran-main (link time) option to remove Fortran_main from link line (PR #74139)

2023-12-03 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm edited https://github.com/llvm/llvm-project/pull/74139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang] (Re-)Enable alias tags pass by default (PR #74250)

2023-12-03 Thread Tom Eccles via cfe-commits
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/74250 Enable by default for optimization levels higher than 0 (same behavior as clang). For simplicity, only forward the flag to the frontend driver when it contradicts what is implied by the optimization level. This w

[clang] [flang] [flang] (Re-)Enable alias tags pass by default (PR #74250)

2023-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tom Eccles (tblah) Changes Enable by default for optimization levels higher than 0 (same behavior as clang). For simplicity, only forward the flag to the frontend driver when it contradicts what is implied by the optimization level. Thi

[flang] [clang] [flang] (Re-)Enable alias tags pass by default (PR #74250)

2023-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Tom Eccles (tblah) Changes Enable by default for optimization levels higher than 0 (same behavior as clang). For simplicity, only forward the flag to the frontend driver when it contradicts what is implied by the optimization leve

[flang] [clang] [flang] (Re-)Enable alias tags pass by default (PR #74250)

2023-12-03 Thread Tom Eccles via cfe-commits
tblah wrote: @banach-space once this is in, I'll remove `-f[no-]alias-analysis` in a separate patch, as it didn't turn out to be as useful for debugging as I expected (the `-mllvm` option is more specific), and as you mentioned - these arguments are non-standard. https://github.com/llvm/llvm-

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-03 Thread Julian Schmidt via cfe-commits
5chmidti wrote: It looks like GitHub decided to not list all new commits in the conversation view... there are a few more in the commits tab. The newly pushed changes start at commit [refactor from using transformer to a normal check](https://github.com/llvm/llvm-project/pull/66583/commits/b1a

[clang] [clang-format] Add "three dot" diff option to git-clang-format (PR #74230)

2023-12-03 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/74230 >From ae4097b53b90e31802be0be5c8a81fb74c81efc9 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Sat, 2 Dec 2023 23:46:58 -0800 Subject: [PATCH] [clang-format] Add "three dot" diff option to git-clang-f

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-03 Thread Julian Schmidt via cfe-commits
@@ -128,169 +128,169 @@ void foo(){ const auto Actually2 = 2; bar::sqrt(Actually2); -// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: prefer std::numbers math constant [modernize-use-std-numbers] +// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: prefer 'std::numbers::sq

[clang] [clang-format] Add "three dot" diff option to git-clang-format (PR #74230)

2023-12-03 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/74230 >From ae4097b53b90e31802be0be5c8a81fb74c81efc9 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Sat, 2 Dec 2023 23:46:58 -0800 Subject: [PATCH 1/2] [clang-format] Add "three dot" diff option to git-cla

[clang] [clang-format] Add "three dot" diff option to git-clang-format (PR #74230)

2023-12-03 Thread Aiden Grossman via cfe-commits
@@ -153,7 +157,10 @@ def main(): else: if len(commits) > 2: die('at most two commits allowed; %d given' % len(commits)) - changed_lines = compute_diff_and_extract_lines(commits, files, opts.staged) + changed_lines = compute_diff_and_extract_lines(commits,

[libc] [llvm] [clang] [libcxx] [compiler-rt] [flang] Ensure `lli --force-interpreter` disables the OrcJIT too (PR #73717)

2023-12-03 Thread via cfe-commits
https://github.com/lhames approved this pull request. LGTM too. Thanks @allight! https://github.com/llvm/llvm-project/pull/73717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7882f38 - Fix documentation on PGO/coverage related options. (#73845)

2023-12-03 Thread via cfe-commits
Author: David Li Date: 2023-12-03T14:10:57-08:00 New Revision: 7882f380a234a8c0260b79290406967c851a0df2 URL: https://github.com/llvm/llvm-project/commit/7882f380a234a8c0260b79290406967c851a0df2 DIFF: https://github.com/llvm/llvm-project/commit/7882f380a234a8c0260b79290406967c851a0df2.diff LOG:

[clang] Fix documentation on PGO/coverage related options. (PR #73845)

2023-12-03 Thread David Li via cfe-commits
https://github.com/david-xl closed https://github.com/llvm/llvm-project/pull/73845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Remove duplicates in @property using std::set (PR #74235)

2023-12-03 Thread Jared Grubb via cfe-commits
https://github.com/jaredgrubb approved this pull request. Looks good to me! https://github.com/llvm/llvm-project/pull/74235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Remove duplicates in @property using std::set (PR #74235)

2023-12-03 Thread Jared Grubb via cfe-commits
https://github.com/jaredgrubb edited https://github.com/llvm/llvm-project/pull/74235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Remove duplicates in @property using std::set (PR #74235)

2023-12-03 Thread Jared Grubb via cfe-commits
@@ -171,18 +171,18 @@ TEST_F(ObjCPropertyAttributeOrderFixerTest, HandlesDuplicatedAttributes) { Style.ObjCPropertyAttributeOrder = {"a", "b", "c"}; // Just a dup and nothing else. - verifyFormat("@property(a, a) int p;", Style); + verifyFormat("@property(a) int p;", "@

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-03 Thread Aaron Puchert via cfe-commits
@@ -1544,7 +1544,10 @@ class BuildLockset : public ConstStmtVisitor { // The fact set for the function on exit. const FactSet &FunctionExitFSet; /// Maps constructed objects to `this` placeholder prior to initialization. - llvm::SmallDenseMap ConstructedObjects; + ///

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-03 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert edited https://github.com/llvm/llvm-project/pull/74020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-03 Thread Aaron Puchert via cfe-commits
@@ -1718,6 +1720,13 @@ struct TestScopedLockable { MutexLock{&mu1}, a = 5; } + void temporary2(int x) { +if (check(MutexLock{&mu1}) || x) { + +} +check(MutexLock{&mu1}); aaronpuchert wrote: The `check` here doesn't do anything, right? http

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-03 Thread Aaron Puchert via cfe-commits
@@ -1718,6 +1720,13 @@ struct TestScopedLockable { MutexLock{&mu1}, a = 5; } + void temporary2(int x) { aaronpuchert wrote: I would suggest a speaking name for the test, like `temporary_cfg`. https://github.com/llvm/llvm-project/pull/74020 ___

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-03 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert commented: I have some suggestions, but in principle this is absolutely right. Thanks for finding this and providing a fix! > The issue is that the map lives within a CFG block. It didn't cross my mind to check how long `BuildLockset` lived, I always assumed i

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-03 Thread Aaron Puchert via cfe-commits
@@ -2392,6 +2397,8 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) { for (const auto &Lock : LocksReleased) ExpectedFunctionExitSet.removeLock(FactMan, Lock); + ConstructedObjectMapTy ConstructedObjects; aaronpuchert wrote: I wonder

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-03 Thread Aaron Puchert via cfe-commits
@@ -1718,6 +1720,13 @@ struct TestScopedLockable { MutexLock{&mu1}, a = 5; } + void temporary2(int x) { +if (check(MutexLock{&mu1}) || x) { + +} aaronpuchert wrote: The `if` is probably not needed here, right? We could just write ```suggestion

[clang] [clang][Sema] Add -Wswitch-default warning option (PR #73077)

2023-12-03 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: > There is one clang-tidy check (bugprone-switch-missing-default-case) also for > this feature. This excludes enumeration types though, while GCC `-Wswitch-default` warns on them as well. (Even if all enumeration values are covered.) > whether switch statements should have

[clang] [clang][Sema] Add -Wswitch-default warning option (PR #73077)

2023-12-03 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: In the end it probably boils down to how you view an enumeration type. Is it a type with the declared enumerators as inhabitants, or is it an integer type of some length with associated symbolic constants of that type? In other words, is an enumeration a "strong" type or a

[clang] [clang] Exclude non-template classes when checking if constraint refers to containing template arguments (PR #74265)

2023-12-03 Thread via cfe-commits
https://github.com/antangelo created https://github.com/llvm/llvm-project/pull/74265 When checking if the constraint uses any enclosing template parameters for [temp.friend]p9, if a containing record is used as argument, we assume that the constraint depends on enclosing template parameters wi

[clang] [clang] Exclude non-template classes when checking if constraint refers to containing template arguments (PR #74265)

2023-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (antangelo) Changes When checking if the constraint uses any enclosing template parameters for [temp.friend]p9, if a containing record is used as argument, we assume that the constraint depends on enclosing template parameters withou

[clang] [clang] Exclude non-template classes when checking if constraint refers to containing template arguments (PR #74265)

2023-12-03 Thread via cfe-commits
https://github.com/antangelo updated https://github.com/llvm/llvm-project/pull/74265 >From a8e841657b9816a78f6eb1520c8513454fe0008b Mon Sep 17 00:00:00 2001 From: Antonio Abbatangelo Date: Tue, 28 Nov 2023 21:19:13 -0500 Subject: [PATCH 1/2] [clang] Exclude non-template classes when checking if

[llvm] [clang] [SimplifyCFG] Not folding branch in loop header with constant iterations (PR #74268)

2023-12-03 Thread via cfe-commits
https://github.com/xiangzh1 created https://github.com/llvm/llvm-project/pull/74268 Loop header with constant usually can be optimized in unroll, folding branch in such loop header at SimplifyCFG will break unroll optimization. for example: Escape folding "I < ConstNum" with "Cond2" due to loo

[llvm] [clang] [SimplifyCFG] Not folding branch in loop header with constant iterations (PR #74268)

2023-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: None (xiangzh1) Changes Loop header with constant usually can be optimized in unroll, folding branch in such loop header at SimplifyCFG will break unroll optimization. for example: Escape folding "I < ConstNum" with "Cond2" due

[llvm] [clang] [SimplifyCFG] Not folding branch in loop header with constant iterations (PR #74268)

2023-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (xiangzh1) Changes Loop header with constant usually can be optimized in unroll, folding branch in such loop header at SimplifyCFG will break unroll optimization. for example: Escape folding "I < ConstNum" with "Cond2" due to loops o

[clang] dff5bb9 - [flang] Add MSC_VER and target arch defines when targeting the MSVC ABI (#73250)

2023-12-03 Thread via cfe-commits
Author: David Truby Date: 2023-12-04T02:20:03Z New Revision: dff5bb92d47ef226319ba1b70a334785d7896de8 URL: https://github.com/llvm/llvm-project/commit/dff5bb92d47ef226319ba1b70a334785d7896de8 DIFF: https://github.com/llvm/llvm-project/commit/dff5bb92d47ef226319ba1b70a334785d7896de8.diff LOG: [

[clang] [flang] [flang] Add MSC_VER and target arch defines when targeting the MSVC ABI (PR #73250)

2023-12-03 Thread David Truby via cfe-commits
https://github.com/DavidTruby closed https://github.com/llvm/llvm-project/pull/73250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improve bit-field in ref NTTP diagnostic (PR #71077)

2023-12-03 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/71077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improve bit-field in ref NTTP diagnostic (PR #71077)

2023-12-03 Thread Shafik Yaghmour via cfe-commits
shafik wrote: > > Can you add a release note? > > Do you think this small diagnostic wording change is worth noting in relnotes? Yes, we have a `Improvments to clang diagnostics` section. https://github.com/llvm/llvm-project/pull/71077 ___ cfe-commi

[clang] [clang] assert fail when number of arguments in pack exceed implement… (PR #74220)

2023-12-03 Thread Shafik Yaghmour via cfe-commits
shafik wrote: > Thanks for this PR! Emitting a diag in `TransformTemplateParmRefExpr` would > probably a better way to go about it. It's not clear to me that the assert` > is an improvement , and adding a diag would not be a lot more work. Would > that be something you would be willing to expl

[clang] [clang] assert fail when number of arguments in pack exceed implement… (PR #74220)

2023-12-03 Thread Shafik Yaghmour via cfe-commits
shafik wrote: Please make sure before you commit that you update the description with more details. This is what will show up in the git log and we want to make sure that is detailed enough to allow folks to debug build issues etc without having to examine each commit in detail. https://githu

[clang] [clang][dataflow] Add synthetic fields to `RecordStorageLocation` (PR #73860)

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

[clang] [clang][dataflow] Add synthetic fields to `RecordStorageLocation` (PR #73860)

2023-12-03 Thread Gábor Horváth via cfe-commits
@@ -367,3 +394,14 @@ clang::dataflow::FieldSet clang::dataflow::getObjectFields(QualType Type) { getFieldsFromClassHierarchy(Type, Fields); return Fields; } + +bool clang::dataflow::containsSameFields( +const clang::dataflow::FieldSet &Fields, +const clang::dataflo

[clang] [clang][dataflow] Add synthetic fields to `RecordStorageLocation` (PR #73860)

2023-12-03 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. Overall, I love it! I have some comments on some features in the future, but those are probably not going to be addressed any time soon. First of all, I think in the future when we reason about the values of the pointers, synthetic field

[clang] [clang][dataflow] Add synthetic fields to `RecordStorageLocation` (PR #73860)

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

[llvm] [clang] [SimplifyCFG] Not folding branch in loop header with constant iterations (PR #74268)

2023-12-03 Thread via cfe-commits
xiangzh1 wrote: Seems the check fail "dr2xx.cpp Line 1297: conversion from 'T' to 'unsigned long long' is ambiguous" has no relation with this change. https://github.com/llvm/llvm-project/pull/74268 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[llvm] [clang] [X86] Support CFE flags for APX features (PR #74199)

2023-12-03 Thread Shengchen Kan via cfe-commits
https://github.com/KanRobert updated https://github.com/llvm/llvm-project/pull/74199 >From 246d6e2bc3f6fb60623b5d4c3f07b53c628ed88a Mon Sep 17 00:00:00 2001 From: Shengchen Kan Date: Sat, 2 Dec 2023 23:52:53 +0800 Subject: [PATCH 1/2] [X86] Support CFE flags for APX features Positive options:

[clang] 239bcba - Fix [[clang::coro_wrapper]] documentation.

2023-12-03 Thread via cfe-commits
Author: Utkarsh Saxena Date: 2023-12-04T04:11:05+01:00 New Revision: 239bcba65099558e2ec4f57d14ef6ce46b1ae74e URL: https://github.com/llvm/llvm-project/commit/239bcba65099558e2ec4f57d14ef6ce46b1ae74e DIFF: https://github.com/llvm/llvm-project/commit/239bcba65099558e2ec4f57d14ef6ce46b1ae74e.diff

[clang] fix: C++ empty record with align lead to va_list out of sync (PR #72197)

2023-12-03 Thread via cfe-commits
hstk30-hw wrote: I guess the `i8` is from https://github.com/ARM-software/abi-aa/blob/2a70c42d62e9c3eb5887fa50b71257f20daca6f9/cppabi64/cppabi64.rst#41summary-of-differences-from-and-additions-to-the-generic-c-abi > The GC++ABI defines the way in which empty class types are laid out. For the >

[clang] [llvm] [SimplifyCFG] Not folding branch in loop header with constant iterations (PR #74268)

2023-12-03 Thread via cfe-commits
bcl5980 wrote: We should add TTI check for the condition. I believe don't unroll on X86 is a correct decision. Only like AMDGPU or NVPTX these GPU target with heavy stack cost backend target need this. https://github.com/llvm/llvm-project/pull/74268

[clang] [clang][RISCVVEmitter] Remove no-op ptr-to-ptr bitcast (NFC) (PR #74179)

2023-12-03 Thread Wang Pengcheng via cfe-commits
@@ -180,13 +180,10 @@ void emitCodeGenSwitchBody(const RVVIntrinsic *RVVI, raw_ostream &OS) { return; } - // Cast pointer operand of vector load intrinsic. for (const auto &I : enumerate(RVVI->getInputTypes())) { wangpc-pp wrote: Why not remove thi

[clang] 0f8681b - [clang][AMDGPU] precommit test for ballot on Windows (#73920)

2023-12-03 Thread via cfe-commits
Author: Sameer Sahasrabuddhe Date: 2023-12-04T10:43:16+05:30 New Revision: 0f8681b38e51e8a68894042e638eba681f7737f1 URL: https://github.com/llvm/llvm-project/commit/0f8681b38e51e8a68894042e638eba681f7737f1 DIFF: https://github.com/llvm/llvm-project/commit/0f8681b38e51e8a68894042e638eba681f7737f

[clang] [clang][AMDGPU] precommit test for ballot on Windows (PR #73920)

2023-12-03 Thread Sameer Sahasrabuddhe via cfe-commits
https://github.com/ssahasra closed https://github.com/llvm/llvm-project/pull/73920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [compiler-rt] [clang] [libc] [clang-tools-extra] [flang] [llvm] [clang][AMDGPU] fix the return type for ballot (PR #73906)

2023-12-03 Thread Sameer Sahasrabuddhe via cfe-commits
https://github.com/ssahasra updated https://github.com/llvm/llvm-project/pull/73906 >From 8ecb6310a4912de50628cf3db5ff8488fa919bb1 Mon Sep 17 00:00:00 2001 From: Sameer Sahasrabuddhe Date: Fri, 1 Dec 2023 14:24:30 +0530 Subject: [PATCH 1/2] [clang][AMDGPU] precommit test for ballot on Windows

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-12-03 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @sam-mccall ping https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0031efe - Remove warnings from -Wchar-subscripts for known positive constants (#69061)

2023-12-03 Thread via cfe-commits
Author: wheatman Date: 2023-12-04T06:49:37+01:00 New Revision: 0031efe6be19735402656a76b64a173d17f1f935 URL: https://github.com/llvm/llvm-project/commit/0031efe6be19735402656a76b64a173d17f1f935 DIFF: https://github.com/llvm/llvm-project/commit/0031efe6be19735402656a76b64a173d17f1f935.diff LOG:

[clang] Remove warnings from -Wchar-subscripts for known positive constants (PR #69061)

2023-12-03 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/69061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Remove warnings from -Wchar-subscripts for known positive constants (PR #69061)

2023-12-03 Thread via cfe-commits
cor3ntin wrote: Thanks for your first contribution. Maybe the first of many :D https://github.com/llvm/llvm-project/pull/69061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add "three dot" diff option to git-clang-format (PR #74230)

2023-12-03 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM. Please give some time for clang-format folks to review the change as it is not my area of expertise. https://github.com/llvm/llvm-project/pull/74230 ___ cfe-commits mailing list cfe-commit

[clang] [clang][CGOpenMPRuntimeGPU] Merge consecutive AddrSpaceCasts (NFC) (PR #74279)

2023-12-03 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/74279 Merge consecutive AddrSpaceCasts into a single AddrSpaceCast. >From 4e86272d980b26bf1240df94cbc894e7ded0d018 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Sun, 3 Dec 2023 23:52:33 -0600 Subject: [PATCH] [cla

[clang] [clang][CGOpenMPRuntimeGPU] Merge consecutive AddrSpaceCasts (NFC) (PR #74279)

2023-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Youngsuk Kim (JOE1994) Changes Merge consecutive AddrSpaceCasts into a single AddrSpaceCast. --- Full diff: https://github.com/llvm/llvm-project/pull/74279.diff 1 Files Affected: - (modified) clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp (+2

[clang] [clang][CGOpenMPRuntimeGPU] Merge consecutive AddrSpaceCasts (NFC) (PR #74279)

2023-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Youngsuk Kim (JOE1994) Changes Merge consecutive AddrSpaceCasts into a single AddrSpaceCast. --- Full diff: https://github.com/llvm/llvm-project/pull/74279.diff 1 Files Affected: - (modified) clang/lib/CodeGen/CGOpenMPRuntimeGPU

[clang] [RISCV][NFC] Use AddTargetFeature to add fast-unaligned-access (PR #74280)

2023-12-03 Thread Wang Pengcheng via cfe-commits
https://github.com/wangpc-pp created https://github.com/llvm/llvm-project/pull/74280 We can reduce some code. >From 1a9364a8b1e0eae320774253ac98a445daf7ec9f Mon Sep 17 00:00:00 2001 From: wangpc Date: Mon, 4 Dec 2023 14:11:19 +0800 Subject: [PATCH] [RISCV][NFC] Use AddTargetFeature to add fa

  1   2   >