[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)

2024-12-17 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 edited https://github.com/llvm/llvm-project/pull/119246 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)

2024-12-17 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/119246 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)

2024-12-17 Thread Youngsuk Kim via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple x86_64-unknown-linux-gnu -target-cpu gfx906 -fopenmp -nogpulib -fopenmp-is-target-device -emit-llvm %s -o - | FileCheck %s + +// Don't crash with assertions build. + +// CHECK: @MyGlobVar = external

[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)

2024-12-16 Thread Youngsuk Kim via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-cpu x86-64 -disable-llvm-passes -fopenmp-targets=amdgcn-amd-amdhsa -x c++ -emit-llvm-bc %s -o %t-x86-host.bc +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple x86_64-unknown-linux-gnu -target-

[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)

2024-12-16 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/119246 >From 9dbcf65775a979553bee2c95b16e3e2328e957a1 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Mon, 9 Dec 2024 10:33:18 -0600 Subject: [PATCH 1/4] [clang] Recover necessary AddrSpaceCast A necessary AddrSpace

[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)

2024-12-15 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/119246 >From 9dbcf65775a979553bee2c95b16e3e2328e957a1 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Mon, 9 Dec 2024 10:33:18 -0600 Subject: [PATCH 1/3] [clang] Recover necessary AddrSpaceCast A necessary AddrSpace

[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)

2024-12-12 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: > I mean, why do we have to watch for type mismatches and fix them instead of > creating the correct type in the first place? There is getPointerType(RetQT) just above, shouldn't it be something like getPointerType(RetQT, )? Or RetQT should have had the correct address space, but

[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)

2024-12-12 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/119246 >From 9dbcf65775a979553bee2c95b16e3e2328e957a1 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Mon, 9 Dec 2024 10:33:18 -0600 Subject: [PATCH 1/2] [clang] Recover necessary AddrSpaceCast A necessary AddrSpace

[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)

