[clang] [clang-format] Add --fail-on-incomplete-format. (PR #84346)

2024-03-18 Thread Roberto Bampi via cfe-commits
gigaroby wrote: > Can you add lit test cases? Done. https://github.com/llvm/llvm-project/pull/84346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add --fail-on-incomplete-format. (PR #84346)

2024-03-18 Thread Roberto Bampi via cfe-commits
https://github.com/gigaroby updated https://github.com/llvm/llvm-project/pull/84346 >From ee4f8f1c4abaa20d4eedd3451fd96f3306990d0e Mon Sep 17 00:00:00 2001 From: Roberto Bampi Date: Thu, 7 Mar 2024 18:10:56 +0100 Subject: [PATCH 1/2] [clang-format] Add --fail-on-incomplete-format. At the

[libclc] [libclc] Convert tabs to spaces in CMake (PR #85634)

2024-03-18 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: FWIW I don't think the build bots are actually building `libclc`. Locally, at least, it's not sufficient to specify `LLVM_ENABLE_PROJECTS=libclc` - you _also_ need `LLVM_EXTERNAL_PROJECTS=libclc`. Even then, it doesn't build for me in-tree, because it assumes

[clang] [clang][dataflow] Fix `getResultObjectLocation()` on `CXXDefaultArgExpr`. (PR #85072)

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

[clang] 27d5049 - [clang][dataflow] Fix `getResultObjectLocation()` on `CXXDefaultArgExpr`. (#85072)

2024-03-18 Thread via cfe-commits
Author: martinboehme Date: 2024-03-18T13:36:20+01:00 New Revision: 27d504998ec7ec596bc9ff5d16333aea7a1bac18 URL: https://github.com/llvm/llvm-project/commit/27d504998ec7ec596bc9ff5d16333aea7a1bac18 DIFF: https://github.com/llvm/llvm-project/commit/27d504998ec7ec596bc9ff5d16333aea7a1bac18.diff

[clang] Reland Print library module manifest path again (PR #84881)

2024-03-18 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#85637 https://github.com/llvm/llvm-project/pull/84881 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland Print library module manifest path again (PR #84881)

2024-03-18 Thread Arthur Laurent via cfe-commits
Arthapz wrote: > The file we're looking for is `modules.json`; Renaming it > `libc++.modules.json` like `.so` / `.a` file might be a better idea which > could avoid name clashes when installed in `/usr/lib`. but i didn't rename it, it was installed like this :/

[clang] Reland Print library module manifest path again (PR #84881)

2024-03-18 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: /cherry-pick 0e1e1fc8f0e https://github.com/llvm/llvm-project/pull/84881 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-18 Thread Wang Pengcheng via cfe-commits
wangpc-pp wrote: There is a Windows failure that I can't reproduce: https://buildkite.com/llvm-project/github-pull-requests/builds/46331 Can someone help me to figure out what is wrong? https://github.com/llvm/llvm-project/pull/83774 ___ cfe-commits

[clang] Reland Print library module manifest path again (PR #84881)

2024-03-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 milestoned https://github.com/llvm/llvm-project/pull/84881 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [codegen] Emit cleanups for branch in stmt-expr and coro suspensions [take-2] (PR #85398)

2024-03-18 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/85398 >From 0654f624b3b60026398e8b0168623a85e3129630 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Fri, 15 Mar 2024 13:19:36 + Subject: [PATCH 1/3] [codegen] Emit cleanups for branch in stmt-expr and coro

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-03-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/81976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ab28c1d - fix unnecessary warning when using bitand with boolean operators (#81976)

2024-03-18 Thread via cfe-commits
Author: Bhuminjay Soni Date: 2024-03-18T08:19:44-04:00 New Revision: ab28c1de23f3880d7d2becf936fe560abe68e020 URL: https://github.com/llvm/llvm-project/commit/ab28c1de23f3880d7d2becf936fe560abe68e020 DIFF:

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-03-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/81976 >From 07c73f087a430f5115ecdfec23730c5afcab37f3 Mon Sep 17 00:00:00 2001 From: 11happy Date: Fri, 16 Feb 2024 14:26:36 +0530 Subject: [PATCH 1/4] fix unnecessary warning when using bitand with boolean

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-03-18 Thread Aaron Ballman via cfe-commits
@@ -250,6 +250,11 @@ Improvements to Clang's diagnostics such as attempting to call ``free`` on an unallocated object. Fixes `#79443 `_. +- Clang now does not warn in cases where bitand operator is + intentionally used

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-03-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM with a small tweak to the release notes. https://github.com/llvm/llvm-project/pull/81976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-03-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/81976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-18 Thread via cfe-commits
@@ -451,6 +451,38 @@ void ProgramState::setStore(const StoreRef ) { store = newStoreStore; } +/// FieldRegions are expected to be wrapped by an ElementRegion as a canonical +/// representation. See f8643a9b31c4029942f67d4534c9139b45173504 why. +static SVal

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

2024-03-18 Thread via cfe-commits
https://github.com/NagyDonat approved this pull request. Looks good overall, my only inline comment is a minor stylistic question. I think it's good that we're moving towards establishing the invariant that the parent of a FieldRegion should always be a typed value region (of a suitable type)

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

2024-03-18 Thread via cfe-commits
https://github.com/NagyDonat edited 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] [clang] Correct Microsoft mangling of lifetime extended temporary objects. (PR #85529)

2024-03-18 Thread via cfe-commits
https://github.com/zmodem approved this pull request. This looks reasonable to me, but maybe give rnk and/or majnemer a day to comments as well since they're the real experts. re: the incompatibility, yes if MSVC is mangling these now, clang should probably try to match.

[clang] [clang] Correct Microsoft mangling of lifetime extended temporary objects. (PR #85529)

2024-03-18 Thread via cfe-commits
@@ -54,6 +54,12 @@ ABI Changes in This Version inline member function that contains a static local variable with a dynamic initializer is declared with ``__declspec(dllimport)``. (#GH83616). +- Fixed Microsoft name mangling of lifetime extended temporary objects. This +

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-03-18 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > currently the macro definition for both `&` and `bitand` is not giving any > warning however should the `&` one warn? or current working is correct > behaviour as expected? The current behavior is what I'd expect. The idea being: if the user is using `&` directly, it's

[clang] [clang] Add /Zc:__STDC__ flag to clang-cl (PR #68690)

2024-03-18 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,11 @@ +// Note: %s must be preceded by --, otherwise it may be interpreted as a +// command-line option, e.g. on Mac where %s is commonly under /Users. +// +// Note: see also cl-zc.cpp + +// RUN: %clang_cl /TC /dev/null /E -Xclang -dM /Zc:__STDC__- 2>&1 | FileCheck %s

[clang] c2f75c7 - [clang][Interp] Handle CXXDefaultInitExpr of composite type

2024-03-18 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-03-18T12:59:56+01:00 New Revision: c2f75c7159518e238e0185c0f4e615fedcd8a167 URL: https://github.com/llvm/llvm-project/commit/c2f75c7159518e238e0185c0f4e615fedcd8a167 DIFF: https://github.com/llvm/llvm-project/commit/c2f75c7159518e238e0185c0f4e615fedcd8a167.diff

[libclc] [libclc] Convert tabs to spaces in CMake (PR #85634)

2024-03-18 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: @tstellar are you the code owner for `libclc`? https://github.com/llvm/llvm-project/pull/85634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-18 Thread via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: @@ -20,48 +20,178 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" #include

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-18 Thread via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: @@ -20,48 +20,178 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" #include

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-18 Thread via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: @@ -20,48 +20,178 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" #include

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-18 Thread via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: https://github.com/NagyDonat approved this pull request. Thanks for simplifying the code :) I added some stereotypical bikeshedding in inline comments, but apart from that the commit LGTM.

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-18 Thread via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/80029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][Sema] Fix a crash in lambda instantiation (PR #85565)

2024-03-18 Thread via cfe-commits
@@ -13714,6 +13714,12 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { // Capturing 'this' is trivial. if (C->capturesThis()) { + // We need ThisType here. + Sema::CXXThisScopeRAII ThisScope( + getSema(), + dyn_cast_or_null(

[clang] [Clang][Sema] Fix a crash in lambda instantiation (PR #85565)

2024-03-18 Thread via cfe-commits
@@ -394,6 +394,7 @@ 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 a crash in lambda instantiation

[clang] [Clang][Sema] Fix a crash in lambda instantiation (PR #85565)

2024-03-18 Thread via cfe-commits
@@ -13714,6 +13714,12 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { // Capturing 'this' is trivial. if (C->capturesThis()) { + // We need ThisType here. Sirraide wrote: This comment doesn’t really explain anything. I’d suggest

[clang] [Clang][Sema] Fix a crash in lambda instantiation (PR #85565)

2024-03-18 Thread via cfe-commits
@@ -394,6 +394,7 @@ 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 a crash in lambda instantiation

[clang] [Clang][Sema] Fix a crash in lambda instantiation (PR #85565)

2024-03-18 Thread via cfe-commits
https://github.com/Sirraide requested changes to this pull request. Looks fine to me apart from a few minor things. https://github.com/llvm/llvm-project/pull/85565 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][Sema] Fix a crash in lambda instantiation (PR #85565)

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

[libclc] [libclc] Convert tabs to spaces in CMake (PR #85634)

2024-03-18 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/85634 Having a mix of tabs and spaces makes the diff of any changes to the build system noisier than necessary. This commit unifies them to two spaces. This includes some minor cosmetic changes such as with

[clang] [llvm] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)

2024-03-18 Thread Vikram Hegde via cfe-commits
@@ -3616,6 +3617,12 @@ unsigned FunctionDecl::getBuiltinID(bool ConsiderWrapperFunctions) const { if (!ConsiderWrapperFunctions && getStorageClass() == SC_Static) return 0; + // AMDGCN implementation supports printf as a builtin + // for OpenCL + if

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-03-18 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/84159 >From 1c06781e92b8fec78ae82b0d6a85965524d223d6 Mon Sep 17

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-18 Thread via cfe-commits
Sirraide wrote: >From what I can tell, it seems that Aaron is a lot more familiar w/ this part >of Clang than me, so I’ll leave it to him to comment on whether these changes >make sense. https://github.com/llvm/llvm-project/pull/84014 ___

[clang] [llvm] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)

2024-03-18 Thread Matt Arsenault via cfe-commits
@@ -3616,6 +3617,12 @@ unsigned FunctionDecl::getBuiltinID(bool ConsiderWrapperFunctions) const { if (!ConsiderWrapperFunctions && getStorageClass() == SC_Static) return 0; + // AMDGCN implementation supports printf as a builtin + // for OpenCL + if

[clang] [clang][dataflow] Make optional checker work for types derived from optional. (PR #84138)

2024-03-18 Thread via cfe-commits
@@ -129,19 +207,19 @@ auto inPlaceClass() { auto isOptionalNulloptConstructor() { return cxxConstructExpr( - hasOptionalType(), + hasOptionalOrDerivedType(), martinboehme wrote: > I would think that we don't know (and therefore can't model) the

[clang] 3e6db60 - [RemoveDIs] Update Clang front end to handle DbgRecords (#84756)

2024-03-18 Thread Orlando Cazalet-Hyams via cfe-commits
Author: Orlando Cazalet-Hyams Date: 2024-03-18T10:55:29Z New Revision: 3e6db602918435b6a5ac476f63f8b259e7e73af4 URL: https://github.com/llvm/llvm-project/commit/3e6db602918435b6a5ac476f63f8b259e7e73af4 DIFF:

[clang] [llvm] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)

2024-03-18 Thread Vikram Hegde via cfe-commits
https://github.com/vikramRH edited https://github.com/llvm/llvm-project/pull/72556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Make optional checker work for types derived from optional. (PR #84138)

2024-03-18 Thread via cfe-commits
@@ -64,39 +64,117 @@ static bool hasOptionalClassName(const CXXRecordDecl ) { return false; } +static const CXXRecordDecl *getOptionalBaseClass(const CXXRecordDecl *RD) { + if (RD == nullptr) +return nullptr; + if (hasOptionalClassName(*RD)) +return RD; + + if

[clang] [llvm] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)

2024-03-18 Thread Vikram Hegde via cfe-commits
https://github.com/vikramRH edited https://github.com/llvm/llvm-project/pull/72556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)

2024-03-18 Thread Vikram Hegde via cfe-commits
@@ -3616,6 +3617,12 @@ unsigned FunctionDecl::getBuiltinID(bool ConsiderWrapperFunctions) const { if (!ConsiderWrapperFunctions && getStorageClass() == SC_Static) return 0; + // AMDGCN implementation supports printf as a builtin + // for OpenCL + if

[clang] [clang][dataflow] Make optional checker work for types derived from optional. (PR #84138)

2024-03-18 Thread via cfe-commits
@@ -64,39 +64,117 @@ static bool hasOptionalClassName(const CXXRecordDecl ) { return false; } +static const CXXRecordDecl *getOptionalBaseClass(const CXXRecordDecl *RD) { + if (RD == nullptr) +return nullptr; + if (hasOptionalClassName(*RD)) +return RD; + + if

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-18 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/80029 From 346e2296869e750c7ec5bd75cf05f80a23b70569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 30 Jan 2024 11:33:30 +0100 Subject: [PATCH 1/3] [clang][analyzer] Improve

[clang] [clang][dataflow] Make optional checker work for types derived from optional. (PR #84138)

2024-03-18 Thread via cfe-commits
@@ -64,39 +64,117 @@ static bool hasOptionalClassName(const CXXRecordDecl ) { return false; } +static const CXXRecordDecl *getOptionalBaseClass(const CXXRecordDecl *RD) { + if (RD == nullptr) +return nullptr; + if (hasOptionalClassName(*RD)) +return RD; + + if

[clang] f362e12 - [clang-format] Make header self-contained

2024-03-18 Thread Benjamin Kramer via cfe-commits
Author: Benjamin Kramer Date: 2024-03-18T11:23:38+01:00 New Revision: f362e12aab9ce07b836a2622fc987cda8b6ab6f8 URL: https://github.com/llvm/llvm-project/commit/f362e12aab9ce07b836a2622fc987cda8b6ab6f8 DIFF:

[clang] 92122b0 - Revert "[RemoveDIs] Update Clang front end to handle DbgRecords (#84756)"

2024-03-18 Thread Orlando Cazalet-Hyams via cfe-commits
Author: Orlando Cazalet-Hyams Date: 2024-03-18T10:13:35Z New Revision: 92122b0b4b514ea6c081e428f47ef1bf9d4f0f17 URL: https://github.com/llvm/llvm-project/commit/92122b0b4b514ea6c081e428f47ef1bf9d4f0f17 DIFF:

[clang] 3e4170a - Revert "Fix formatting in #84756"

2024-03-18 Thread Orlando Cazalet-Hyams via cfe-commits
Author: Orlando Cazalet-Hyams Date: 2024-03-18T10:13:12Z New Revision: 3e4170a587adb789b77ede799d09139b50ebe5bc URL: https://github.com/llvm/llvm-project/commit/3e4170a587adb789b77ede799d09139b50ebe5bc DIFF:

[clang] b097b3d - Fix formatting in #84756

2024-03-18 Thread Orlando Cazalet-Hyams via cfe-commits
Author: Orlando Cazalet-Hyams Date: 2024-03-18T10:01:51Z New Revision: b097b3dc2ba2517621a5e3da3237a77ed0e7586f URL: https://github.com/llvm/llvm-project/commit/b097b3dc2ba2517621a5e3da3237a77ed0e7586f DIFF:

[clang] [RemoveDIs] Update Clang front end to handle DbgRecords (PR #84756)

2024-03-18 Thread Orlando Cazalet-Hyams via cfe-commits
https://github.com/OCHyams closed https://github.com/llvm/llvm-project/pull/84756 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6f60ad7 - [RemoveDIs] Update Clang front end to handle DbgRecords (#84756)

2024-03-18 Thread via cfe-commits
Author: Orlando Cazalet-Hyams Date: 2024-03-18T09:59:58Z New Revision: 6f60ad7e9a3508f19d54c827cf11f7930a0685ee URL: https://github.com/llvm/llvm-project/commit/6f60ad7e9a3508f19d54c827cf11f7930a0685ee DIFF:

[clang] [clang][dataflow] Make optional checker work for types derived from optional. (PR #84138)

2024-03-18 Thread via cfe-commits
@@ -64,39 +64,117 @@ static bool hasOptionalClassName(const CXXRecordDecl ) { return false; } +static const CXXRecordDecl *getOptionalBaseClass(const CXXRecordDecl *RD) { + if (RD == nullptr) +return nullptr; + if (hasOptionalClassName(*RD)) +return RD; + + if

[clang] [clang][NFC] Add documentation for `CastExpr::path()`. (PR #85623)

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

[clang] [clang][NFC] Add documentation for `CastExpr::path()`. (PR #85623)

2024-03-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (martinboehme) Changes This didn't have any documentation, so I had to do some experimenting in godbolt when I used this in https://github.com/llvm/llvm-project/pull/84138, and my reviewer later also had some

[clang] [clang][NFC] Add documentation for `CastExpr::path()`. (PR #85623)

2024-03-18 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/85623 This didn't have any documentation, so I had to do some experimenting in godbolt when I used this in https://github.com/llvm/llvm-project/pull/84138, and my reviewer later also had some

[clang] [RemoveDIs] Update Clang front end to handle DbgRecords (PR #84756)

2024-03-18 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer approved this pull request. It's been a bit without any comments, probably safe now to land this. https://github.com/llvm/llvm-project/pull/84756 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Interp] Merge ByteCodeExprGen and ByteCodeStmtGen (PR #83683)

2024-03-18 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: 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

[clang] [Driver,AArch64] Remove AArch32-specific -m[no-]unaligned-access (PR #85441)

2024-03-18 Thread Peter Smith via cfe-commits
https://github.com/smithp35 commented: If possible I would prefer to keep -m[no-]unaligned-access for AArch64. The history of this option name derives from Arm's proprietary compiler

[clang] [clang][dataflow] Fix `getResultObjectLocation()` on `CXXDefaultArgExpr`. (PR #85072)

2024-03-18 Thread via cfe-commits
https://github.com/martinboehme updated https://github.com/llvm/llvm-project/pull/85072 >From dfa4da9e6a3d8a343e1fdf0ed72670148fec5a59 Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Thu, 14 Mar 2024 08:46:06 + Subject: [PATCH 1/2] [clang][dataflow] Fix `getResultObjectLocation()` on

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

2024-03-18 Thread via cfe-commits
https://github.com/NagyDonat edited 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-18 Thread via cfe-commits
https://github.com/NagyDonat approved this pull request. LGMT, thanks for adding the testcases! I agree that the "sometimes reports the wrong variable" situation is a very significant improvement over the old "always infinite loop" situation; but this "convert a symbol to a variable name"

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

2024-03-18 Thread Axel Lundberg via cfe-commits
Zonotora wrote: Also, I don't have commit access (first PR here), someone has to commit on my behalf! https://github.com/llvm/llvm-project/pull/75481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][dataflow] Model assignment to derived class from base. (PR #85064)

2024-03-18 Thread via cfe-commits
@@ -212,8 +212,23 @@ TEST(TransferTest, CopyRecordFromDerivedToBase) { // [[p]] } )"; + auto SyntheticFieldCallback = [](QualType Ty) -> llvm::StringMap { +CXXRecordDecl *ADecl = nullptr; +if (Ty.getAsString() == "A") + ADecl =

[clang] [clang][dataflow] Model assignment to derived class from base. (PR #85064)

2024-03-18 Thread via cfe-commits
https://github.com/martinboehme updated https://github.com/llvm/llvm-project/pull/85064 >From 9362adfb0d1a61cb56b897f31fd9f2ead1605383 Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Wed, 13 Mar 2024 12:07:24 + Subject: [PATCH 1/3] [clang][dataflow] Model assignment to derived class

[clang] [llvm] Use timeTraceAsyncProfilerBegin for Source span (PR #83961)

2024-03-18 Thread Takuto Ikuta via cfe-commits
https://github.com/atetubou updated https://github.com/llvm/llvm-project/pull/83961 >From 6e2521733cdc49971529977cb81c731dd2816b42 Mon Sep 17 00:00:00 2001 From: Takuto Ikuta Date: Mon, 18 Mar 2024 18:03:00 +0900 Subject: [PATCH 1/2] git squash commit for support_new_trace.

[clang] [clang][dataflow] Model assignment to derived class from base. (PR #85064)

2024-03-18 Thread via cfe-commits
@@ -35,45 +69,27 @@ void clang::dataflow::copyRecord(RecordStorageLocation , }); assert(compatibleTypes); - for (auto [Field, DstFieldLoc] : Dst.children()) { -StorageLocation *SrcFieldLoc = Src.getChild(*Field); - -assert(Field->getType()->isReferenceType() || -

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

2024-03-18 Thread Axel Lundberg via cfe-commits
https://github.com/Zonotora updated https://github.com/llvm/llvm-project/pull/75481 >From 42207b6369b22db7e8400f290be8c6ee75a5278a Mon Sep 17 00:00:00 2001 From: Zonotora Date: Sat, 16 Dec 2023 19:33:21 +0100 Subject: [PATCH 1/3] [clang] Extract negativity check lambda to function ---

[clang] [clang][dataflow] Model assignment to derived class from base. (PR #85064)

2024-03-18 Thread via cfe-commits
@@ -35,45 +69,27 @@ void clang::dataflow::copyRecord(RecordStorageLocation , }); assert(compatibleTypes); - for (auto [Field, DstFieldLoc] : Dst.children()) { -StorageLocation *SrcFieldLoc = Src.getChild(*Field); - -assert(Field->getType()->isReferenceType() || -

[clang] [clang][dataflow] Model assignment to derived class from base. (PR #85064)

2024-03-18 Thread via cfe-commits
@@ -14,18 +14,52 @@ #define DEBUG_TYPE "dataflow" -void clang::dataflow::copyRecord(RecordStorageLocation , - RecordStorageLocation , Environment ) { +namespace clang::dataflow { + +static void copyField(const ValueDecl *Field,

[clang] [clang][dataflow] Model assignment to derived class from base. (PR #85064)

2024-03-18 Thread via cfe-commits
@@ -14,18 +14,52 @@ #define DEBUG_TYPE "dataflow" -void clang::dataflow::copyRecord(RecordStorageLocation , - RecordStorageLocation , Environment ) { +namespace clang::dataflow { + +static void copyField(const ValueDecl *Field,

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

2024-03-18 Thread Axel Lundberg via cfe-commits
Zonotora wrote: @LebedevRI LGTM? https://github.com/llvm/llvm-project/pull/75481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Model assignment to derived class from base. (PR #85064)

2024-03-18 Thread via cfe-commits
https://github.com/martinboehme updated https://github.com/llvm/llvm-project/pull/85064 >From 9362adfb0d1a61cb56b897f31fd9f2ead1605383 Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Wed, 13 Mar 2024 12:07:24 + Subject: [PATCH 1/2] [clang][dataflow] Model assignment to derived class

[clang] [clang][C23] N3006 Underspecified object declarations (PR #79845)

2024-03-18 Thread Guillot Tony via cfe-commits
to268 wrote: I have rebased my PR to include N3018 constexpr feature and reverted a formatted snippet of code that is not part of the PR. I will add constexpr tests but I need to investigate why the constexpr keyword does not trigger the diagnostic (not sure if it's a constexpr implementation

[clang] [llvm] [AArch64] Add soft-float ABI (PR #84146)

2024-03-18 Thread via cfe-commits
ostannard wrote: Ping https://github.com/llvm/llvm-project/pull/84146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P2718R0 "Lifetime extension in range-based for loops" (PR #76361)

2024-03-18 Thread Hubert Tong via cfe-commits
@@ -6375,12 +6383,16 @@ ExprResult Sema::BuildCXXDefaultInitExpr(SourceLocation Loc, FieldDecl *Field) { ImmediateCallVisitor V(getASTContext()); if (!NestedDefaultChecking) V.TraverseDecl(Field); - if (V.HasImmediateCalls) { + if (V.HasImmediateCalls ||

[clang] [clang][C23] N3006 Underspecified object declarations (PR #79845)

2024-03-18 Thread Guillot Tony via cfe-commits
https://github.com/to268 updated https://github.com/llvm/llvm-project/pull/79845 >From f463907db6a68422c2f28d08593ab21e42c6a497 Mon Sep 17 00:00:00 2001 From: Guillot Tony Date: Mon, 29 Jan 2024 15:14:32 +0100 Subject: [PATCH 1/3] Implementation base of N3006 Underspecified object declarations

[clang] [clang][dataflow] Fix `getResultObjectLocation()` on `CXXDefaultArgExpr`. (PR #85072)

2024-03-18 Thread via cfe-commits
https://github.com/martinboehme updated https://github.com/llvm/llvm-project/pull/85072 >From dfa4da9e6a3d8a343e1fdf0ed72670148fec5a59 Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Thu, 14 Mar 2024 08:46:06 + Subject: [PATCH] [clang][dataflow] Fix `getResultObjectLocation()` on

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-03-18 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: 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:

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-03-18 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/84159 >From 7d49f0f7310c86fae986f0b84bfbf2bb6e79a745 Mon Sep 17 00:00:00 2001 From:

[clang] [clang] Set correct FPOptions if attribute 'optnone' presents (PR #85605)

2024-03-18 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff converted_to_draft https://github.com/llvm/llvm-project/pull/85605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] add some missing Kinds to libclang python bindings (PR #85571)

2024-03-18 Thread via cfe-commits
16bit-ykiko wrote: Pinging @Endilll and @linux4life798 for review. https://github.com/llvm/llvm-project/pull/85571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] add some missing Kinds to libclang python bindings (PR #85571)

2024-03-18 Thread via cfe-commits
https://github.com/16bit-ykiko edited https://github.com/llvm/llvm-project/pull/85571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix assertion failure when printing atomic apvalues (PR #85259)

2024-03-18 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/85259 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Set correct FPOptions if attribute 'optnone' presents (PR #85605)

2024-03-18 Thread John McCall via cfe-commits
rjmccall wrote: Hmm. Is there some sort of optimization in IRGen that we need to suppress here, or is it something in LLVM code gen? Presumably normal LLVM optimization passes all just skip `optnone` functions. Mostly I'm wondering how far we're expected to go with `optnone`.

[clang] [AArch64][PAC][clang][ELF] Support PAuth ABI compatibility tag (PR #85235)

2024-03-18 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/85235 >From eef1d790d1ec8cb9e0dda2b534c4ef19002ade35 Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Thu, 14 Mar 2024 12:19:26 +0300 Subject: [PATCH 1/2] [PAC][clang] Define ptrauth driver flags and preprocessor

[clang] [clang] Set correct FPOptions if attribute 'optnone' presents (PR #85605)

2024-03-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Serge Pavlov (spavloff) Changes Attribute `optnone` must turn off all optimizations including fast-math ones. Actually AST nodes in the 'optnone' function still had fast-math flags. This change implements fixing FP options before

[clang] [clang] Set correct FPOptions if attribute 'optnone' presents (PR #85605)

2024-03-18 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff created https://github.com/llvm/llvm-project/pull/85605 Attribute `optnone` must turn off all optimizations including fast-math ones. Actually AST nodes in the 'optnone' function still had fast-math flags. This change implements fixing FP options before function

[clang] [llvm] [PowerPC] Fix behavior of rldimi/rlwimi/rlwnm builtins (PR #85040)

2024-03-18 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises closed https://github.com/llvm/llvm-project/pull/85040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 65ae09e - [PowerPC] Fix behavior of rldimi/rlwimi/rlwnm builtins (#85040)

2024-03-18 Thread via cfe-commits
Author: Qiu Chaofan Date: 2024-03-18T14:17:16+08:00 New Revision: 65ae09eeb6773b14189fc67051870c8fc4eb9ae3 URL: https://github.com/llvm/llvm-project/commit/65ae09eeb6773b14189fc67051870c8fc4eb9ae3 DIFF: https://github.com/llvm/llvm-project/commit/65ae09eeb6773b14189fc67051870c8fc4eb9ae3.diff

<    1   2   3   4