[clang] [clang] Add Obj-C bridging-related attributes to C-Index API (PR #69899)

2023-10-23 Thread Jevin Sweval via cfe-commits
https://github.com/jevinskie edited https://github.com/llvm/llvm-project/pull/69899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2023-10-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/69900 We need to look at the chain of declarations to initialize the right field. >From 5b48d59166b013f375682eced512a4da937c458f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 22 Oct 2023 19:

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2023-10-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69900 >From 214cb369b518adb6ef0a046731e0e16133740917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 22 Oct 2023 19:47:33 +0200 Subject: [PATCH] [clang][Interp] IndirectMember initializers ---

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2023-10-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We need to look at the chain of declarations to initialize the right field. --- Full diff: https://github.com/llvm/llvm-project/pull/69900.diff 4 Files Affected: - (modified) clang/lib/AST/Interp/ByteCodeS

[clang-tools-extra] [InstCombine] Convert or concat to fshl if opposite or concat exists (PR #68502)

2023-10-23 Thread via cfe-commits
https://github.com/HaohaiWen updated https://github.com/llvm/llvm-project/pull/68502 >From 5b3b1bbb5b263bc5711adde031d85b1461ccbab6 Mon Sep 17 00:00:00 2001 From: Haohai Wen Date: Sat, 7 Oct 2023 13:48:32 +0800 Subject: [PATCH 1/4] [InstCombine] Refactor matchFunnelShift to allow more pattern

[clang-tools-extra] [InstCombine] Convert or concat to fshl if opposite or concat exists (PR #68502)

2023-10-23 Thread via cfe-commits
@@ -2840,6 +2841,60 @@ static Instruction *matchFunnelShift(Instruction &Or, InstCombinerImpl &IC) { return nullptr; FShiftArgs = {ShVal0, ShVal1, ShAmt}; + } else if (isa(Or0) || isa(Or1)) { +// If there are two 'or' instructions concat variables in opposite o

[clang-tools-extra] [InstCombine] Convert or concat to fshl if opposite or concat exists (PR #68502)

2023-10-23 Thread via cfe-commits
@@ -2840,6 +2841,60 @@ static Instruction *matchFunnelShift(Instruction &Or, InstCombinerImpl &IC) { return nullptr; FShiftArgs = {ShVal0, ShVal1, ShAmt}; + } else if (isa(Or0) || isa(Or1)) { +// If there are two 'or' instructions concat variables in opposite o

[clang] 5b189d6 - [clang] Fix designated initializers inside templates (#69712)

2023-10-23 Thread via cfe-commits
Author: Mariya Podchishchaeva Date: 2023-10-23T10:43:47+02:00 New Revision: 5b189d6f5606b051667b363f7430a7b990afab34 URL: https://github.com/llvm/llvm-project/commit/5b189d6f5606b051667b363f7430a7b990afab34 DIFF: https://github.com/llvm/llvm-project/commit/5b189d6f5606b051667b363f7430a7b990afab

[clang] [clang] Fix designated initializers inside templates (PR #69712)

2023-10-23 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/69712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [mlir][tosa] Check for unranked tensors during validation (PR #68509)

2023-10-23 Thread Georgios Pinitas via cfe-commits
https://github.com/GeorgeARM approved this pull request. https://github.com/llvm/llvm-project/pull/68509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [mlir][tosa] Check for unranked tensors during validation (PR #68509)

2023-10-23 Thread Georgios Pinitas via cfe-commits
https://github.com/GeorgeARM approved this pull request. https://github.com/llvm/llvm-project/pull/68509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [mlir][tosa] Check for unranked tensors during validation (PR #68509)

2023-10-23 Thread Georgios Pinitas via cfe-commits
https://github.com/GeorgeARM closed https://github.com/llvm/llvm-project/pull/68509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [mlir][tosa] Check for unranked tensors during validation (PR #68509)

2023-10-23 Thread Georgios Pinitas via cfe-commits
https://github.com/GeorgeARM closed https://github.com/llvm/llvm-project/pull/68509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Use the correct namespace for looking up matching operator!= (PR #68922)

2023-10-23 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/68922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Use the correct namespace for looking up matching operator!= (PR #68922)

2023-10-23 Thread Ilya Biryukov via cfe-commits
@@ -960,18 +960,13 @@ static bool shouldAddReversedEqEq(Sema &S, SourceLocation OpLoc, return true; } // Otherwise the search scope is the namespace scope of which F is a member. - LookupResult NonMembers(S, NotEqOp, OpLoc, - Sema::LookupNameK

[clang] Use the correct namespace for looking up matching operator!= (PR #68922)

2023-10-23 Thread Ilya Biryukov via cfe-commits
@@ -960,18 +960,13 @@ static bool shouldAddReversedEqEq(Sema &S, SourceLocation OpLoc, return true; } // Otherwise the search scope is the namespace scope of which F is a member. - LookupResult NonMembers(S, NotEqOp, OpLoc, - Sema::LookupNameK

[clang] Use the correct namespace for looking up matching operator!= (PR #68922)

2023-10-23 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov approved this pull request. https://github.com/llvm/llvm-project/pull/68922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Use the correct namespace for looking up matching operator!= (PR #68922)

2023-10-23 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: Oh, one last thing! @usx95 maybe add a test for the visibility check? Various tests with modules (search for files with the `.cppm` extension in the tests) should give a good starting point. https://github.com/llvm/llvm-project/pull/68922 ___

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov created https://github.com/llvm/llvm-project/pull/69908 `createExpansionLocImpl` has an assert that checks if we ran out of source locations. We have observed this happening on real code and in release builds the assertion does not fire and the compiler just ke

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ilya Biryukov (ilya-biryukov) Changes `createExpansionLocImpl` has an assert that checks if we ran out of source locations. We have observed this happening on real code and in release builds the assertion does not fire and the compiler ju

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall edited https://github.com/llvm/llvm-project/pull/69908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Sam McCall via cfe-commits
@@ -663,10 +663,13 @@ SourceManager::createExpansionLocImpl(const ExpansionInfo &Info, return SourceLocation::getMacroLoc(LoadedOffset); } LocalSLocEntryTable.push_back(SLocEntry::get(NextLocalOffset, Info)); - // FIXME: Produce a proper diagnostic for this case. - a

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall commented: Upgrading this from assert to diag+crash makes sense to me. Am I missing where the crash happens though? https://github.com/llvm/llvm-project/pull/69908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Sam McCall via cfe-commits
@@ -356,6 +356,8 @@ def err_file_modified : Error< "file '%0' modified since it was first processed">, DefaultFatal; def err_file_too_large : Error< "sorry, unsupported: file '%0' is too large for Clang to process">; +def err_expansions_too_large : Error< s

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Ilya Biryukov via cfe-commits
@@ -356,6 +356,8 @@ def err_file_modified : Error< "file '%0' modified since it was first processed">, DefaultFatal; def err_file_too_large : Error< "sorry, unsupported: file '%0' is too large for Clang to process">; +def err_expansions_too_large : Error< i

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov updated https://github.com/llvm/llvm-project/pull/69908 >From 6b73e1fbbad1a485ce6266dbd8d3c499956b859a Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Thu, 19 Oct 2023 17:50:38 +0200 Subject: [PATCH 1/2] [SourceManager] Report an error and crash on source lo

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Ilya Biryukov via cfe-commits
@@ -663,10 +663,13 @@ SourceManager::createExpansionLocImpl(const ExpansionInfo &Info, return SourceLocation::getMacroLoc(LoadedOffset); } LocalSLocEntryTable.push_back(SLocEntry::get(NextLocalOffset, Info)); - // FIXME: Produce a proper diagnostic for this case. - a

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/69908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Fix truncateCast() (PR #69911)

2023-10-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/69911 The added test case used to fail because we converted the LHS to `-1`. >From 6bae86e6d728996b92b0dfbbd62c254f1f32af9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 23 Oct 2023 11:43:32

[clang] [clang][Interp] Fix truncateCast() (PR #69911)

2023-10-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes The added test case used to fail because we converted the LHS to `-1`. --- Full diff: https://github.com/llvm/llvm-project/pull/69911.diff 2 Files Affected: - (modified) clang/lib/AST/Interp/IntegralAP.h (

[clang] [clang][Interp] Implement IntegralAP::truncate() (PR #69912)

2023-10-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/69912 None >From a9e872ec17d31baad095d12a1fdca15a2a5965ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 23 Oct 2023 12:23:45 +0200 Subject: [PATCH] [clang][Interp] Implement IntegralAP::trun

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/69908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Link Flang runtime on FreeBSD, NetBSD, OpenBSD, DragonFly and Haiku (PR #69817)

2023-10-23 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: These changes make sense to me, but I have no experience with these toolchains and feel that somebody more familiar with this corner of LLVM should take a look as well. https://github.com/llvm/llvm-project/pull/69817 ___ cfe-commi

[clang] [clang][Interp] Fix IntAP(s) to IntAP(s) casts (PR #69915)

2023-10-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/69915 None >From 4bc54275a7180d63450591616dab5660d85a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 23 Oct 2023 12:46:25 +0200 Subject: [PATCH] [clang][Interp] Fix IntAP(s) to IntAP(s) c

[clang] [clang][Interp] Correctly emit destructors for multi-dimensional arrays (PR #69140)

2023-10-23 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/69140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle variadic functions (PR #67814)

2023-10-23 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/67814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Only diagnose null field access in constant contexts (PR #69223)

2023-10-23 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/69223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D159351: [Sema] Change order of displayed overloads in diagnostics

2023-10-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 557839. ilya-biryukov marked 4 inline comments as done. ilya-biryukov added a comment. - Addressed comments - Added a release note Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159351/new/ https://reviews

[clang] febf5c9 - [Sema] Change order of displayed overloads in diagnostics

2023-10-23 Thread Ilya Biryukov via cfe-commits
Author: Ilya Biryukov Date: 2023-10-23T12:59:59+02:00 New Revision: febf5c97bba7910e796041c9518fce01f31ae826 URL: https://github.com/llvm/llvm-project/commit/febf5c97bba7910e796041c9518fce01f31ae826 DIFF: https://github.com/llvm/llvm-project/commit/febf5c97bba7910e796041c9518fce01f31ae826.diff

[PATCH] D159351: [Sema] Change order of displayed overloads in diagnostics

2023-10-23 Thread Ilya Biryukov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGfebf5c97bba7: [Sema] Change order of displayed overloads in diagnostics (authored by ilya-biryukov). Changed prior to commit: https://reviews.llvm

[clang] [clang][NFC] Refactor `Selector` to use `PointerIntPair` inside (PR #69916)

2023-10-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/69916 Refactor `uintptr_t` inside of `clang::Selector` that holds a pointer to `IdentifierInfo` or `MultiKeywordSelector` and `IdentifierInfoFlag` enum into `PointerIntPair`. This is a part of `PointerIntPair` migrati

[clang] [clang][NFC] Refactor `Selector` to use `PointerIntPair` inside (PR #69916)

2023-10-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes Refactor `uintptr_t` inside of `clang::Selector` that holds a pointer to `IdentifierInfo` or `MultiKeywordSelector` and `IdentifierInfoFlag` enum into `PointerIntPair`. This is a part of `PointerIntPai

[clang] [ConstantRange] Handle `Intrinsic::cttz` (PR #67917)

2023-10-23 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: @nikic Any comments about this PR? https://github.com/llvm/llvm-project/pull/67917 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [ConstantRange] Handle `Intrinsic::cttz` (PR #67917)

2023-10-23 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: @nikic Any comments about this PR? https://github.com/llvm/llvm-project/pull/67917 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-23 Thread Vlad Serebrennikov via cfe-commits
@@ -5910,6 +5910,30 @@ static void handleBuiltinAliasAttr(Sema &S, Decl *D, D->addAttr(::new (S.Context) BuiltinAliasAttr(S.Context, AL, Ident)); } +static void handleDebugInfoTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { + if (!AL.hasParsedType()) { +S.Diag(AL.get

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall approved this pull request. LG but would be great if we could fix the note! https://github.com/llvm/llvm-project/pull/69908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall edited https://github.com/llvm/llvm-project/pull/69908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Sam McCall via cfe-commits
@@ -356,6 +356,8 @@ def err_file_modified : Error< "file '%0' modified since it was first processed">, DefaultFatal; def err_file_too_large : Error< "sorry, unsupported: file '%0' is too large for Clang to process">; +def err_expansions_too_large : Error< s

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Sam McCall via cfe-commits
@@ -663,10 +663,15 @@ SourceManager::createExpansionLocImpl(const ExpansionInfo &Info, return SourceLocation::getMacroLoc(LoadedOffset); } LocalSLocEntryTable.push_back(SLocEntry::get(NextLocalOffset, Info)); - // FIXME: Produce a proper diagnostic for this case. - a

[clang] [OpenMP][OMPIRBuilder] Add support to omp target parallel (PR #67000)

2023-10-23 Thread Dominik Adamski via cfe-commits
https://github.com/DominikAdamski updated https://github.com/llvm/llvm-project/pull/67000 >From e801022968ea4a42632fbcf4c5ba03e67a32c7ae Mon Sep 17 00:00:00 2001 From: Dominik Adamski Date: Mon, 11 Sep 2023 05:31:37 -0400 Subject: [PATCH] [OpenMP][OMPIRBuilder] Add support to omp target paralle

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Ilya Biryukov via cfe-commits
@@ -663,10 +663,15 @@ SourceManager::createExpansionLocImpl(const ExpansionInfo &Info, return SourceLocation::getMacroLoc(LoadedOffset); } LocalSLocEntryTable.push_back(SLocEntry::get(NextLocalOffset, Info)); - // FIXME: Produce a proper diagnostic for this case. - a

[clang] [OpenMP][OMPIRBuilder] Add support to omp target parallel (PR #67000)

2023-10-23 Thread Dominik Adamski via cfe-commits
DominikAdamski wrote: @shraiysh `ParallelSimpleGPU` tests only the LLVM IR for the target device. `kmpc_parallel_51` is the function which needs to be executed on the GPU. The aim of this patch is to add GPU code generation for `omp target parallel pragma`. https://github.com/llvm/llvm-projec

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Ilya Biryukov via cfe-commits
@@ -356,6 +356,8 @@ def err_file_modified : Error< "file '%0' modified since it was first processed">, DefaultFatal; def err_file_too_large : Error< "sorry, unsupported: file '%0' is too large for Clang to process">; +def err_expansions_too_large : Error< i

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov updated https://github.com/llvm/llvm-project/pull/69908 >From 6b73e1fbbad1a485ce6266dbd8d3c499956b859a Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Thu, 19 Oct 2023 17:50:38 +0200 Subject: [PATCH 1/4] [SourceManager] Report an error and crash on source lo

[clang] [clang][Interp] Only emit function_param_value_unknown in C++11 (PR #67990)

2023-10-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67990 >From 0056d67f145fd0d5f8056325bc70246314c9b117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 2 Oct 2023 16:26:46 +0200 Subject: [PATCH] [clang][Interp] Only emit function_param_value_un

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Ilya Biryukov via cfe-commits
@@ -663,10 +663,15 @@ SourceManager::createExpansionLocImpl(const ExpansionInfo &Info, return SourceLocation::getMacroLoc(LoadedOffset); } LocalSLocEntryTable.push_back(SLocEntry::get(NextLocalOffset, Info)); - // FIXME: Produce a proper diagnostic for this case. - a

[clang] [clang-format] unexpected break after binOp '<<' (PR #69859)

2023-10-23 Thread Tsarkov Maksim via cfe-commits
https://github.com/s1Sharp reopened https://github.com/llvm/llvm-project/pull/69859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] unexpected break after binOp '<<' (PR #69859)

2023-10-23 Thread Tsarkov Maksim via cfe-commits
https://github.com/s1Sharp updated https://github.com/llvm/llvm-project/pull/69859 >From a5c62614113b4c42e9051905bb6165331192ded0 Mon Sep 17 00:00:00 2001 From: Tsarkov Maksim Date: Sun, 22 Oct 2023 02:09:21 +0300 Subject: [PATCH] [clang-format] unexpected break after binOp '<<' the problem oc

[clang] Use the correct namespace for looking up matching operator!= (PR #68922)

2023-10-23 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/68922 >From 8aa439a97a56ef80bfc9ccc90a9f093680e455f5 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Sun, 22 Oct 2023 11:11:53 +0200 Subject: [PATCH 1/3] rebase... --- clang/docs/ReleaseNotes.rst |

[clang] f8d448d - Correct behavior of VLA extension diagnostic in C89 mode

2023-10-23 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-10-23T08:07:59-04:00 New Revision: f8d448d5e587a23886c3226957f880146a4d8c69 URL: https://github.com/llvm/llvm-project/commit/f8d448d5e587a23886c3226957f880146a4d8c69 DIFF: https://github.com/llvm/llvm-project/commit/f8d448d5e587a23886c3226957f880146a4d8c69.diff

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Sam McCall via cfe-commits
@@ -663,10 +663,15 @@ SourceManager::createExpansionLocImpl(const ExpansionInfo &Info, return SourceLocation::getMacroLoc(LoadedOffset); } LocalSLocEntryTable.push_back(SLocEntry::get(NextLocalOffset, Info)); - // FIXME: Produce a proper diagnostic for this case. - a

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall approved this pull request. https://github.com/llvm/llvm-project/pull/69908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 596b598 - Fix Clang sphinx build

2023-10-23 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-10-23T08:08:50-04:00 New Revision: 596b59883d49efc7f41f05ebcae8b4f77e6792ef URL: https://github.com/llvm/llvm-project/commit/596b59883d49efc7f41f05ebcae8b4f77e6792ef DIFF: https://github.com/llvm/llvm-project/commit/596b59883d49efc7f41f05ebcae8b4f77e6792ef.diff

[PATCH] D156565: Diagnose use of VLAs in C++ by default

2023-10-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D156565#4654820 , @cor3ntin wrote: >> Any concerns with this approach? > > Sounds reasonable to me Thanks for the double-check! This should now be fixed in https://github.com/llvm/llvm-project/commit/f8d448d5e587a23886c

[clang] 9330261 - Use the correct namespace for looking up matching operator!= (#68922)

2023-10-23 Thread via cfe-commits
Author: Utkarsh Saxena Date: 2023-10-23T14:10:06+02:00 New Revision: 9330261143ccbe947ef0687fd20747ba47f26879 URL: https://github.com/llvm/llvm-project/commit/9330261143ccbe947ef0687fd20747ba47f26879 DIFF: https://github.com/llvm/llvm-project/commit/9330261143ccbe947ef0687fd20747ba47f26879.diff

[clang] Use the correct namespace for looking up matching operator!= (PR #68922)

2023-10-23 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/68922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Avoid non-empty unexpanded pack assertion for FunctionParmPackExpr (PR #69224)

2023-10-23 Thread Timm Baeder via cfe-commits
@@ -402,6 +402,20 @@ bool Sema::DiagnoseUnexpandedParameterPack(Expr *E, if (!E->containsUnexpandedParameterPack()) return false; + // Exception: The `CollectUnexpandedParameterPacksVisitor` collects nothing + // from a FunctionParmPackExpr. In the context where the co

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov updated https://github.com/llvm/llvm-project/pull/69908 >From 6b73e1fbbad1a485ce6266dbd8d3c499956b859a Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Thu, 19 Oct 2023 17:50:38 +0200 Subject: [PATCH 1/5] [SourceManager] Report an error and crash on source lo

[clang] [clang][Interp] Fix `ArrayInitLoopExpr` handling (PR #67886)

2023-10-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. https://github.com/llvm/llvm-project/pull/67886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Only evaluate the source array initialization of an `ArrayInitLoopExpr` once (PR #68039)

2023-10-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. https://github.com/llvm/llvm-project/pull/68039 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov updated https://github.com/llvm/llvm-project/pull/69908 >From 8767d9b2cbe699d8b160140bf168eca0f82f1c64 Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Thu, 19 Oct 2023 17:50:38 +0200 Subject: [PATCH 1/5] [SourceManager] Report an error and crash on source lo

[clang] [Clang] Handle real and imaginary parts of complex lvalue in `APValue::printPretty` (PR #69252)

2023-10-23 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/69252 >From 8f0ebe5b5cfed069c8274c0761559d6595d4dea8 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Tue, 17 Oct 2023 05:17:17 +0800 Subject: [PATCH 1/3] [Clang] Add pre-commit tests for PR69218. NFC. --- clang/te

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: I will land this, but happy to follow up if Aaron or anyone else will have comments. https://github.com/llvm/llvm-project/pull/69908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [Clang] Handle real and imaginary parts of complex lvalue in `APValue::printPretty` (PR #69252)

2023-10-23 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/69252 >From 8f0ebe5b5cfed069c8274c0761559d6595d4dea8 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Tue, 17 Oct 2023 05:17:17 +0800 Subject: [PATCH 1/3] [Clang] Add pre-commit tests for PR69218. NFC. --- clang/te

[clang] 324d1bb - [Clang] Report an error and crash on source location exhaustion in macros (#69908)

2023-10-23 Thread via cfe-commits
Author: Ilya Biryukov Date: 2023-10-23T14:29:00+02:00 New Revision: 324d1bb35aefec737ef381d98211f7771c4b0ab5 URL: https://github.com/llvm/llvm-project/commit/324d1bb35aefec737ef381d98211f7771c4b0ab5 DIFF: https://github.com/llvm/llvm-project/commit/324d1bb35aefec737ef381d98211f7771c4b0ab5.diff

[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

2023-10-23 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov closed https://github.com/llvm/llvm-project/pull/69908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Handle real and imaginary parts of complex lvalue in `APValue::printPretty` (PR #69252)

2023-10-23 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/69252 >From 6e34e74e8e8046aaa086869e8a8aecb781dd3b3b Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Tue, 17 Oct 2023 05:17:17 +0800 Subject: [PATCH 1/3] [Clang] Add pre-commit tests for PR69218. NFC. --- clang/te

[clang] [clang][dataflow] Remove `declToLocConsistent()` assertion. (PR #69819)

2023-10-23 Thread via cfe-commits
https://github.com/martinboehme updated https://github.com/llvm/llvm-project/pull/69819 >From ad60ea756566853a16b5d4e5ae9ebe61bc7fefbf Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Sat, 21 Oct 2023 08:38:35 + Subject: [PATCH] [clang][dataflow] Remove `declToLocConsistent()` assertion.

[clang] [clang][dataflow] Remove `declToLocConsistent()` assertion. (PR #69819)

2023-10-23 Thread via cfe-commits
https://github.com/martinboehme updated https://github.com/llvm/llvm-project/pull/69819 >From 4d25701821240818f2459a036703b4be3ec93435 Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Sat, 21 Oct 2023 08:38:35 + Subject: [PATCH] [clang][dataflow] Remove `declToLocConsistent()` assertion.

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-23 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/69104 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-23 Thread Aaron Ballman via cfe-commits
@@ -7219,6 +7219,31 @@ its underlying representation to be a WebAssembly ``funcref``. }]; } +def PreferredTypeDocumentation : Documentation { + let Category = DocCatField; + let Content = [{ +This attribute allows adjusting the type of a bit-field in debug information. +T

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-23 Thread Aaron Ballman via cfe-commits
@@ -7219,6 +7219,31 @@ its underlying representation to be a WebAssembly ``funcref``. }]; } +def PreferredTypeDocumentation : Documentation { + let Category = DocCatField; + let Content = [{ +This attribute allows adjusting the type of a bit-field in debug information. +T

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-23 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: The changes should also come with a release note, but I'm generally happy with the code. I did have some suggestions for changes to documentation though. https://github.com/llvm/llvm-project/pull/69104 ___ cf

[clang] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-23 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan edited https://github.com/llvm/llvm-project/pull/66769 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-23 Thread Egor Zhdan via cfe-commits
@@ -0,0 +1,202 @@ +//===--- APINotesReader.h - API Notes Reader *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang][Interp] Only emit function_param_value_unknown in C++11 (PR #67990)

2023-10-23 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/67990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Only emit function_param_value_unknown in C++11 (PR #67990)

2023-10-23 Thread Aaron Ballman via cfe-commits
@@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10.0.0 -fsyntax-only -verify %s -Winvalid-offsetof -std=c++98 -// RUN: %clang_cc1 -triple x86_64-apple-darwin10.0.0 -fsyntax-only -verify=expected,new-interp %s -Winvalid-offsetof -std=c++98 -fexperimental-new-const

[clang] [clang][Interp] Only emit function_param_value_unknown in C++11 (PR #67990)

2023-10-23 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/67990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Only diagnose null field access in constant contexts (PR #69223)

2023-10-23 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -295,7 +295,7 @@ class Pointer { bool isUnion() const; /// Checks if the storage is extern. - bool isExtern() const { return Pointee->isExtern(); } + bool isExtern() const { return Pointee && Pointee->isExtern(); } --

[clang] [clang][Interp] Handle variadic functions (PR #67814)

2023-10-23 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/67814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle variadic functions (PR #67814)

2023-10-23 Thread Aaron Ballman via cfe-commits
@@ -121,18 +121,47 @@ static bool CheckGlobal(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { namespace clang { namespace interp { +static void popArg(InterpState &S, const Expr *Arg) { + PrimType Ty = S.getContext().classify(Arg->getType()).value_or(PT_Ptr); + TYPE_SWI

[clang] [clang][Interp] Handle variadic functions (PR #67814)

2023-10-23 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/67814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Correctly emit destructors for multi-dimensional arrays (PR #69140)

2023-10-23 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/69140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't break between string literal operands of << (PR #69871)

2023-10-23 Thread Tsarkov Maksim via cfe-commits
s1Sharp wrote: this is good to be respectful. Please, lets check my mr https://github.com/llvm/llvm-project/pull/69859 also https://github.com/llvm/llvm-project/pull/69871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [clang-format] unexpected break after binOp '<<' (PR #69859)

2023-10-23 Thread Tsarkov Maksim via cfe-commits
https://github.com/s1Sharp updated https://github.com/llvm/llvm-project/pull/69859 >From 5bbff07c636c2fc8b0432e5ca615d4cd7fd0c2b1 Mon Sep 17 00:00:00 2001 From: Tsarkov Maksim Date: Sun, 22 Oct 2023 02:09:21 +0300 Subject: [PATCH] [clang-format] unexpected break after binOp '<<' the problem oc

[clang] [clang][Interp] Fix IntAP(s) to IntAP(s) casts (PR #69915)

2023-10-23 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: A bit more description about what the issue is and why this solves it would be helpful. https://github.com/llvm/llvm-project/pull/69915 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [clang][Interp] Implement IntegralAP::truncate() (PR #69912)

2023-10-23 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/69912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Only emit function_param_value_unknown in C++11 (PR #67990)

2023-10-23 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67990 >From 0056d67f145fd0d5f8056325bc70246314c9b117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 2 Oct 2023 16:26:46 +0200 Subject: [PATCH

[clang] [clang][Interp] Handle variadic functions (PR #67814)

2023-10-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67814 >From 7437589c0c37b40633b81184102202c2e01bb423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 29 Sep 2023 16:43:59 +0200 Subject: [PATCH] [clang][Interp] Handle variadic functions Simil

[clang] [clang][Interp] Fix truncateCast() (PR #69911)

2023-10-23 Thread Aaron Ballman via cfe-commits
@@ -81,14 +89,20 @@ template class IntegralAP final { } explicit operator bool() const { return !V.isZero(); } - explicit operator int8_t() const { return truncateCast(V); } - explicit operator uint8_t() const { return truncateCast(V); } - explicit operator int16_t() c

  1   2   3   4   >