2024-12-12 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: > May it be possible that the wrapper function's return type is invalid and the > cast isn't needed? LLVM-IR (from llvm without assertions, before this revision) shows that the wrapper function returns `ptr` while `MyGlobVar` has `addrspace(1)`. ```llvm $thread-local wrapper ro

[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)

2024-12-12 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 edited https://github.com/llvm/llvm-project/pull/119246 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)

2024-12-12 Thread Youngsuk Kim via cfe-commits
@@ -0,0 +1,11 @@ +// REQUIRES: asserts JOE1994 wrote: The test crashes with an error only with an `asserts` build. Should I just that aspect in a comment, and remove the `asserts` requirement? https://github.com/llvm/llvm-project/pull/119246

[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)

2024-12-09 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/119246 A necessary AddrSpaceCast was wrongfully deleted in 5c91b2886f6bf400b60ca7839069839ac3980f8f . Recover the AddrSpaceCast. This fixes #86791 . >From 9dbcf65775a979553bee2c95b16e3e2328e957a1 Mon Sep 17 00:00:00

[clang] [clang] Warn const integer-overflow of member in temporary struct bound to rvalue reference (PR #117225)

2024-11-22 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/117225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Warn const integer-overflow of member in temporary struct bound to rvalue reference (PR #117225)

2024-11-22 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/117225 >From 08e1a3388e9d98f2469687d2367472342b05c47e Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Thu, 21 Nov 2024 13:05:20 -0600 Subject: [PATCH 1/2] [clang] Warn const integer-overflow of member in temporary s

[clang] [clang] Warn const integer-overflow of member in temporary struct bound to rvalue reference (PR #117225)

2024-11-22 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/117225 >From 08e1a3388e9d98f2469687d2367472342b05c47e Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Thu, 21 Nov 2024 13:05:20 -0600 Subject: [PATCH 1/2] [clang] Warn const integer-overflow of member in temporary s

[clang] [clang] Warn const integer-overflow of member in temporary struct bound to rvalue reference (PR #117225)

2024-11-21 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/117225 Fixes #46755 >From 08e1a3388e9d98f2469687d2367472342b05c47e Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Thu, 21 Nov 2024 13:05:20 -0600 Subject: [PATCH] [clang] Warn const integer-overflow of member in te

[clang] [llvm] [llvm] Deprecate Type::getPointerTo() (PR #113331)

2024-11-06 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/113331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm] Deprecate Type::getPointerTo() (PR #113331)

2024-11-06 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/113331 >From 01755acec5beb6884d7c3dbcc7e250952feaac15 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Fri, 18 Oct 2024 10:40:23 -0500 Subject: [PATCH 1/3] [llvm] Deprecate Type::getPointerTo() Replace remaining uses

[clang] [llvm] Remove leftover uses of llvm::Type::getPointerTo() (PR #114993)

2024-11-05 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/114993 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Remove leftover uses of llvm::Type::getPointerTo() (PR #114993)

2024-11-05 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: follow-up to https://github.com/llvm/llvm-project/pull/113331#discussion_r1827572912 https://github.com/llvm/llvm-project/pull/114993 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [llvm] Remove leftover uses of llvm::Type::getPointerTo() (PR #114993)

2024-11-05 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/114993 `llvm::Type::getPointerTo()` is to be deprecated. Replace remaining uses of it. >From 64f47c243b17a150a952bd558f5eb755ac144aa8 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Tue, 5 Nov 2024 07:30:53 -0600 Su

[clang] [llvm] [llvm] Deprecate Type::getPointerTo() (PR #113331)

2024-11-04 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: gentle ping https://github.com/llvm/llvm-project/pull/113331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Initialize SmallVector variable (PR #114434)

2024-10-31 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: Since `SmallVector DeviceLibFiles;` is default initialized to an empty vector, this change seems unnecessary. https://github.com/llvm/llvm-project/pull/114434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [NFC} Call base class method in DarwinAArch64TargetInfo::getOSDefines (PR #114241)

2024-10-30 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: What's the motivation for this change? https://github.com/llvm/llvm-project/pull/114241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm] Deprecate Type::getPointerTo() (PR #113331)

2024-10-23 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/113331 >From 01755acec5beb6884d7c3dbcc7e250952feaac15 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Fri, 18 Oct 2024 10:40:23 -0500 Subject: [PATCH 1/2] [llvm] Deprecate Type::getPointerTo() Replace remaining uses

[clang] [llvm] [llvm] Deprecate Type::getPointerTo() (PR #113331)

2024-10-22 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/113331 Replace remaining uses of `llvm::Type::getPointerTo()` and deprecate it. It's no longer needed with opaque pointers in LLVM. It may rather confuse new contributors that LLVM has typed pointers. >From 01755acec

[clang] [llvm] [llvm][NVPTX] Strip unneeded '+0' in PTX load/store (PR #113017)

2024-10-19 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/113017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenCL] Replace a CreatePointerCast call; NFC (PR #112676)

2024-10-17 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 approved this pull request. https://github.com/llvm/llvm-project/pull/112676 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenCL] Replace a CreatePointerCast call; NFC (PR #112676)

2024-10-17 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: Oh.. `CreateAddrSpaceCast` calls `CreateCast` which also initially checks whether `to` and `from` types are identical before emitting anything. https://github.com/llvm/llvm-project/pull/112676 ___ cfe-commits mailing list cfe-commits@li

[clang] [OpenCL] Replace a CreatePointerCast call; NFC (PR #112676)

2024-10-17 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: `IRBuilderBase:CreatePointerCast` doesn't emit anything if the `from` and `to` targets types are same: https://github.com/llvm/llvm-project/blob/6d7712a70c163d2ae9e1dc928db31fcb45d9e404/llvm/include/llvm/IR/IRBuilder.h#L2197-L2204 while `IRBuilderBase::CreateAddrSpaceCast` emit

[clang] [clang][CGOpenMPRuntime] Avoid Type::getPointerTo() (NFC) (PR #112017)

2024-10-11 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/112017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CGOpenMPRuntime] Avoid Type::getPointerTo() (NFC) (PR #112017)

2024-10-11 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/112017 >From 542112f283387db666c54422c714e901bb898c84 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Fri, 11 Oct 2024 10:06:57 -0500 Subject: [PATCH 1/2] [clang][CGOpenMPRuntime] Avoid Type::getPointerTo() (NFC) `l

