[clang] 1d7b59c - [clang][dataflow] Fix two null pointer dereferences in `getMemberForAccessor()`. (#66742)

2023-09-19 Thread via cfe-commits
Author: martinboehme Date: 2023-09-19T09:03:20+02:00 New Revision: 1d7b59ca8ddb0b189a036a8f7e26f7e6deb73038 URL: https://github.com/llvm/llvm-project/commit/1d7b59ca8ddb0b189a036a8f7e26f7e6deb73038 DIFF: https://github.com/llvm/llvm-project/commit/1d7b59ca8ddb0b189a036a8f7e26f7e6deb73038.diff

[clang] [clang][dataflow] Fix two null pointer dereferences in `getMemberForAccessor()`. (PR #66742)

2023-09-19 Thread via cfe-commits
https://github.com/martinboehme closed https://github.com/llvm/llvm-project/pull/66742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstCombine] Canonicalize `and(zext(A), B)` into `select A, B & 1, 0` (PR #66740)

2023-09-19 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > We should use rebase instead of merge. And I recommend force push to change > the code before the review starts. I am confused with the LLVM GitHub user guide. I witnessed someone mess up by doing rebase + force push. Examples: #65853 #65543 #65535 https://github.com/llvm/ll

[PATCH] D159519: [clang][AST][ASTImporter] improve AST comparasion on VarDecl & GotoStmt

2023-09-19 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky added a comment. ping~ @donat.nagy @steakhal @balazske Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159519/new/ https://reviews.llvm.org/D159519 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [NFC][Clang][Headers] Update refs to ACLE in comments (PR #66662)

2023-09-19 Thread Kristof Beyls via cfe-commits
@@ -20,8 +20,8 @@ extern "C" { kbeyls wrote: Thanks, all of these updates look correct to me. Since these all refer to sections in a document, I think it may be useful too to add a hyperlink at the top of the document to where the ACLE lives. I think the correc

[clang] [NFC][Clang][Headers] Update refs to ACLE in comments (PR #66662)

2023-09-19 Thread Victor Campos via cfe-commits
@@ -20,8 +20,8 @@ extern "C" { vhscampos wrote: Thanks @Blue-Dot for the patch. I agree with @kbeyls that it would be a good idea. https://github.com/llvm/llvm-project/pull/2 ___ cfe-commits mailing list cfe-comm

[PATCH] D117181: [PowerPC] Use IEEE long double in proper toolchain

2023-09-19 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf abandoned this revision. qiucf added a comment. Determining float ABI by system library without explicit options may cause confusion. Since Fedora has successfully switched using ieeelongdouble on ppc64le (https://developers.redhat.com/articles/2023/05/16/benefits-fedora-38-long-double-tr

[PATCH] D116016: [Clang] [PowerPC] Emit module flag for current float abi

2023-09-19 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. Gentle ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116016/new/ https://reviews.llvm.org/D116016 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [clang][Driver] Obey -fuse-ld=... for -print-prog-name=ld output (PR #66698)

2023-09-19 Thread Petr Hosek via cfe-commits
petrhosek wrote: To give you a concrete example, I recently encountered this issue when compiling [libffi](https://github.com/libffi/libffi). https://github.com/llvm/llvm-project/pull/66698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [NFC][Clang][Headers] Update refs to ACLE in comments (PR #66662)

2023-09-19 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/2 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang][Headers] Update refs to ACLE in comments (PR #66662)

2023-09-19 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett commented: If these section refs weren't already here I'd suggest not adding numbers at all given that they will change later, and Firefox and Chrome seem hopeless at searching for them in the HTML document. But we have them already so I won't suggest that :) T

[clang] [NFC][Clang][Headers] Update refs to ACLE in comments (PR #66662)

2023-09-19 Thread David Spickett via cfe-commits
@@ -32,7 +32,7 @@ extern "C" { #define __isb(i) __builtin_arm_isb(i) #endif -/* 8.4 Hints */ +/* 7.4 Hints */ DavidSpickett wrote: If we're matching the section titles then they should have the extra `.` on the end of the number, so here `7.4. Hints`. Just t

[clang] [NFC][Clang][Headers] Update refs to ACLE in comments (PR #66662)

2023-09-19 Thread David Spickett via cfe-commits
@@ -20,8 +20,8 @@ extern "C" { DavidSpickett wrote: You may want to note that section numbers were correct at time of writing, if they've changed then look for the section title. https://github.com/llvm/llvm-project/pull/2 _

[clang] [clang][dataflow] Identify post-visit state changes in the HTML logger. (PR #66746)

2023-09-19 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/66746 Previously, post-visit state changes were indistinguishable from ordinary iterations, which could give a confusing picture of how many iterations a block needs to converge. Now, post-visit state changes are

[clang] [clang][dataflow] Identify post-visit state changes in the HTML logger. (PR #66746)

2023-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Changes Previously, post-visit state changes were indistinguishable from ordinary iterations, which could give a confusing picture of how many iterations a block needs to converge. Now, post-visit state changes are marked with "post-visit"

[clang] [clang][dataflow] Identify post-visit state changes in the HTML logger. (PR #66746)

2023-09-19 Thread via cfe-commits
https://github.com/martinboehme edited https://github.com/llvm/llvm-project/pull/66746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support target names with dots in more utilities (PR #65812)

2023-09-19 Thread James Henderson via cfe-commits
https://github.com/jh7370 edited https://github.com/llvm/llvm-project/pull/65812 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support target names with dots in more utilities (PR #65812)

2023-09-19 Thread James Henderson via cfe-commits
@@ -1696,6 +1696,40 @@ TEST(Support, ReplacePathPrefix) { EXPECT_EQ(Path, "C:\\old/foo\\bar"); } +TEST(Support, FindProgramName) { + StringRef WindowsProgName = + path::program_name("C:\\Test\\foo.exe", path::Style::windows); + EXPECT_EQ(WindowsProgName, "foo"); + +

[clang] Support target names with dots in more utilities (PR #65812)

2023-09-19 Thread James Henderson via cfe-commits
@@ -5,11 +5,14 @@ # RUN: mkdir %t # RUN: ln -s llvm-ranlib %t/llvm-ranlib-9 # RUN: ln -s llvm-ranlib %t/ranlib.exe +# RUN: ln -s llvm-ranlib %t/x86_64-unknown-freebsd13.2-llvm-ranlib jh7370 wrote: Let's put the new test files and deletion of this old test in a

[clang] [clang][Interp] Emit dummy values for unknown C variables (PR #66749)

2023-09-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/66749 We can't load anything from them, but we can still take their address or return them as lvalues. >From 9952d03bf25766ada5a41c13c3be45f9bd1e8bf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date

[clang] [clang][Interp] Emit dummy values for unknown C variables (PR #66749)

2023-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes We can't load anything from them, but we can still take their address or return them as lvalues. --- Full diff: https://github.com/llvm/llvm-project/pull/66749.diff 5 Files Affected: - (modified) clang/lib/AST/Interp/ByteCodeExprGen.cpp

[clang] [NFC] Preparatory work for D153131 (PR #66750)

2023-09-19 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle created https://github.com/llvm/llvm-project/pull/66750 None >From 3679b5c95a8de88a5cabc9ecdacdbbfef9c68ea8 Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Tue, 19 Sep 2023 10:19:49 +0200 Subject: [PATCH] [NFC] Preparatory work for D153131 --- clang/lib/A

[PATCH] D141800: [clangd] Fix qualifier not being dropped for using declaration referring to scoped enum

2023-09-19 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. (friendly ping) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141800/new/ https://reviews.llvm.org/D141800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [InstCombine] Canonicalize `and(zext(A), B)` into `select A, B & 1, 0` (PR #66740)

2023-09-19 Thread Nikita Popov via cfe-commits
nikic wrote: I think this is the right canonicalization at the IR level, as select allows better analysis than zext(icmp). However, this seems to be universally worse for the backend: https://llvm.godbolt.org/z/Yh7brfc8b So I think we would need an SDAG undo transform. Interestingly, this alre

[clang] c809051 - [NFC] Preparatory work for D153131 (#66750)

2023-09-19 Thread via cfe-commits
Author: Clement Courbet Date: 2023-09-19T11:02:00+02:00 New Revision: c8090512157ab0aad1e43e398598e689b7e55a52 URL: https://github.com/llvm/llvm-project/commit/c8090512157ab0aad1e43e398598e689b7e55a52 DIFF: https://github.com/llvm/llvm-project/commit/c8090512157ab0aad1e43e398598e689b7e55a52.dif

[clang] [NFC] Preparatory work for D153131 (PR #66750)

2023-09-19 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle closed https://github.com/llvm/llvm-project/pull/66750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 97495d3 - [analyzer] TaintPropagation checker strlen() should not propagate (#66086)

2023-09-19 Thread via cfe-commits
Author: Daniel Krupp Date: 2023-09-19T11:04:50+02:00 New Revision: 97495d3159799677c2dea8516f2246854c19d007 URL: https://github.com/llvm/llvm-project/commit/97495d3159799677c2dea8516f2246854c19d007 DIFF: https://github.com/llvm/llvm-project/commit/97495d3159799677c2dea8516f2246854c19d007.diff

[clang] [analyzer] TaintPropagation checker strlen() should not propagate (PR #66086)

2023-09-19 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp closed https://github.com/llvm/llvm-project/pull/66086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D153131: [clang analysis][thread-safety] Handle return-by-reference...

2023-09-19 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 557015. courbet marked an inline comment as done. courbet added a comment. Rebase on NFC changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153131/new/ https://reviews.llvm.org/D153131 Files: clang/includ

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/66636 >From d11d546f3190936ba45c57b4825073026d817878 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 25 Aug 2023 14:07:32 -0400 Subject: [PATCH 1/2] [clang] remove ClassScopeFunctionSpecializationDecl

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/66636 >From d11d546f3190936ba45c57b4825073026d817878 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 25 Aug 2023 14:07:32 -0400 Subject: [PATCH 1/2] [clang] remove ClassScopeFunctionSpecializationDecl

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian resolved https://github.com/llvm/llvm-project/pull/66636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian resolved https://github.com/llvm/llvm-project/pull/66636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian resolved https://github.com/llvm/llvm-project/pull/66636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian resolved https://github.com/llvm/llvm-project/pull/66636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/66636 >From d11d546f3190936ba45c57b4825073026d817878 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 25 Aug 2023 14:07:32 -0400 Subject: [PATCH 1/2] [clang] remove ClassScopeFunctionSpecializationDecl

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett requested changes to this pull request. This looks really nice. Two overall things: Now that ARM and AArch64 print more than just names, they should have column headers like RISC-V does. Name / Description The clang test case `clang/test/Driver/print-supported-

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread David Spickett via cfe-commits
@@ -600,11 +601,17 @@ StringRef ARM::getARMCPUForArch(const llvm::Triple &Triple, StringRef MArch) { llvm_unreachable("invalid arch name"); } -void ARM::PrintSupportedExtensions() { +void ARM::PrintSupportedExtensions(std::map llvmDescMap) { outs() << "All available -ma

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread David Spickett via cfe-commits
@@ -600,11 +601,17 @@ StringRef ARM::getARMCPUForArch(const llvm::Triple &Triple, StringRef MArch) { llvm_unreachable("invalid arch name"); } -void ARM::PrintSupportedExtensions() { +void ARM::PrintSupportedExtensions(std::map llvmDescMap) { outs() << "All available -ma

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread David Spickett via cfe-commits
@@ -11,11 +11,13 @@ // //===--===// -#include "llvm/TargetParser/AArch64TargetParser.h" +#include "llvm/Support/Error.h" DavidSpickett wrote: Why do we need to include Support/Error now? Th

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread David Spickett via cfe-commits
@@ -11,11 +11,13 @@ // //===--===// -#include "llvm/TargetParser/AArch64TargetParser.h" +#include "llvm/Support/Error.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/TargetParser/AArch64TargetParser

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/66715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread David Spickett via cfe-commits
@@ -1016,7 +1017,8 @@ TEST(TargetParserTest, ARMPrintSupportedExtensions) { outs().flush(); testing::internal::CaptureStdout(); - ARM::PrintSupportedExtensions(); + std::map EmptyMap; DavidSpickett wrote: All tests for this should include at least 1 des

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread David Spickett via cfe-commits
@@ -600,11 +601,17 @@ StringRef ARM::getARMCPUForArch(const llvm::Triple &Triple, StringRef MArch) { llvm_unreachable("invalid arch name"); } -void ARM::PrintSupportedExtensions() { +void ARM::PrintSupportedExtensions(std::map llvmDescMap) { outs() << "All available -ma

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread David Spickett via cfe-commits
@@ -198,13 +199,21 @@ static int PrintSupportedExtensions(std::string TargetStr) { std::unique_ptr TheTargetMachine( TheTarget->createTargetMachine(TargetStr, "", "", Options, std::nullopt)); const llvm::Triple &MachineTriple = TheTargetMachine->getTargetTriple(); +

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread David Spickett via cfe-commits
@@ -198,13 +199,21 @@ static int PrintSupportedExtensions(std::string TargetStr) { std::unique_ptr TheTargetMachine( TheTarget->createTargetMachine(TargetStr, "", "", Options, std::nullopt)); const llvm::Triple &MachineTriple = TheTargetMachine->getTargetTriple(); +

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread David Spickett via cfe-commits
@@ -210,24 +210,33 @@ static void verifyTables() { #endif } -void llvm::riscvExtensionsHelp() { +void llvm::riscvExtensionsHelp(std::map llvmDescMap) { + outs() << "All available -march extensions for RISC-V\n\n"; - outs() << '\t' << left_justify("Name", 20) << "Version\n"

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-19 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall resolved https://github.com/llvm/llvm-project/pull/66424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-19 Thread Sam McCall via cfe-commits
@@ -87,6 +87,9 @@ class alignas(const Formula *) Formula { ArrayRef Operands, unsigned Value = 0); + // Parse Formulas using Arena rather than caling this function directly. + static Formula *parse(llvm::BumpPtrAllocator &All

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-19 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall resolved https://github.com/llvm/llvm-project/pull/66424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-19 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall resolved https://github.com/llvm/llvm-project/pull/66424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-19 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall resolved https://github.com/llvm/llvm-project/pull/66424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-19 Thread Sam McCall via cfe-commits
@@ -95,4 +98,94 @@ BoolValue &Arena::makeBoolValue(const Formula &F) { return *It->second; } +namespace { +const Formula *parse(Arena &A, llvm::StringRef &In) { + auto EatWhitespace = [&] { In = In.ltrim(' '); }; sam-mccall wrote: Renamed, hard to know if

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-19 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall resolved https://github.com/llvm/llvm-project/pull/66424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D159519: [clang][AST][ASTImporter] improve AST comparasion on VarDecl & GotoStmt

2023-09-19 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy accepted this revision. donat.nagy added a comment. This revision is now accepted and ready to land. LGTM. I'm not very familiar with this area, but the change seems to be a very clean improvement. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-19 Thread Sam McCall via cfe-commits
@@ -258,114 +276,71 @@ TEST(SolverTest, IffWithUnits) { } TEST(SolverTest, IffWithUnitsConflict) { - ConstraintContext Ctx; - auto X = Ctx.atom(); - auto Y = Ctx.atom(); - auto XEqY = Ctx.iff(X, Y); - auto NotY = Ctx.neg(Y); - - // (X <=> Y) ^ X !Y - EXPECT_THAT(solve(

[clang] [clang-format] Disable OuterScope lambda indentation behaviour for constructor initializers (PR #66755)

2023-09-19 Thread Jon Phillips via cfe-commits
https://github.com/jp4a50 created https://github.com/llvm/llvm-project/pull/66755 By default, OuterScope aligns lambdas to the beginning of the current line. This makes sense for most types of statements within code blocks but leads to unappealing and misleading indentation for lambdas within

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-19 Thread Sam McCall via cfe-commits
@@ -95,4 +98,94 @@ BoolValue &Arena::makeBoolValue(const Formula &F) { return *It->second; } +namespace { +const Formula *parse(Arena &A, llvm::StringRef &In) { + auto EatWhitespace = [&] { In = In.ltrim(' '); }; + EatWhitespace(); + + if (In.consume_front("!")) { +if

[clang] [clang-format] Disable OuterScope lambda indentation behaviour for constructor initializers (PR #66755)

2023-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Changes By default, OuterScope aligns lambdas to the beginning of the current line. This makes sense for most types of statements within code blocks but leads to unappealing and misleading indentation for lambdas within constructor initial

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-19 Thread Sam McCall via cfe-commits
@@ -95,4 +98,94 @@ BoolValue &Arena::makeBoolValue(const Formula &F) { return *It->second; } +namespace { +const Formula *parse(Arena &A, llvm::StringRef &In) { + auto EatWhitespace = [&] { In = In.ltrim(' '); }; + EatWhitespace(); + + if (In.consume_front("!")) { +if

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-19 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall updated https://github.com/llvm/llvm-project/pull/66424 >From 35b33561af918fc2e13af9de18af6b181535ce49 Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Thu, 14 Sep 2023 21:36:50 +0200 Subject: [PATCH 1/2] [dataflow] Parse formulas from text My immediate use for thi

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-19 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall resolved https://github.com/llvm/llvm-project/pull/66424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-19 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall resolved https://github.com/llvm/llvm-project/pull/66424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-19 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall resolved https://github.com/llvm/llvm-project/pull/66424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-19 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall updated https://github.com/llvm/llvm-project/pull/66424 >From 35b33561af918fc2e13af9de18af6b181535ce49 Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Thu, 14 Sep 2023 21:36:50 +0200 Subject: [PATCH 1/3] [dataflow] Parse formulas from text My immediate use for thi

[clang] ad4a513 - [clang][CFG] Cleanup functions

2023-09-19 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-09-19T11:56:44+02:00 New Revision: ad4a513026d8f15f40ac5a6dede6ad3aabfb URL: https://github.com/llvm/llvm-project/commit/ad4a513026d8f15f40ac5a6dede6ad3aabfb DIFF: https://github.com/llvm/llvm-project/commit/ad4a513026d8f15f40ac5a6dede6ad3aabfb.diff LO

[PATCH] D157385: [clang][CFG] Cleanup functions

2023-09-19 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGad4a51302777: [clang][CFG] Cleanup functions (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157385/new/ https://reviews.llvm.org/D1573

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread Balint Cristian via cfe-commits
@@ -210,24 +210,33 @@ static void verifyTables() { #endif } -void llvm::riscvExtensionsHelp() { +void llvm::riscvExtensionsHelp(std::map llvmDescMap) { + outs() << "All available -march extensions for RISC-V\n\n"; - outs() << '\t' << left_justify("Name", 20) << "Version\n"

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread Balint Cristian via cfe-commits
@@ -11,11 +11,13 @@ // //===--===// -#include "llvm/TargetParser/AArch64TargetParser.h" +#include "llvm/Support/Error.h" cbalint13 wrote: It was for format()```, will double-check to see

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread Balint Cristian via cfe-commits
https://github.com/cbalint13 edited https://github.com/llvm/llvm-project/pull/66715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread Balint Cristian via cfe-commits
@@ -11,11 +11,13 @@ // //===--===// -#include "llvm/TargetParser/AArch64TargetParser.h" +#include "llvm/Support/Error.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/TargetParser/AArch64TargetParser

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread Balint Cristian via cfe-commits
@@ -600,11 +601,17 @@ StringRef ARM::getARMCPUForArch(const llvm::Triple &Triple, StringRef MArch) { llvm_unreachable("invalid arch name"); } -void ARM::PrintSupportedExtensions() { +void ARM::PrintSupportedExtensions(std::map llvmDescMap) { outs() << "All available -ma

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread Balint Cristian via cfe-commits
@@ -1016,7 +1017,8 @@ TEST(TargetParserTest, ARMPrintSupportedExtensions) { outs().flush(); testing::internal::CaptureStdout(); - ARM::PrintSupportedExtensions(); + std::map EmptyMap; cbalint13 wrote: Will address this, even by adding a dummy descriptio

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread Balint Cristian via cfe-commits
cbalint13 wrote: @DavidSpickett Thank you for the review time, will address all the concerns and be back with a re-review request. https://github.com/llvm/llvm-project/pull/66715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread Balint Cristian via cfe-commits
https://github.com/cbalint13 edited https://github.com/llvm/llvm-project/pull/66715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread Balint Cristian via cfe-commits
https://github.com/cbalint13 edited https://github.com/llvm/llvm-project/pull/66715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread Balint Cristian via cfe-commits
https://github.com/cbalint13 edited https://github.com/llvm/llvm-project/pull/66715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Allow --query-driver to match a dot-normalized form of the path (PR #66757)

2023-09-19 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall created https://github.com/llvm/llvm-project/pull/66757 (In addition to the un-normalized form, so this is back-compatible) >From 1923a5142f9cbd3556bba599b611ae8a1bbec776 Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Tue, 19 Sep 2023 12:16:54 +0200 Subject: [PA

[clang-tools-extra] [InstCombine] Simplify the pattern `a ne/eq (zext/sext (a ne/eq c))` (PR #65852)

2023-09-19 Thread Nikita Popov via cfe-commits
@@ -6309,7 +6309,69 @@ Instruction *InstCombinerImpl::foldICmpUsingBoolRange(ICmpInst &I) { Y->getType()->isIntOrIntVectorTy(1) && Pred == ICmpInst::ICMP_ULE) return BinaryOperator::CreateOr(Builder.CreateIsNull(X), Y); + ICmpInst::Predicate Pred1, Pred2; const

[clang-tools-extra] [clangd] Allow --query-driver to match a dot-normalized form of the path (PR #66757)

2023-09-19 Thread Sam McCall via cfe-commits
sam-mccall wrote: @kadircet this is internal b/294113850 https://github.com/llvm/llvm-project/pull/66757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Allow --query-driver to match a dot-normalized form of the path (PR #66757)

2023-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Changes (In addition to the un-normalized form, so this is back-compatible) --- Full diff: https://github.com/llvm/llvm-project/pull/66757.diff 1 Files Affected: - (modified) clang-tools-extra/clangd/SystemIncludeExtractor.cpp (+7-1) ``

[clang-tools-extra] [clangd] Allow --query-driver to match a dot-normalized form of the path (PR #66757)

2023-09-19 Thread Sam McCall via cfe-commits
sam-mccall wrote: I didn't add a test here because it seems fairly fiddly and fragile (would be a lit test) and unlikely to actually regress in practice. But I'm just making excuses, happy to add one if you think it's worthwhile. https://github.com/llvm/llvm-project/pull/66757

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread Balint Cristian via cfe-commits
https://github.com/cbalint13 edited https://github.com/llvm/llvm-project/pull/66715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread David Spickett via cfe-commits
@@ -600,11 +601,17 @@ StringRef ARM::getARMCPUForArch(const llvm::Triple &Triple, StringRef MArch) { llvm_unreachable("invalid arch name"); } -void ARM::PrintSupportedExtensions() { +void ARM::PrintSupportedExtensions(std::map llvmDescMap) { outs() << "All available -ma

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread David Spickett via cfe-commits
@@ -1016,7 +1017,8 @@ TEST(TargetParserTest, ARMPrintSupportedExtensions) { outs().flush(); testing::internal::CaptureStdout(); - ARM::PrintSupportedExtensions(); + std::map EmptyMap; DavidSpickett wrote: Yeah that's fine. All it should check is that th

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread Balint Cristian via cfe-commits
https://github.com/cbalint13 edited https://github.com/llvm/llvm-project/pull/66715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Allow --query-driver to match a dot-normalized form of the path (PR #66757)

2023-09-19 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall updated https://github.com/llvm/llvm-project/pull/66757 >From 1923a5142f9cbd3556bba599b611ae8a1bbec776 Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Tue, 19 Sep 2023 12:16:54 +0200 Subject: [PATCH 1/2] [clangd] Allow --query-driver to match a dot-normalized form

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-19 Thread David Spickett via cfe-commits
@@ -210,24 +210,33 @@ static void verifyTables() { #endif } -void llvm::riscvExtensionsHelp() { +void llvm::riscvExtensionsHelp(std::map llvmDescMap) { + outs() << "All available -march extensions for RISC-V\n\n"; - outs() << '\t' << left_justify("Name", 20) << "Version\n"

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-09-19 Thread Stephen Tozer via cfe-commits
@@ -2325,6 +2325,7 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, B.addAttribute(llvm::Attribute::Naked); // OptimizeNone wins over OptimizeForSize and MinSize. +F->removeFnAttr(llvm::Attribute::OptimizeForDebugging); --

[clang] [clang][TSA] Consider cleanup functions for thread safety analysis (PR #65462)

2023-09-19 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: tbaederr wrote: Review continued on Phabricator. https://github.com/llvm/llvm-project/pull/65462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [clang][TSA] Consider cleanup functions for thread safety analysis (PR #65462)

2023-09-19 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/65462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Align 128/256 variants to use void * as 512 variants. (PR #66310)

2023-09-19 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. LGTM - please update the description to mention that you're updating the movnti i32/i64 scalar integer nt ops as well as the vector ops https://github.com/llvm/llvm-project/pull/66310 ___ cfe-comm

[PATCH] D141192: [Clang] Fix warnings on bad shifts.

2023-09-19 Thread Budimir Aranđelović via Phabricator via cfe-commits
budimirarandjelovicsyrmia added a comment. Ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141192/new/ https://reviews.llvm.org/D141192 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-19 Thread via cfe-commits
https://github.com/martinboehme resolved https://github.com/llvm/llvm-project/pull/66424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-19 Thread Gábor Spaits via cfe-commits
@@ -0,0 +1,312 @@ +//===- StdVariantChecker.cpp -*- 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] [analyzer] Remove inaccurate legacy handling of bad bitwise shifts (PR #66647)

2023-09-19 Thread via cfe-commits
DonatNagyE wrote: The impact is limited, because `core.BitwiseShift` is a `PreStmt` callback, so when I merged it, it turned the logic tweaked/affected in this commit into "almost dead" code. The most significant change is that some "pedantic-only" issues (i.e. code like `-1 >> 3` that's unde

[clang] [X86] Align 128/256 variants to use void * as 512 variants. (PR #66310)

2023-09-19 Thread Shengchen Kan via cfe-commits
https://github.com/KanRobert approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/66310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Reorder checks to protect against a null pointer dereference. (PR #66764)

2023-09-19 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/66764 I've received a report of a null pointer dereference happening on the `LocDst->getType()` dereference. I wasn't unfortunately able to find a repro, but I'd argue the new version is better for the reduced inde

[clang] [clang][dataflow] Reorder checks to protect against a null pointer dereference. (PR #66764)

2023-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes I've received a report of a null pointer dereference happening on the `LocDst->getType()` dereference. I wasn't unfortunately able to find a repro, but I'd argue the new version is better for the reduced indentation alone. --- Full diff: h

[clang-tools-extra] [clangd] Allow --query-driver to match a dot-normalized form of the path (PR #66757)

2023-09-19 Thread kadir çetinkaya via cfe-commits
kadircet wrote: thanks, no need for tests, the logic is rather trivial (might be worth mentioning in change notes though, so that we can build them up more naturally for the future and encourage others to do so as well) https://github.com/llvm/llvm-project/pull/66757 __

  1   2   3   4   5   >