[clang] [clang-format] Support of TableGen identifiers beginning with a number. (PR #78571)

2024-01-19 Thread Hirofumi Nakamura via cfe-commits
https://github.com/hnakamura5 updated https://github.com/llvm/llvm-project/pull/78571 >From b472c08735b3ce3b6f7b81e499a2ef16c3faad4a Mon Sep 17 00:00:00 2001 From: hnakamura5 Date: Thu, 18 Jan 2024 21:49:06 +0900 Subject: [PATCH 1/2] [clang-format] Support of TableGen identifiers beginning wit

[clang] [clang-format] Support of TableGen identifiers beginning with a number. (PR #78571)

2024-01-19 Thread Hirofumi Nakamura via cfe-commits
@@ -804,6 +806,46 @@ void FormatTokenLexer::handleTableGenMultilineString() { FirstLineText, MultiLineString->OriginalColumn, Style.TabWidth, Encoding); } +void FormatTokenLexer::handleTableGenNumericLikeIdentifier() { + FormatToken *Tok = Tokens.back(); + // TableGen

[clang] [AMDGPU][GFX12] Add tests for unsupported builtins (PR #78729)

2024-01-19 Thread Mariusz Sikora via cfe-commits
https://github.com/mariusz-sikora-at-amd created https://github.com/llvm/llvm-project/pull/78729 __builtin_amdgcn_mfma* and __builtin_amdgcn_smfmac* >From d5a823584487d9f6b3e9bebc8976c7891243f470 Mon Sep 17 00:00:00 2001 From: Mariusz Sikora Date: Fri, 19 Jan 2024 16:29:46 +0100 Subject: [PATC

[clang] [clang-format] Support of TableGen identifiers beginning with a number. (PR #78571)

2024-01-19 Thread Hirofumi Nakamura via cfe-commits
@@ -804,6 +806,46 @@ void FormatTokenLexer::handleTableGenMultilineString() { FirstLineText, MultiLineString->OriginalColumn, Style.TabWidth, Encoding); } +void FormatTokenLexer::handleTableGenNumericLikeIdentifier() { + FormatToken *Tok = Tokens.back(); + // TableGen

[clang] [AMDGPU][GFX12] Add tests for unsupported builtins (PR #78729)

2024-01-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mariusz Sikora (mariusz-sikora-at-amd) Changes __builtin_amdgcn_mfma* and __builtin_amdgcn_smfmac* --- Full diff: https://github.com/llvm/llvm-project/pull/78729.diff 1 Files Affected: - (added) clang/test/SemaOpenCL/builtins-amdgcn-err

[clang] [clang-format] Support of TableGen identifiers beginning with a number. (PR #78571)

2024-01-19 Thread Hirofumi Nakamura via cfe-commits
@@ -804,6 +806,46 @@ void FormatTokenLexer::handleTableGenMultilineString() { FirstLineText, MultiLineString->OriginalColumn, Style.TabWidth, Encoding); } +void FormatTokenLexer::handleTableGenNumericLikeIdentifier() { + FormatToken *Tok = Tokens.back(); + // TableGen

[clang] [clang-format] Support of TableGen identifiers beginning with a number. (PR #78571)

2024-01-19 Thread Hirofumi Nakamura via cfe-commits
@@ -804,6 +806,46 @@ void FormatTokenLexer::handleTableGenMultilineString() { FirstLineText, MultiLineString->OriginalColumn, Style.TabWidth, Encoding); } +void FormatTokenLexer::handleTableGenNumericLikeIdentifier() { + FormatToken *Tok = Tokens.back(); + // TableGen

[clang] [Clang][Sema] Diagnose use of template keyword after declarative nested-name-specifiers (PR #78595)

2024-01-19 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @cor3ntin I changed the diagnostic to a pedantic warning and added a release note. > I wonder if we should add tests for > https://cplusplus.github.io/CWG/issues/1707.html in this patch. We don't check for the template keyword when parsing an _elaborated-type-specifier_ wi

[llvm] [clang] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2024-01-19 Thread via cfe-commits
@@ -510,7 +510,8 @@ SDNode *PPCDAGToDAGISel::getGlobalBaseReg() { } // Check if a SDValue has the toc-data attribute. -static bool hasTocDataAttr(SDValue Val, unsigned PointerSize) { +static bool hasTocDataAttr(SDValue Val, unsigned PointerSize, + con

[clang] [Headers][X86] Add macro descriptions to ia32intrin.h (PR #78613)

2024-01-19 Thread Paul T Robinson via cfe-commits
@@ -411,13 +497,45 @@ __rdpmc(int __A) { /// \param __A ///Address of where to store the 32-bit \c IA32_TSC_AUX value. /// \returns The 64-bit value of the time stamp counter. +/// \see _rdtsc static __inline__ unsigned long long __DEFAULT_FN_ATTRS __rdtscp(unsigned int *

[clang] [clang][analyzer] Support 'getdelim' and 'getline' in StreamChecker (PR #78693)

2024-01-19 Thread via cfe-commits
https://github.com/NagyDonat approved this pull request. Looks reasonable. My only concern is that several recent changes introduced similar, but separate `evalXXX` methods that are used for modeling just one or two standard functions. I have a vague suspicion that these could be "standardized

[clang] [clang-format] Support of TableGen identifiers beginning with a number. (PR #78571)

2024-01-19 Thread Hirofumi Nakamura via cfe-commits
hnakamura5 wrote: I changed the algorithm of handleTableGenNumericLikeIdentifier. Stopped to follow the original implementation in llvm::TGLexer::LexToken and clarified the conditions. https://github.com/llvm/llvm-project/pull/78571 ___ cfe-commits ma

[llvm] [clang] [AMDGPU] Remove gws feature from GFX12 (PR #78711)

2024-01-19 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/78711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e21b0b0 - [AMDGPU] Remove gws feature from GFX12 (#78711)

2024-01-19 Thread via cfe-commits
Author: Jay Foad Date: 2024-01-19T15:45:53Z New Revision: e21b0b083e14dd0714a33c2d8190b377d58532fe URL: https://github.com/llvm/llvm-project/commit/e21b0b083e14dd0714a33c2d8190b377d58532fe DIFF: https://github.com/llvm/llvm-project/commit/e21b0b083e14dd0714a33c2d8190b377d58532fe.diff LOG: [AMD

[llvm] [clang] [AMDGPU] Remove gws feature from GFX12 (PR #78711)

2024-01-19 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/78711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU][GFX12] Add tests for unsupported builtins (PR #78729)

2024-01-19 Thread Jay Foad via cfe-commits
@@ -0,0 +1,105 @@ +// REQUIRES: amdgpu-registered-target jayfoad wrote: Maybe just add these to `test/CodeGenOpenCL/builtins-amdgcn-gfx12-err.cl` instead of a new file? https://github.com/llvm/llvm-project/pull/78729

[clang-tools-extra] [compiler-rt] [lldb] [clang] [libcxx] [llvm] [flang] [lld] [libc] [AMDGPU][GFX12] VOP encoding and codegen - add support for v_cvt fp8/… (PR #78414)

2024-01-19 Thread Mariusz Sikora via cfe-commits
mariusz-sikora-at-amd wrote: > Can you add a GFX12 RUN line to > clang/test/CodeGenOpenCL/builtins-amdgcn-fp8.cl? That will probably require > adding "fp8-conversion-insts" to the GFX12 part of TargetParser.cpp. You can > do this in a separate patch if you want. Done https://github.com/llvm/

[clang] [Headers][X86] Add macro descriptions to ia32intrin.h (PR #78613)

2024-01-19 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 updated https://github.com/llvm/llvm-project/pull/78613 >From e4c9272ee9cbb918347a23d2dce14c9c12765009 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Thu, 18 Jan 2024 10:50:21 -0800 Subject: [PATCH 1/3] [Headers][X86] Add macro descriptions to ia32intrin.h These a

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-19 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From 4c1f1d6427f27f7ed3cee8b49ee43a96025f2f0e Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] fix --- clang/lib/Sema/SemaTemplateInstantiate.cpp | 10 +++--- 1

[clang] CI Test - Please ignore (PR #78712)

2024-01-19 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/78712 >From be9fcddbdb01827544a7159673781263a41d31ad Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 19 Jan 2024 14:40:38 +0100 Subject: [PATCH] CI Test - Please ignore --- clang/utils/ci/buildkite-pipel

[clang-tools-extra] [lldb] [llvm] [clang] [lldb][test] Apply @expectedFailureAll/@skipIf early for debug_info tests (PR #73067)

2024-01-19 Thread Jordan Rupprecht via cfe-commits
https://github.com/rupprecht updated https://github.com/llvm/llvm-project/pull/73067 >From 22bfc5878f1f96b3138a03eea4dc856948185c89 Mon Sep 17 00:00:00 2001 From: Jordan Rupprecht Date: Tue, 21 Nov 2023 17:28:30 -0800 Subject: [PATCH 1/2] [lldb][test] Apply @expectedFailureAll/@skipIf early for

[clang-tools-extra] [llvm] [flang] [clang] [flang] add SYSTEM runtime and lowering intrinsics support (PR #74309)

2024-01-19 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/74309 >From 14f8c3e38791cc6b06455b8beffe37a6f7105e03 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 4 Dec 2023 10:32:03 + Subject: [PATCH 01/18] Add SYSTEM runtime and lowering intrinsic support Calls std::syst

[clang] [Clang] Refactor diagnostics for SME builtins. (PR #78258)

2024-01-19 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm closed https://github.com/llvm/llvm-project/pull/78258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 40a631f - [Clang] Refactor diagnostics for SME builtins. (#78258)

2024-01-19 Thread via cfe-commits
Author: Sander de Smalen Date: 2024-01-19T16:02:24Z New Revision: 40a631f452726606e1d43b5d2744aa983949af78 URL: https://github.com/llvm/llvm-project/commit/40a631f452726606e1d43b5d2744aa983949af78 DIFF: https://github.com/llvm/llvm-project/commit/40a631f452726606e1d43b5d2744aa983949af78.diff L

[llvm] [clang] [AArch64][SME2] Refine fcvtu/fcvts/scvtf/ucvtf (PR #77947)

2024-01-19 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau updated https://github.com/llvm/llvm-project/pull/77947 >From 5b2206518e380e8a5ee020f8ff12137cdda4cfa2 Mon Sep 17 00:00:00 2001 From: Matt Devereau Date: Fri, 12 Jan 2024 14:01:10 + Subject: [PATCH 1/2] [AArch64][SME2] Refine fcvtu/fcvts/scvtf/ucvtf Rename intr

[llvm] [clang] [AArch64][SME2] Refine fcvtu/fcvts/scvtf/ucvtf (PR #77947)

2024-01-19 Thread Matthew Devereau via cfe-commits
@@ -10056,7 +10056,7 @@ CodeGenFunction::getSVEOverloadTypes(const SVETypeFlags &TypeFlags, llvm::Type *DefaultType = getSVEType(TypeFlags); - if (TypeFlags.isOverloadWhile()) + if (TypeFlags.isOverloadWhile() || TypeFlags.isOverloadMultiVecCvt()) MDever

[llvm] [clang] [AArch64][SME2] Refine fcvtu/fcvts/scvtf/ucvtf (PR #77947)

2024-01-19 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau edited https://github.com/llvm/llvm-project/pull/77947 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [AArch64][SME2] Refine fcvtu/fcvts/scvtf/ucvtf (PR #77947)

2024-01-19 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/77947 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] CI Test - Please ignore (PR #78712)

2024-01-19 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/78712 >From 5949270c8eaf01777e0b09222bac03aaa3ca57b2 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 19 Jan 2024 14:40:38 +0100 Subject: [PATCH] CI Test - Please ignore --- clang/utils/ci/buildkite-pipel

[clang] [clang][dataflow] Treat comma operator correctly in `getResultObjectLocation()`. (PR #78427)

2024-01-19 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/78427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-01-19 Thread Sam Tebbs via cfe-commits
@@ -814,6 +821,42 @@ Address AArch64ABIInfo::EmitMSVAArg(CodeGenFunction &CGF, Address VAListAddr, /*allowHigherAlign*/ false); } +void AArch64TargetCodeGenInfo::checkFunctionCallABI( +CodeGenModule &CGM, SourceLocation CallLoc, const FunctionDec

[clang] [libc++] fix _Atomic c11 compare exchange does not update expected results (PR #78707)

2024-01-19 Thread via cfe-commits
https://github.com/huixie90 edited https://github.com/llvm/llvm-project/pull/78707 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Cygwin] Cygwin driver (PR #74933)

2024-01-19 Thread 徐持恒 Xu Chiheng via cfe-commits
https://github.com/xu-chiheng edited https://github.com/llvm/llvm-project/pull/74933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Treat comma operator correctly in `getResultObjectLocation()`. (PR #78427)

2024-01-19 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: > This has been pretty lengthy, but I hope it gives more context. Yeah, this was really helpful, thanks! This makes a lot of sense to me, I agree that this is a facility that we need. On the other hand, I am still wondering whether it is a good idea to expose this publicly to

[clang] [Cygwin] Cygwin general 0 (PR #74936)

2024-01-19 Thread 徐持恒 Xu Chiheng via cfe-commits
https://github.com/xu-chiheng edited https://github.com/llvm/llvm-project/pull/74936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Allow elaborated-type-specifiers that declare member class template explict specializations (PR #78720)

2024-01-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Changes to DR tests look good. https://github.com/llvm/llvm-project/pull/78720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Cygwin] Cygwin macro (PR #74973)

2024-01-19 Thread 徐持恒 Xu Chiheng via cfe-commits
https://github.com/xu-chiheng edited https://github.com/llvm/llvm-project/pull/74973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Cygwin] Cygwin CGCall.h (PR #74977)

2024-01-19 Thread 徐持恒 Xu Chiheng via cfe-commits
https://github.com/xu-chiheng edited https://github.com/llvm/llvm-project/pull/74977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix for enums overflowing (#24667) (PR #78742)

2024-01-19 Thread via cfe-commits
https://github.com/wheatman created https://github.com/llvm/llvm-project/pull/78742 Enums which do not have a specified type can only grow to bigger types which contain more bits than the prior types. This means that the largest signed integer type cannot grow to the largest unsigned integer

[clang] [clang][Sema] Fix for enums overflowing (#24667) (PR #78742)

2024-01-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (wheatman) Changes Enums which do not have a specified type can only grow to bigger types which contain more bits than the prior types. This means that the largest signed integer type cannot grow to the largest unsigned integer type

[clang] [Cygwin] Cygwin basic support (PR #76943)

2024-01-19 Thread 徐持恒 Xu Chiheng via cfe-commits
https://github.com/xu-chiheng edited https://github.com/llvm/llvm-project/pull/76943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add a "don't override" mapping for -fvisibility-from-dllstorageclass (PR #74629)

2024-01-19 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/74629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix for enums overflowing (#24667) (PR #78742)

2024-01-19 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 5f41cef58f72ebe950cc9777a8e29d1d28e543d4 0bee966adc8c16ecdf6aa6d8a47f4837ebc3d771 --

[clang] [lldb] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-19 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Ping @rjmccall for Itanium mangling expertise to make sure we're matching the spec. There are a few merge conflicts that also cropped up which need to be resolved, but overall I think this is pretty close to ready to try to re-land. It would be nice

[lldb] [clang-tools-extra] [clang] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

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

[clang-tools-extra] [lldb] [clang] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-19 Thread Aaron Ballman via cfe-commits
@@ -4833,9 +4833,26 @@ void CXXNameMangler::mangleExpression(const Expr *E, unsigned Arity, E = cast(E)->getSubExpr(); goto recurse; - case Expr::SubstNonTypeTemplateParmExprClass: + case Expr::SubstNonTypeTemplateParmExprClass: { +// Mangle a substituted parame

[lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-19 Thread Aaron Ballman via cfe-commits
@@ -6472,7 +6494,20 @@ void CXXNameMangler::mangleValueInTemplateArg(QualType T, const APValue &V, Out << "plcvPcad"; Kind = Offset; } else { - if (!V.getLValuePath().empty() || V.isLValueOnePastTheEnd()) { + // Clang 11 and before mangled an array su

[clang-tools-extra] [clang] [lldb] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-19 Thread Aaron Ballman via cfe-commits
@@ -5401,6 +5409,8 @@ std::string CGDebugInfo::GetName(const Decl *D, bool Qualified) const { // feasible some day. return TA.getAsIntegral().getBitWidth() <= 64 && IsReconstitutableType(TA.getIntegralType()); + case Template

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/78315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread Balazs Benics via cfe-commits
@@ -318,17 +396,87 @@ static Messages getTaintMsgs(const SubRegion *Region, const char *OffsetName) { RegName, OffsetName)}; } -void ArrayBoundCheckerV2::performCheck(const Expr *E, CheckerContext &C) const { - // NOTE: Instead of using ProgramState::assum

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: I only scrolled through the patch. But I find it pretty good. I still need to go over the message construction and the tests along with it, and also to look for more logic bugs. https://github.com/llvm/llvm-project/pull/78315 __

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread Balazs Benics via cfe-commits
@@ -133,12 +195,19 @@ computeOffset(ProgramStateRef State, SValBuilder &SVB, SVal Location) { return std::nullopt; } -// TODO: once the constraint manager is smart enough to handle non simplified -// symbolic expressions remove this function. Note that this can not be used

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread Balazs Benics via cfe-commits
@@ -318,17 +396,87 @@ static Messages getTaintMsgs(const SubRegion *Region, const char *OffsetName) { RegName, OffsetName)}; } -void ArrayBoundCheckerV2::performCheck(const Expr *E, CheckerContext &C) const { - // NOTE: Instead of using ProgramState::assum

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,128 @@ +// RUN: %clang_analyze_cc1 -Wno-array-bounds -analyzer-output=text\ +// RUN: -analyzer-checker=core,alpha.security.ArrayBoundV2,unix.Malloc,alpha.security.taint,debug.ExprInspection -verify %s + +int array[10]; + +void clang_analyzer_value(unsigned

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread Balazs Benics via cfe-commits
@@ -318,17 +396,87 @@ static Messages getTaintMsgs(const SubRegion *Region, const char *OffsetName) { RegName, OffsetName)}; } -void ArrayBoundCheckerV2::performCheck(const Expr *E, CheckerContext &C) const { - // NOTE: Instead of using ProgramState::assum

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread Balazs Benics via cfe-commits
@@ -33,7 +33,66 @@ using namespace taint; using llvm::formatv; namespace { -enum OOB_Kind { OOB_Precedes, OOB_Exceeds, OOB_Taint }; +class StateUpdateReporter { + const SubRegion *Reg; + NonLoc ByteOffsetVal; + std::optional ElementType = std::nullopt; + std::optional Elem

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread Balazs Benics via cfe-commits
@@ -350,6 +498,10 @@ void ArrayBoundCheckerV2::performCheck(const Expr *E, CheckerContext &C) const { auto [Reg, ByteOffset] = *RawOffset; + // The state updates will be reported as a single note tag, which will be + // composed by this helper class. + StateUpdateReport

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread Balazs Benics via cfe-commits
@@ -33,7 +33,66 @@ using namespace taint; using llvm::formatv; namespace { -enum OOB_Kind { OOB_Precedes, OOB_Exceeds, OOB_Taint }; +class StateUpdateReporter { + const SubRegion *Reg; + NonLoc ByteOffsetVal; + std::optional ElementType = std::nullopt; + std::optional Elem

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread Balazs Benics via cfe-commits
@@ -255,7 +319,28 @@ static Messages getPrecedesMsgs(const SubRegion *Region, NonLoc Offset) { Out << "Access of " << RegName << " at negative byte offset"; if (auto ConcreteIdx = Offset.getAs()) Out << ' ' << ConcreteIdx->getValue(); - return {getShortMsg(OOB_Precede

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread Balazs Benics via cfe-commits
@@ -318,17 +396,87 @@ static Messages getTaintMsgs(const SubRegion *Region, const char *OffsetName) { RegName, OffsetName)}; } -void ArrayBoundCheckerV2::performCheck(const Expr *E, CheckerContext &C) const { - // NOTE: Instead of using ProgramState::assum

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread Balazs Benics via cfe-commits
@@ -33,7 +33,66 @@ using namespace taint; using llvm::formatv; namespace { -enum OOB_Kind { OOB_Precedes, OOB_Exceeds, OOB_Taint }; +class StateUpdateReporter { + const SubRegion *Reg; + NonLoc ByteOffsetVal; + std::optional ElementType = std::nullopt; + std::optional Elem

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread Balazs Benics via cfe-commits
@@ -381,66 +542,98 @@ void ArrayBoundCheckerV2::performCheck(const Expr *E, CheckerContext &C) const { compareValueToThreshold(State, ByteOffset, *KnownSize, SVB); if (ExceedsUpperBound) { + // The offset may be invalid (>= Size)... if (!WithinUpperBou

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread Balazs Benics via cfe-commits
@@ -133,12 +195,19 @@ computeOffset(ProgramStateRef State, SValBuilder &SVB, SVal Location) { return std::nullopt; } -// TODO: once the constraint manager is smart enough to handle non simplified -// symbolic expressions remove this function. Note that this can not be used

[clang] [clang][Sema] Fix for enums overflowing (#24667) (PR #78742)

2024-01-19 Thread via cfe-commits
https://github.com/wheatman updated https://github.com/llvm/llvm-project/pull/78742 >From 62b80540e0cccbc938eb74f1d77ebdf2140e8192 Mon Sep 17 00:00:00 2001 From: Brian Wheatman Date: Fri, 19 Jan 2024 11:13:33 -0500 Subject: [PATCH] [clang][Sema] Fix for enums overflowing (#24667) Enums which d

[clang] [Sema] Provide `-fvisibility-global-new-delete=` option (PR #75364)

2024-01-19 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 edited https://github.com/llvm/llvm-project/pull/75364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Provide `-fvisibility-global-new-delete=` option (PR #75364)

2024-01-19 Thread Paul T Robinson via cfe-commits
@@ -359,6 +359,12 @@ void toolchains::PS4PS5Base::addClangTargetOptions( CC1Args.push_back("-fno-use-init-array"); + // Default to -fglobal-new-delete-visibility=source for PS5. pogo59 wrote: Spelling in comment needs to match the option spelling. https:

[clang] [Sema] Provide `-fvisibility-global-new-delete=` option (PR #75364)

2024-01-19 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 commented: I'm okay with the PS5-specific bits. Other people should have a chance to chime in so I won't mark it approved. https://github.com/llvm/llvm-project/pull/75364 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-19 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, thank you! https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Better bitfield access units (PR #65742)

2024-01-19 Thread Nathan Sidwell via cfe-commits
@@ -376,33 +377,41 @@ void CGRecordLowering::lowerUnion(bool isNoUniqueAddress) { } void CGRecordLowering::accumulateFields() { - for (RecordDecl::field_iterator Field = D->field_begin(), - FieldEnd = D->field_end(); -Field != FieldEnd;)

[clang] [clang][analyzer] Support 'getdelim' and 'getline' in StreamChecker (PR #78693)

2024-01-19 Thread Balázs Kéri via cfe-commits
balazske wrote: I have already a working code to simplify code repetitions, but want to merge first patches #76979 and #78180 (@NagyDonat could you look at these too?). https://github.com/llvm/llvm-project/pull/78693 ___ cfe-commits mailing list cfe-

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2024-01-19 Thread Mark de Wever via cfe-commits
@@ -0,0 +1,40 @@ +// Test that -print-library-module-manifest-path finds the correct file. + +// RUN: rm -rf %t mordante wrote: I copied the 3 line version from another test, I'll fix it. https://github.com/llvm/llvm-project/pull/76451 __

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2024-01-19 Thread Mark de Wever via cfe-commits
@@ -0,0 +1,40 @@ +// Test that -print-library-module-manifest-path finds the correct file. + +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: touch %t/libc++.so +// RUN: split-file %s %t +// RUN: cd %t + +// RUN: %clang -print-library-module-manifest-path \ +// RUN: -stdlib=li

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2024-01-19 Thread Mark de Wever via cfe-commits
@@ -0,0 +1,40 @@ +// Test that -print-library-module-manifest-path finds the correct file. mordante wrote: not per se, I thought this was common in clang, I'll remove it. https://github.com/llvm/llvm-project/pull/76451 ___

[clang] [llvm] [clang-tools-extra] [CLANG] Add warning when INF or NAN are used in a binary operation or as function argument in fast math mode. (PR #76873)

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

[clang-tools-extra] [llvm] [clang] [CLANG] Add warning when INF or NAN are used in a binary operation or as function argument in fast math mode. (PR #76873)

2024-01-19 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,178 @@ +// RUN: %clang_cc1 -x c++ -verify=no-inf-no-nan -triple powerpc64le-unknown-unknown %s \ +// RUN: -menable-no-infs -menable-no-nans + +// RUN: %clang_cc1 -x c++ -verify -triple powerpc64le-unknown-unknown %s \ +// RUN: -DNOFAST=1 + +// RUN: %clang_cc1 -x c++ -v

[llvm] [clang-tools-extra] [clang] [CLANG] Add warning when INF or NAN are used in a binary operation or as function argument in fast math mode. (PR #76873)

2024-01-19 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. The changes LGTM aside from some minor improvements to the tests. https://github.com/llvm/llvm-project/pull/76873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[llvm] [clang-tools-extra] [clang] [CLANG] Add warning when INF or NAN are used in a binary operation or as function argument in fast math mode. (PR #76873)

2024-01-19 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,181 @@ +// Use of NAN macro will trigger a warning "infinity defined in macro" because +// on Windows the NAN macro is defined using INFINITY. See below. + +// RUN: %clang_cc1 -x c++ -verify=no-inf-no-nan -triple powerpc64le-unknown-unknown %s \ +// RUN: -menable-no-in

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2024-01-19 Thread Mark de Wever via cfe-commits
https://github.com/mordante updated https://github.com/llvm/llvm-project/pull/76451 >From f3f0db64da4d341f8e4a2054f9f25c87f8eda829 Mon Sep 17 00:00:00 2001 From: Mark de Wever Date: Wed, 27 Dec 2023 17:34:10 +0100 Subject: [PATCH 1/6] [clang][modules] Print library module manifest path. This i

[llvm] [clang-tools-extra] [clang] [libc] [mlir] [lldb] [lldb][test] Apply @expectedFailureAll/@skipIf early for debug_info tests (PR #73067)

2024-01-19 Thread Jordan Rupprecht via cfe-commits
https://github.com/rupprecht closed https://github.com/llvm/llvm-project/pull/73067 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread via cfe-commits
@@ -33,7 +33,66 @@ using namespace taint; using llvm::formatv; namespace { -enum OOB_Kind { OOB_Precedes, OOB_Exceeds, OOB_Taint }; +class StateUpdateReporter { + const SubRegion *Reg; + NonLoc ByteOffsetVal; + std::optional ElementType = std::nullopt; + std::optional Elem

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread via cfe-commits
@@ -33,7 +33,66 @@ using namespace taint; using llvm::formatv; namespace { -enum OOB_Kind { OOB_Precedes, OOB_Exceeds, OOB_Taint }; +class StateUpdateReporter { + const SubRegion *Reg; + NonLoc ByteOffsetVal; + std::optional ElementType = std::nullopt; + std::optional Elem

[clang-tools-extra] [llvm] [compiler-rt] [clang] [flang] [Flang][OpenMP] Restructure recursive lowering in `createBodyOfOp` (PR #77761)

2024-01-19 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/77761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [compiler-rt] [flang] [clang-tools-extra] [Flang][OpenMP] Restructure recursive lowering in `createBodyOfOp` (PR #77761)

2024-01-19 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan edited https://github.com/llvm/llvm-project/pull/77761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [clang] [flang] [clang-tools-extra] [llvm] [Flang][OpenMP] Restructure recursive lowering in `createBodyOfOp` (PR #77761)

2024-01-19 Thread Kiran Chandramohan via cfe-commits
@@ -2223,37 +2247,64 @@ static void createBodyOfOp( mlir::omp::YieldOp>( firOpBuilder, eval.getNestedEvaluations()); - // Insert the terminator. - Fortran::lower::genOpenMPTerminator(firOpBuilder, op.getOperation(), loc); -

[llvm] [flang] [compiler-rt] [clang] [clang-tools-extra] [Flang][OpenMP] Restructure recursive lowering in `createBodyOfOp` (PR #77761)

2024-01-19 Thread Kiran Chandramohan via cfe-commits
@@ -2223,37 +,100 @@ static void createBodyOfOp( mlir::omp::YieldOp>( firOpBuilder, eval.getNestedEvaluations()); - // Insert the terminator. - Fortran::lower::genOpenMPTerminator(firOpBuilder, op.getOperation(), loc);

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

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

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-19 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Please be sure to add a release note about the fix to clang/docs/ReleaseNotes.rst. https://github.com/llvm/llvm-project/pull/78088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-19 Thread Aaron Ballman via cfe-commits
@@ -7081,10 +7085,10 @@ QualType TreeTransform::TransformAttributedType( // FIXME: dependent operand expressions? if (getDerived().AlwaysRebuild() || modifiedType != oldType->getModifiedType()) { -// TODO: this is really lame; we should really be rebuilding the -

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-19 Thread Aaron Ballman via cfe-commits
@@ -6124,7 +6124,11 @@ QualType TreeTransform::TransformFunctionProtoType( // "pointer to cv-qualifier-seq X" between the optional cv-qualifer-seq // and the end of the function-definition, member-declarator, or // declarator. - Sema::CXXThisScopeR

[clang] [Cygwin] Cygwin CGCall.h (PR #74977)

2024-01-19 Thread 徐持恒 Xu Chiheng via cfe-commits
https://github.com/xu-chiheng closed https://github.com/llvm/llvm-project/pull/74977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread via cfe-commits
@@ -133,12 +195,19 @@ computeOffset(ProgramStateRef State, SValBuilder &SVB, SVal Location) { return std::nullopt; } -// TODO: once the constraint manager is smart enough to handle non simplified -// symbolic expressions remove this function. Note that this can not be used

[libcxxabi] [mlir] [llvm] [libc] [lldb] [libunwind] [clang] [compiler-rt] [flang] [clang-tools-extra] [libcxx] [polly] [libc++][any] LWG3305: `any_cast` (PR #78215)

2024-01-19 Thread Mark de Wever via cfe-commits
https://github.com/mordante approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/78215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libc] [llvm] [mlir] [libcxx] [lldb] [libcxxabi] [polly] [flang] [libunwind] [compiler-rt] [clang] [clang-tools-extra] [libc++][any] LWG3305: `any_cast` (PR #78215)

2024-01-19 Thread Mark de Wever via cfe-commits
@@ -555,6 +556,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _ValueType template inline _LIBCPP_HIDE_FROM_ABI add_pointer_t> any_cast(any const* __any) _NOEXCEPT { + static_assert(!is_void_v<_ValueType>, "_ValueType may not be void."); -

[clang-tools-extra] [llvm] [mlir] [libcxx] [compiler-rt] [clang] [libc] [lldb] [libcxxabi] [polly] [libunwind] [flang] [libc++][any] LWG3305: `any_cast` (PR #78215)

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

[compiler-rt] [clang] [flang] [clang-tools-extra] [llvm] [Flang][OpenMP] Restructure recursive lowering in `createBodyOfOp` (PR #77761)

2024-01-19 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz updated https://github.com/llvm/llvm-project/pull/77761 >From 62f31654ec66fe0e2a27200d0484d3c70d4ce2c1 Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Wed, 20 Dec 2023 15:12:04 -0600 Subject: [PATCH 01/11] [Flang][OpenMP] Separate creation of work-sharing an

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread via cfe-commits
@@ -133,12 +195,19 @@ computeOffset(ProgramStateRef State, SValBuilder &SVB, SVal Location) { return std::nullopt; } -// TODO: once the constraint manager is smart enough to handle non simplified -// symbolic expressions remove this function. Note that this can not be used

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-19 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: https://github.com/AaronBallman approved this pull request. LGTM but please do not land until after the Clang 18 branch next Tuesday. https://github.c

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread via cfe-commits
@@ -318,17 +396,87 @@ static Messages getTaintMsgs(const SubRegion *Region, const char *OffsetName) { RegName, OffsetName)}; } -void ArrayBoundCheckerV2::performCheck(const Expr *E, CheckerContext &C) const { - // NOTE: Instead of using ProgramState::assum

[clang-tools-extra] [llvm] [clang] [Clang][Sema] Print more static_assert exprs (PR #74852)

2024-01-19 Thread via cfe-commits
https://github.com/sethp updated https://github.com/llvm/llvm-project/pull/74852 >From f281d34a51f662c934f158e4770774b0dc3588a2 Mon Sep 17 00:00:00 2001 From: Seth Pellegrino Date: Thu, 7 Dec 2023 08:45:51 -0800 Subject: [PATCH 01/12] [Clang][Sema] Print more static_assert exprs This change int

[clang] [libc++] fix _Atomic c11 compare exchange does not update expected results (PR #78707)

2024-01-19 Thread Louis Dionne via cfe-commits
@@ -408,7 +409,15 @@ static void emitAtomicCmpXchg(CodeGenFunction &CGF, AtomicExpr *E, bool IsWeak, CGF.Builder.SetInsertPoint(StoreExpectedBB); // Update the memory at Expected with Old's value. - CGF.Builder.CreateStore(Old, Val1); + + llvm::Type *ExpectedType = Expe

<    1   2   3   4   5   6   >