[clang] [clang][CGOpenMPRuntime] Avoid Type::getPointerTo() (NFC) (PR #112017)

2024-10-11 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/112017 `llvm::Type::getPointerTo()` is to be deprecated & removed soon. >From 542112f283387db666c54422c714e901bb898c84 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Fri, 11 Oct 2024 10:06:57 -0500 Subject: [PATCH]

[clang] [clang][MicrosoftCXXABI] Avoid Type::getPointerTo() (NFC) (PR #110915)

2024-10-03 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/110915 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][MicrosoftCXXABI] Avoid Type::getPointerTo() (NFC) (PR #110915)

2024-10-02 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/110915 `llvm::Type::getPointerTo()` is to be deprecated & removed soon. >From 1aa33200fc6b9d6222fd160ae63d8ba2255e69d5 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Wed, 2 Oct 2024 13:49:18 -0500 Subject: [PATCH]

[clang] [clang][CGObjCMac] Unionize identical llvm types (NFC) (PR #110422)

2024-09-29 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/110422 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CGObjCMac] Unionize identical llvm types (NFC) (PR #110422)

2024-09-29 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/110422 Unionize llvm types which became identical since LLVM opted to use opaque pointers by default. >From f23d6c73cd620ac21d40846c1be0fb66606e9e17 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Sun, 29 Sep 2024

[clang] [clang][CGOpenMPRuntimeGPU] Avoid llvm::Type::getPointerTo() (NFC) (PR #110357)

2024-09-28 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/110357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CGOpenMPRuntimeGPU] Avoid llvm::Type::getPointerTo() (NFC) (PR #110357)

2024-09-28 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/110357 `llvm::Type::getPointerTo()` is to be removed soon. >From 360e288e2ab89b050d5e9b4ea98bb3b33e72e64e Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Sat, 28 Sep 2024 05:59:30 -0500 Subject: [PATCH] [clang][CGOp

[clang] [clang][CGExpr] Avoid Type::getPointerTo() (NFC) (PR #110209)

2024-09-27 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/110209 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CGExpr] Avoid Type::getPointerTo() (NFC) (PR #110209)

2024-09-26 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/110209 `Type::getPointerTo()` is to be removed soon. This also removes the whole code section for "C99 6.5.2.2p6"; It's essentially a no-op since llvm uses opaque pointers. >From 763c84fc06c3cca97e9723b1f4773b3214458

[clang-tools-extra] f5838cc - [clang-tools-extra] Don't flush llvm::raw_string_ostream (NFC)

2024-09-25 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2024-09-25T06:12:45-05:00 New Revision: f5838cc17ffb1a0015a0d2687a72bf39b2847f6d URL: https://github.com/llvm/llvm-project/commit/f5838cc17ffb1a0015a0d2687a72bf39b2847f6d DIFF: https://github.com/llvm/llvm-project/commit/f5838cc17ffb1a0015a0d2687a72bf39b2847f6d.diff

[clang] 7db641a - [clang] Don't call raw_string_ostream::flush() (NFC)

2024-09-19 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2024-09-19T17:18:10-05:00 New Revision: 7db641af13670aa1f1ecd3106eda3ce447afd752 URL: https://github.com/llvm/llvm-project/commit/7db641af13670aa1f1ecd3106eda3ce447afd752 DIFF: https://github.com/llvm/llvm-project/commit/7db641af13670aa1f1ecd3106eda3ce447afd752.diff

[clang] ac66469 - [clang] Tidy uses of raw_string_ostream (NFC)

2024-09-19 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2024-09-19T14:56:45-05:00 New Revision: ac664697c54cf2ffa9ebef0215f734bcca3b718f URL: https://github.com/llvm/llvm-project/commit/ac664697c54cf2ffa9ebef0215f734bcca3b718f DIFF: https://github.com/llvm/llvm-project/commit/ac664697c54cf2ffa9ebef0215f734bcca3b718f.diff

[clang] [clang] Add method 'backupStr' to ASTContext (PR #99417)

2024-07-23 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/99417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add method 'backupStr' to ASTContext (PR #99417)

2024-07-18 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 edited https://github.com/llvm/llvm-project/pull/99417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add method 'backupStr' to ASTContext (PR #99417)

2024-07-17 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/99417 Method 'backupStr' extracts common code of manually allocating memory with ASTContext to hold a copy of a string's contents. >From a2c89a383b340c1da61c6c32790f4cd03976c3a0 Mon Sep 17 00:00:00 2001 From: Youngsuk

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-16 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 edited https://github.com/llvm/llvm-project/pull/97902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-16 Thread Youngsuk Kim via cfe-commits
@@ -1551,7 +1551,7 @@ ASTNodeImporter::VisitCountAttributedType(const CountAttributedType *T) { Expr *CountExpr = importChecked(Err, T->getCountExpr()); SmallVector CoupledDecls; - for (auto TI : T->dependent_decls()) { + for (const TypeCoupledDeclRefInfo &TI : T->depen

[clang] 1cd6359 - [clang][ASTReaderStmt] Use helper function 'saveStrToCtx' (NFC)

2024-07-16 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2024-07-16T10:06:08-05:00 New Revision: 1cd6359f39ab7fa55f00086c322bc183adb583bc URL: https://github.com/llvm/llvm-project/commit/1cd6359f39ab7fa55f00086c322bc183adb583bc DIFF: https://github.com/llvm/llvm-project/commit/1cd6359f39ab7fa55f00086c322bc183adb583bc.diff

[clang] [clang] Prevent dangling StringRefs (PR #98699)

2024-07-13 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/98699 >From 07648c7efab15786c36dbcd265015d945b627725 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Fri, 12 Jul 2024 17:40:59 -0500 Subject: [PATCH 1/2] [clang] Prevent dangling StringRefs Fix locations where dangl

[clang] [clang] Prevent dangling StringRefs (PR #98699)

2024-07-12 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/98699 Fix locations where dangling StringRefs are created. * `ConstraintSatisfaction::SubstitutionDiagnostic`: typedef of `std::pair` * `concepts::Requirement::SubstitutionDiagnostic`: struct whose 1st and 3rd data

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-06 Thread Youngsuk Kim via cfe-commits
@@ -1551,7 +1551,7 @@ ASTNodeImporter::VisitCountAttributedType(const CountAttributedType *T) { Expr *CountExpr = importChecked(Err, T->getCountExpr()); SmallVector CoupledDecls; - for (auto TI : T->dependent_decls()) { + for (const TypeCoupledDeclRefInfo &TI : T->depen

[clang] ccc0b66 - [clang] Avoid 'raw_string_ostream::str' (NFC)

2024-07-05 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2024-07-05T06:42:43-05:00 New Revision: ccc0b66d6971b64175b4e99c6d5baaa2830c4208 URL: https://github.com/llvm/llvm-project/commit/ccc0b66d6971b64175b4e99c6d5baaa2830c4208 DIFF: https://github.com/llvm/llvm-project/commit/ccc0b66d6971b64175b4e99c6d5baaa2830c4208.diff

[clang] 9e21174 - [clang] Avoid 'raw_string_ostream::str' (NFC)

2024-07-04 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2024-07-04T21:59:19-05:00 New Revision: 9e211744b82a72e08c137f75b1c671713e2891af URL: https://github.com/llvm/llvm-project/commit/9e211744b82a72e08c137f75b1c671713e2891af DIFF: https://github.com/llvm/llvm-project/commit/9e211744b82a72e08c137f75b1c671713e2891af.diff

[clang] 0856064 - [clang][StaticAnalyzer] Avoid 'raw_string_ostream::str' (NFC)

2024-07-02 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2024-07-02T19:52:09-05:00 New Revision: 0856064ea219d029e7d2c4f68bb88196fe647f6b URL: https://github.com/llvm/llvm-project/commit/0856064ea219d029e7d2c4f68bb88196fe647f6b DIFF: https://github.com/llvm/llvm-project/commit/0856064ea219d029e7d2c4f68bb88196fe647f6b.diff

[clang] ac84ada - [clang] Avoid 'raw_string_ostream::str' (NFC)

2024-06-30 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2024-06-30T10:02:49-05:00 New Revision: ac84ada9a169a72ad136ef05c2c194f594f24a37 URL: https://github.com/llvm/llvm-project/commit/ac84ada9a169a72ad136ef05c2c194f594f24a37 DIFF: https://github.com/llvm/llvm-project/commit/ac84ada9a169a72ad136ef05c2c194f594f24a37.diff

[clang] Assume a for-in loop is in bounds and cannot overflow (PR #94883)

2024-06-09 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: Why did you close this PR so soon after creating it? https://github.com/llvm/llvm-project/pull/94883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] add pointer qualifier to auto type (PR #91874)

2024-06-03 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 requested changes to this pull request. The 3 updated items seem to be iterators and not pointers. I think [the coding standard item](https://llvm.org/docs/CodingStandards.html#beware-unnecessary-copies-with-auto) doesn't apply here. https://github.com/llvm/llvm-pro

[clang] [clang][driver] add pointer qualifier to auto type (PR #91874)

2024-06-03 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 approved this pull request. https://github.com/llvm/llvm-project/pull/91874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] ``README.txt``: Replace the link to the old bug tracker with the new one. (PR #93878)

2024-05-31 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/93878 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] ``README.txt``: Replace the link to the old bug tracker with the new one. (PR #93878)

2024-05-30 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 approved this pull request. https://github.com/llvm/llvm-project/pull/93878 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions with no decl in source (PR #93394)

2024-05-28 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/93394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions with no decl in source (PR #93394)

2024-05-28 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/93394 >From 00c93043fca8f8a1f20634ea1b281c60926bd571 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Sat, 25 May 2024 20:42:43 -0500 Subject: [PATCH 1/5] [clang][Sema] Don't emit 'declared here' note for builtin fun

[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions with no decl in source (PR #93394)

2024-05-27 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/93394 >From 00c93043fca8f8a1f20634ea1b281c60926bd571 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Sat, 25 May 2024 20:42:43 -0500 Subject: [PATCH 1/4] [clang][Sema] Don't emit 'declared here' note for builtin fun

[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions with no decl in source (PR #93394)

2024-05-27 Thread Youngsuk Kim via cfe-commits
@@ -5897,6 +5897,16 @@ void Sema::diagnoseTypo(const TypoCorrection &Correction, NamedDecl *ChosenDecl = Correction.isKeyword() ? nullptr : Correction.getFoundDecl(); + + // For builtin functions which aren't declared anywhere in source, + // don't emit the "declared

[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions with no decl in source (PR #93394)

2024-05-26 Thread Youngsuk Kim via cfe-commits
@@ -5,7 +5,7 @@ void similar() { // expected-note {{'similar' declared here}} if constexpr (similer<>) {} // expected-error {{use of undeclared identifier 'similer'; did you mean 'similar'?}} } void a() { if constexpr (__adl_swap<>) {}} // expected-error{{use of undeclared

[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions with no decl in source (PR #93394)

2024-05-26 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/93394 >From 00c93043fca8f8a1f20634ea1b281c60926bd571 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Sat, 25 May 2024 20:42:43 -0500 Subject: [PATCH 1/3] [clang][Sema] Don't emit 'declared here' note for builtin fun

[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions with no decl in source (PR #93394)

2024-05-26 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/93394 >From 00c93043fca8f8a1f20634ea1b281c60926bd571 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Sat, 25 May 2024 20:42:43 -0500 Subject: [PATCH 1/2] [clang][Sema] Don't emit 'declared here' note for builtin fun

[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions with no decl in source (PR #93394)

2024-05-25 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 edited https://github.com/llvm/llvm-project/pull/93394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions with no decl in source (PR #93394)

2024-05-25 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 edited https://github.com/llvm/llvm-project/pull/93394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions w… (PR #93394)

2024-05-25 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/93394 …ith no decl in source Fixes #93369 >From 00c93043fca8f8a1f20634ea1b281c60926bd571 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Sat, 25 May 2024 20:42:43 -0500 Subject: [PATCH] [clang][Sema] Don't emit 'de

[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)

2024-05-17 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/92200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)

2024-05-17 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/92200 >From 2c7f9a083c129df70a79d019286b6a29643a8973 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Tue, 14 May 2024 17:42:59 -0500 Subject: [PATCH 1/5] [clang][Sema] Warn consecutive builtin comparisons in an expr

[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)

2024-05-16 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 edited https://github.com/llvm/llvm-project/pull/92200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)

2024-05-16 Thread Youngsuk Kim via cfe-commits
@@ -215,3 +215,10 @@ namespace PR20735 { // fix-it:"{{.*}}":{[[@LINE-9]]:20-[[@LINE-9]]:20}:")" } } + +void consecutive_builtin_compare(int x, int y, int z) { + (void)(x < y < z); // expected-warning {{comparisons like 'X<=Y<=Z' don't have their mathematical meaning}}

[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)

2024-05-16 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/92200 >From 2c7f9a083c129df70a79d019286b6a29643a8973 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Tue, 14 May 2024 17:42:59 -0500 Subject: [PATCH 1/4] [clang][Sema] Warn consecutive builtin comparisons in an expr

[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)

2024-05-15 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 edited https://github.com/llvm/llvm-project/pull/92200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)

2024-05-15 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 edited https://github.com/llvm/llvm-project/pull/92200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)

2024-05-15 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/92200 >From 2c7f9a083c129df70a79d019286b6a29643a8973 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Tue, 14 May 2024 17:42:59 -0500 Subject: [PATCH 1/3] [clang][Sema] Warn consecutive builtin comparisons in an expr

[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)

2024-05-15 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/92200 >From 2c7f9a083c129df70a79d019286b6a29643a8973 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Tue, 14 May 2024 17:42:59 -0500 Subject: [PATCH 1/2] [clang][Sema] Warn consecutive builtin comparisons in an expr

[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)

2024-05-15 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: > Do we know why GCC elected to go that route? This seems like something that > should be enabled by default because the false positive rate should be quite > low. It seems like `gcc` doesn't enable `-Wparentheses` by default, while `clang` enables it by default. I will add a

[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)

2024-05-14 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/92200 Made the following decisions for consistency with `gcc 14.1`: * Add warning under -Wparentheses * Set the warning to DefaultIgnore, although -Wparentheses is enabled by default * This warning is only issued when

[libclc] e60b83a - [libclc] Clarify condition expression (NFC)

2024-05-14 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2024-05-14T08:51:56-05:00 New Revision: e60b83a645685f22375af9bca5af6624b3a805d0 URL: https://github.com/llvm/llvm-project/commit/e60b83a645685f22375af9bca5af6624b3a805d0 DIFF: https://github.com/llvm/llvm-project/commit/e60b83a645685f22375af9bca5af6624b3a805d0.diff

[clang] Duplicate condition (PR #91279)

2024-05-08 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 edited https://github.com/llvm/llvm-project/pull/91279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2933ef2 - [clang][HIPUtility] Iterate by const reference (NFC)

2024-05-03 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2024-05-03T05:45:17-05:00 New Revision: 2933ef2da9103122a52066a1c680046d1bdacaed URL: https://github.com/llvm/llvm-project/commit/2933ef2da9103122a52066a1c680046d1bdacaed DIFF: https://github.com/llvm/llvm-project/commit/2933ef2da9103122a52066a1c680046d1bdacaed.diff

[clang] 1efc191 - [clang][Driver] Iterate with const reference (NFC)

2024-05-03 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2024-05-03T05:18:27-05:00 New Revision: 1efc1918502bd8c9cf2431af38d754878eac071a URL: https://github.com/llvm/llvm-project/commit/1efc1918502bd8c9cf2431af38d754878eac071a DIFF: https://github.com/llvm/llvm-project/commit/1efc1918502bd8c9cf2431af38d754878eac071a.diff

[clang] [clang][Sema] Re-use existing BinaryOperator if possible (PR #90625)

2024-05-02 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/90625 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Re-use existing BinaryOperator if possible (PR #90625)

2024-05-01 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/90625 >From 0a1598d0e00cbbfd0320ea72491500957ddb6b52 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Tue, 30 Apr 2024 11:18:15 -0500 Subject: [PATCH 1/2] [clang][Sema] Re-use existing BinaryOperator if possible Firs

[clang] [clang][Sema] Re-use existing BinaryOperator if possible (PR #90625)

2024-05-01 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/90625 >From 0a1598d0e00cbbfd0320ea72491500957ddb6b52 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Tue, 30 Apr 2024 11:18:15 -0500 Subject: [PATCH] [clang][Sema] Re-use existing BinaryOperator if possible First ro

[clang] [clang][Sema] Re-use existing BinaryOperator if possible (PR #90625)

2024-05-01 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: Buildkite passed on Linux x64 but failed on Windows x64 . Test log doesn't show any test failures except for `XFAIL` runs, so I'm not sure what's causing the failure. Will rebase onto latest `main` to try the build again. https://github.com/llvm/llvm-project/pull/90625 ___

[clang] [clang][Sema] Re-use existing BinaryOperator if possible (PR #90625)

2024-04-30 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/90625 >From 3b2f810ff3798ef073a8d1a10ca6fbafdbdb4641 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Tue, 30 Apr 2024 11:18:15 -0500 Subject: [PATCH] [clang][Sema] Re-use existing BinaryOperator if possible First ro

[clang] [clang][Sema] Re-use existing BinaryOperator if possible (PR #90625)

2024-04-30 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: `clang-format` issues an error for the comments from a previous commit wrote by a different author. I'd like to disregard the clang-format errror, so to keep the diff of this commit minimial. https://github.com/llvm/llvm-project/pull/90625 ___

[clang] [clang][Sema] Re-use existing BinaryOperator if possible (PR #90625)

2024-04-30 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/90625 First round of Sema checks were run at initial parsing step. Creating a new BinaryOperator instance (with the re-built LHS or RHS) will trigger another round of Sema checks, which can lead to duplicate diagnosti

[clang] 66190af - [Clang] ReleaseNote item for 9dab2e3064a2ad4d5ce65832d605787dc394cb72

2024-04-04 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2024-04-04T20:49:45-05:00 New Revision: 66190af7350df7edb03f7ebb8ac11065bb07e22c URL: https://github.com/llvm/llvm-project/commit/66190af7350df7edb03f7ebb8ac11065bb07e22c DIFF: https://github.com/llvm/llvm-project/commit/66190af7350df7edb03f7ebb8ac11065bb07e22c.diff

[clang] [Clang][Sema] Warn unused cxx vardecl which entirely consists condition expr of if/while/for construct (PR #87348)

2024-04-04 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/87348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Warn unused cxx var declared in condition of if-statement (PR #87348)

2024-04-02 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/87348 Fixes #41447 >From 90834d7250d18c9389c84966279365638dce80a9 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Tue, 2 Apr 2024 08:17:36 -0500 Subject: [PATCH] [Clang][Sema] Warn unused cxx var declared in condit

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

2024-03-05 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed 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] [ObjC] Check entire chain of superclasses to see if class layout is statically known (PR #81335)

2024-03-05 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 approved this pull request. LGTM 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-04 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed 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/cfe-commits

  1   2   >