[clang] [RISCV] Support predefined marcro __riscv_misaligned_{fast,avoid}. (PR #65756)

2023-09-08 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk created https://github.com/llvm/llvm-project/pull/65756: RISC-V C API introduced predefined macro to achieve hints about unaligned accesses [0]. This patch defines __riscv_misaligned_fast when using -mno-strict-align, otherwise, defines __riscv_misaligned_avoid. Not

[clang] [RISCV] Support predefined marcro __riscv_misaligned_{fast,avoid}. (PR #65756)

2023-09-08 Thread via cfe-commits
https://github.com/github-actions[bot] labeled https://github.com/llvm/llvm-project/pull/65756 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Add dump() method to TypeLoc (PR #65484)

2023-09-08 Thread Aaron Ballman via cfe-commits
@@ -415,9 +443,55 @@ class ASTNodeTraverser if (!T->isSugared()) Visit(T->getPattern()); } + void VisitAutoType(const AutoType *T) { +for (const auto &Arg : T->getTypeConstraintArguments()) + Visit(Arg); + } // FIXME: ElaboratedType, DependentNameType,

[clang] [AST] Add dump() method to TypeLoc (PR #65484)

2023-09-08 Thread Aaron Ballman via cfe-commits
@@ -458,6 +532,9 @@ class ASTNodeTraverser if (Traversal == TK_IgnoreUnlessSpelledInSource && D->isCXXForRangeDecl()) return; +if (VisitLocs) + if (const auto *TSI = D->getTypeSourceInfo()) +Visit(TSI->getTypeLoc()); AaronBallman wro

[clang] [AST] Add dump() method to TypeLoc (PR #65484)

2023-09-08 Thread Aaron Ballman via cfe-commits
@@ -415,9 +443,55 @@ class ASTNodeTraverser if (!T->isSugared()) Visit(T->getPattern()); } + void VisitAutoType(const AutoType *T) { +for (const auto &Arg : T->getTypeConstraintArguments()) + Visit(Arg); + } // FIXME: ElaboratedType, DependentNameType,

[PATCH] D72959: Relative VTables ABI on Fuchsia

2023-09-08 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. Herald added subscribers: abrachet, jdoerfert, pengfei, MaskRay. Herald added a project: All. [Github PR transition cleanup] I think this work has landed as multiple separate patches, right? If so, can we please close this to clear up the review queue? Repository: rG

[clang] [RISCV] Support predefined marcro __riscv_misaligned_{fast,avoid}. (PR #65756)

2023-09-08 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk edited https://github.com/llvm/llvm-project/pull/65756 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Support predefined marcro __riscv_misaligned_{fast,avoid}. (PR #65756)

2023-09-08 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk edited https://github.com/llvm/llvm-project/pull/65756 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D157526: [clang][Sema] Remove irrelevant diagnostics from constraint satisfaction failure

2023-09-08 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. I think this is alright. Please see if you can figure out and fix what the pre-commit clang-format issue is. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157526/new/ https:

[PATCH] D140538: [Clang][CodeGen] Use poison instead of undef for dummy values in CGExpr [NFC]

2023-09-08 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. Ping. This should be updated to avoid touching libcxxabi. Comment at: libcxxabi/test/test_demangle.pass.cpp:3172 {"_ZN5clang7CodeGen15CodeGenFunction24EmitComplexPrePostIncDecEPKNS_13UnaryOperatorENS0_6LValueEbb", "clang::CodeGen::CodeGenFunctio

[clang] [AArch64]: Refactor target parser to use Bitset. (PR #65423)

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

[clang] [AArch64]: Refactor target parser to use Bitset. (PR #65423)

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

[clang] [AArch64]: Refactor target parser to use Bitset. (PR #65423)

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

[clang] 2c93e3c - Take math-errno into account with '#pragma float_control(precise,on)' and

2023-09-08 Thread Zahira Ammarguellat via cfe-commits
Author: Zahira Ammarguellat Date: 2023-09-08T09:48:53-04:00 New Revision: 2c93e3c1c8ba70694bc0d3fd71ac90836a147f2d URL: https://github.com/llvm/llvm-project/commit/2c93e3c1c8ba70694bc0d3fd71ac90836a147f2d DIFF: https://github.com/llvm/llvm-project/commit/2c93e3c1c8ba70694bc0d3fd71ac90836a147f2d

[PATCH] D151834: Include math-errno with fast-math

2023-09-08 Thread Zahira Ammarguellat 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 rG2c93e3c1c8ba: Take math-errno into account with '#pragma float_control(precise,on)' and (authored by zahiraam). Repository: rG LLVM Github Monorep

[clang] [clang] Prioritze decl comments from macro expansion site (PR #65481)

2023-09-08 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg review_requested https://github.com/llvm/llvm-project/pull/65481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Only dump desugared type when visibly different (PR #65214)

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

[clang] [AST] Only dump desugared type when visibly different (PR #65214)

2023-09-08 Thread Aaron Ballman via cfe-commits
@@ -315,12 +315,16 @@ std::string JSONNodeDumper::createPointerRepresentation(const void *Ptr) { llvm::json::Object JSONNodeDumper::createQualType(QualType QT, bool Desugar) { SplitQualType SQT = QT.split(); - llvm::json::Object Ret{{"qualType", QualType::getAsString(SQT,

[clang] [AST] Only dump desugared type when visibly different (PR #65214)

2023-09-08 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Changes generally LGTM, but please add a release note https://github.com/llvm/llvm-project/pull/65214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [AST] Only dump desugared type when visibly different (PR #65214)

2023-09-08 Thread Aaron Ballman via cfe-commits
@@ -677,13 +677,18 @@ void TextNodeDumper::dumpBareType(QualType T, bool Desugar) { ColorScope Color(OS, ShowColors, TypeColor); SplitQualType T_split = T.split(); - OS << "'" << QualType::getAsString(T_split, PrintPolicy) << "'"; + std::string T_str = QualType::getAsSt

[clang] [AST] Only dump desugared type when visibly different (PR #65214)

2023-09-08 Thread Aaron Ballman via cfe-commits
@@ -1351,7 +1351,6 @@ void testParmVarDecl(int TestParmVarDecl); // CHECK-NEXT:"isUsed": true, // CHECK-NEXT:"name": "x", // CHECK-NEXT:"type": { -// CHECK-NEXT: "desugaredQualType": "enum Enum", AaronBallman wrote: FWIW, this is an example of

[PATCH] D159115: [clang-repl] Adapt to the recent dylib-related changes in ORC.

2023-09-08 Thread Tulio Magno Quites Machado Filho via Phabricator via cfe-commits
tuliom added a comment. Let me elaborate my previous comment... I'm using Fedora, which has switched the default long double on ppc64le to IEEE 128-bit floating point. glibc provides 2 printf implementations on ppc64le (different symbols). The headers control which implementation is used. I won

[clang] [Clang] Fix the for statement disappearing in AST when an error occurs in the conditional expression of the for statement (PR #65381)

2023-09-08 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/65381: >From d1b0d467c3acd05a3f9a131511cd89be25d0d61a Mon Sep 17 00:00:00 2001 From: yronglin Date: Wed, 6 Sep 2023 00:00:18 +0800 Subject: [PATCH 1/2] [Clang] Fix the do while statement disappearing in AST when an e

[PATCH] D159115: [clang-repl] Adapt to the recent dylib-related changes in ORC.

2023-09-08 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. > Did Gentoo switch the default long double to IEEE 128-bit floating point? `LDBL_MANT_DIG` is 106, so I guess not yet on this system. > glibc provides 2 printf implementations on ppc64le (different symbols). The > headers control which implementation is used. Is that a

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

2023-09-08 Thread Nuno Lopes via cfe-commits
nunoplopes wrote: Note that changing the memory accesses performed by clang (load or store) *is* an ABI change at IR level because of UB. Also, please have a look at the existing `-ffine-grained-bitfield-accesses` flag and the discussions around it and IPO. https://github.com/llvm/llvm-projec

[PATCH] D141714: Fix ast print of variables with attributes

2023-09-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Comment at: clang/lib/AST/DeclPrinter.cpp:269-276 +static bool mustPrintOnLeftSide(attr::Kind kind) { + switch (kind) { +#include "clang/Basic/AttrLeftSideMustPrintList.inc" +return true; + default: +return false; + }

[clang] [NFC][Clang][RISCV] Remove trailing whitespaces in riscv_vector.td (PR #65762)

2023-09-08 Thread via cfe-commits
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/65762: This whitespaces breaking `Format` CI. ``` $ trap 'kill -- $$' INT TERM QUIT; clang/utils/ci/run-buildbot check-format + set -o pipefail + unset LANG + unset LC_ALL + unset LC_COLLATE ++ basename clang/utils/ci/

[clang] [NFC][Clang][RISCV] Remove trailing whitespaces in riscv_vector.td (PR #65762)

2023-09-08 Thread via cfe-commits
https://github.com/yronglin review_requested https://github.com/llvm/llvm-project/pull/65762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang][RISCV] Remove trailing whitespaces in riscv_vector.td (PR #65762)

2023-09-08 Thread via cfe-commits
https://github.com/github-actions[bot] labeled https://github.com/llvm/llvm-project/pull/65762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Don't crash when BlockToState is called from unreachable path (PR #65732)

2023-09-08 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand resolved https://github.com/llvm/llvm-project/pull/65732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] df45557 - Fix the Clang sphinx build

2023-09-08 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-09-08T10:23:27-04:00 New Revision: df455574cb93bfa2ec7c9356b342c04abe4c5139 URL: https://github.com/llvm/llvm-project/commit/df455574cb93bfa2ec7c9356b342c04abe4c5139 DIFF: https://github.com/llvm/llvm-project/commit/df455574cb93bfa2ec7c9356b342c04abe4c5139.diff

[clang] 8e1d2f2 - [clang][dataflow] Don't crash when BlockToState is called from unreachable path (#65732)

2023-09-08 Thread via cfe-commits
Author: Kinuko Yasuda Date: 2023-09-08T10:24:08-04:00 New Revision: 8e1d2f2f12243d284b729174fc0720052ea5518c URL: https://github.com/llvm/llvm-project/commit/8e1d2f2f12243d284b729174fc0720052ea5518c DIFF: https://github.com/llvm/llvm-project/commit/8e1d2f2f12243d284b729174fc0720052ea5518c.diff

[clang] [clang][dataflow] Don't crash when BlockToState is called from unreachable path (PR #65732)

2023-09-08 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand closed https://github.com/llvm/llvm-project/pull/65732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D156045: [clang][Interp] Enable existing source_location tests

2023-09-08 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. I was rebasing D155064 locally and saw test failures for the new interpreter in this file. The cause seems to me that the new interpreter is not handling some cases of `SourceLocExpr` correctly when they appear inside constant-evaluat

[clang] 3276ac8 - [clang][Interp][NFC] Remove unused function prototype

2023-09-08 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-09-08T16:40:10+02:00 New Revision: 3276ac86aa2c8d573738681245ccfbb5a7914d8a URL: https://github.com/llvm/llvm-project/commit/3276ac86aa2c8d573738681245ccfbb5a7914d8a DIFF: https://github.com/llvm/llvm-project/commit/3276ac86aa2c8d573738681245ccfbb5a7914d8a.diff LO

[clang] [NFC][Clang][RISCV] Remove trailing whitespaces in riscv_vector.td (PR #65762)

2023-09-08 Thread Kito Cheng via cfe-commits
https://github.com/kito-cheng approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/65762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang][RISCV] Remove trailing whitespaces in riscv_vector.td (PR #65762)

2023-09-08 Thread via cfe-commits
yronglin wrote: Thanks for the review! @kito-cheng https://github.com/llvm/llvm-project/pull/65762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4bb9024 - [NFC][Clang][RISCV] Remove trailing whitespaces in riscv_vector.td (#65762)

2023-09-08 Thread via cfe-commits
Author: yronglin Date: 2023-09-08T22:59:45+08:00 New Revision: 4bb902439806f023a0eb30841ef485ee3aed478b URL: https://github.com/llvm/llvm-project/commit/4bb902439806f023a0eb30841ef485ee3aed478b DIFF: https://github.com/llvm/llvm-project/commit/4bb902439806f023a0eb30841ef485ee3aed478b.diff LOG:

[clang] [NFC][Clang][RISCV] Remove trailing whitespaces in riscv_vector.td (PR #65762)

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

[PATCH] D148131: Avoid unnecessarily aggressive line-breaking when using "LambdaBodyIndentation: OuterScope" with argument bin-packing.

2023-09-08 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 556262. jp4a50 added a comment. Minor review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148131/new/ https://reviews.llvm.org/D148131 Files: clang/lib/Format/ContinuationIndenter.cpp clang/unitt

[clang] [Clang] Fix the for statement disappearing in AST when an error occurs in the conditional expression of the for statement (PR #65381)

2023-09-08 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/65381: >From 51ba9cb126aa03b3add9d2705c10d3fa4f6acb39 Mon Sep 17 00:00:00 2001 From: yronglin Date: Wed, 6 Sep 2023 00:00:18 +0800 Subject: [PATCH 1/2] [Clang] Fix the do while statement disappearing in AST when an e

[PATCH] D148131: Avoid unnecessarily aggressive line-breaking when using "LambdaBodyIndentation: OuterScope" with argument bin-packing.

2023-09-08 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 marked 2 inline comments as done. jp4a50 added a comment. Thanks all. All comments addressed now. Please merge for me once ready. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148131/new/ https://reviews.llvm.org/D148131 ___

[clang] [AArch64] Fix FMV crash on unspecified number of parameters function (PR #65671)

2023-09-08 Thread via cfe-commits
https://github.com/DanielKristofKiss approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/65671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D141714: Fix ast print of variables with attributes

2023-09-08 Thread Giuliano Belinassi via Phabricator via cfe-commits
giulianobelinassi added inline comments. Comment at: clang/lib/AST/DeclPrinter.cpp:269-276 +static bool mustPrintOnLeftSide(attr::Kind kind) { + switch (kind) { +#include "clang/Basic/AttrLeftSideMustPrintList.inc" +return true; + default: +return false; + } --

[clang] [sema] Improve -Wsign-compare (PR #65684)

2023-09-08 Thread Shafik Yaghmour via cfe-commits
shafik wrote: > form when the user doesn't know what happens when integers of different signs > are compared (the signed one is cast to an unsigned value). I just wanted to point out that although this is very much an edge case, but mixed sign comparison can result in conversion to signed type

[clang] ffb8434 - [clang] Prevent unnecessary copies in `SymbolGraphSerializer` (NFC)

2023-09-08 Thread Antonio Frighetto via cfe-commits
Author: Antonio Frighetto Date: 2023-09-08T17:19:06+02:00 New Revision: ffb8434f6a514fb3c06e0bdaff6d4ee410924ff6 URL: https://github.com/llvm/llvm-project/commit/ffb8434f6a514fb3c06e0bdaff6d4ee410924ff6 DIFF: https://github.com/llvm/llvm-project/commit/ffb8434f6a514fb3c06e0bdaff6d4ee410924ff6.d

[clang] [sema] Improve -Wsign-compare (PR #65684)

2023-09-08 Thread via cfe-commits
apple-fcloutier wrote: Yes, there's this way and also when you compare integers smaller than `int`, but those don't trigger -Wsign-compare. -Wsign-compare only triggers if a signed operand is converted to an unsigned operand. This is a PR description bug :) https://github.com/llvm/llvm-projec

[clang] [sema] Improve -Wsign-compare (PR #65684)

2023-09-08 Thread via cfe-commits
https://github.com/apple-fcloutier edited https://github.com/llvm/llvm-project/pull/65684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64] Fix FMV crash on unspecified number of parameters function (PR #65671)

2023-09-08 Thread Pavel Iliin via cfe-commits
https://github.com/ilinpv closed https://github.com/llvm/llvm-project/pull/65671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e5fe3d2 - [AArch64] Fix FMV crash on unspecified number of parameters function (#65671)

2023-09-08 Thread via cfe-commits
Author: Pavel Iliin Date: 2023-09-08T16:26:39+01:00 New Revision: e5fe3d27fc1d5f27fe107f3380f3727362bac66c URL: https://github.com/llvm/llvm-project/commit/e5fe3d27fc1d5f27fe107f3380f3727362bac66c DIFF: https://github.com/llvm/llvm-project/commit/e5fe3d27fc1d5f27fe107f3380f3727362bac66c.diff L

[clang] [sema] Improve -Wsign-compare (PR #65684)

2023-09-08 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/65684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [sema] Improve -Wsign-compare (PR #65684)

2023-09-08 Thread Shafik Yaghmour via cfe-commits
@@ -14490,12 +14564,12 @@ static void DiagnoseFloatingImpCast(Sema &S, Expr *E, QualType T, /// Analyze the given compound assignment for the possible losing of /// floating-point precision. -static void AnalyzeCompoundAssignment(Sema &S, BinaryOperator *E) { +void ImplicitCo

[clang] [sema] Improve -Wsign-compare (PR #65684)

2023-09-08 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Looks good overall, just the one side case I mentioned should be tested and mostly small nits. https://github.com/llvm/llvm-project/pull/65684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [sema] Improve -Wsign-compare (PR #65684)

2023-09-08 Thread Shafik Yaghmour via cfe-commits
@@ -15423,29 +15489,29 @@ static void AnalyzeImplicitConversions( // FIXME: Use a more uniform representation for this. for (auto *SE : POE->semantics()) if (auto *OVE = dyn_cast(SE)) -WorkList.push_back({OVE->getSourceExpr(), CC, IsListInit}); +Wo

[clang] [sema] Improve -Wsign-compare (PR #65684)

2023-09-08 Thread Shafik Yaghmour via cfe-commits
@@ -14043,28 +14039,61 @@ static bool CheckTautologicalComparison(Sema &S, BinaryOperator *E, return true; } +namespace { +struct AnalyzeImplicitConversionsWorkItem { + Expr *E; + SourceLocation CC; + unsigned IsListInit : 1; + unsigned IsTopLevelExpr : 1; +}; + +class

[clang] [sema] Improve -Wsign-compare (PR #65684)

2023-09-08 Thread Shafik Yaghmour via cfe-commits
@@ -14308,22 +14382,22 @@ static bool AnalyzeBitFieldAssignment(Sema &S, FieldDecl *Bitfield, Expr *Init, /// Analyze the given simple or compound assignment for warning-worthy /// operations. -static void AnalyzeAssignment(Sema &S, BinaryOperator *E) { +void ImplicitConversi

[clang] [sema] Improve -Wsign-compare (PR #65684)

2023-09-08 Thread Shafik Yaghmour via cfe-commits
@@ -14135,8 +14164,8 @@ static void AnalyzeComparison(Sema &S, BinaryOperator *E) { // Go ahead and analyze implicit conversions in the operands. Note // that we skip the implicit conversions on both sides. - AnalyzeImplicitConversions(S, LHS, E->getOperatorLoc()); - A

[clang] [sema] Improve -Wsign-compare (PR #65684)

2023-09-08 Thread Shafik Yaghmour via cfe-commits
@@ -15277,35 +15351,33 @@ static void CheckImplicitConversion(Sema &S, Expr *E, QualType T, } } -static void CheckConditionalOperator(Sema &S, AbstractConditionalOperator *E, - SourceLocation CC, QualType T); - -static void CheckCondi

[clang] [sema] Improve -Wsign-compare (PR #65684)

2023-09-08 Thread Shafik Yaghmour via cfe-commits
@@ -14308,22 +14382,22 @@ static bool AnalyzeBitFieldAssignment(Sema &S, FieldDecl *Bitfield, Expr *Init, /// Analyze the given simple or compound assignment for warning-worthy /// operations. -static void AnalyzeAssignment(Sema &S, BinaryOperator *E) { +void ImplicitConversi

[clang] [sema] Improve -Wsign-compare (PR #65684)

2023-09-08 Thread Shafik Yaghmour via cfe-commits
@@ -14308,22 +14382,22 @@ static bool AnalyzeBitFieldAssignment(Sema &S, FieldDecl *Bitfield, Expr *Init, /// Analyze the given simple or compound assignment for warning-worthy /// operations. -static void AnalyzeAssignment(Sema &S, BinaryOperator *E) { +void ImplicitConversi

[clang] [sema] Improve -Wsign-compare (PR #65684)

2023-09-08 Thread Shafik Yaghmour via cfe-commits
@@ -0,0 +1,129 @@ +// RUN: %clang_cc1 -fsyntax-only -Wsign-compare -Wno-unused-comparison -Wno-empty-body -Wno-unused-value -verify %s +// RUN: cp %s %t +// RUN: %clang_cc1 -fsyntax-only -Wsign-compare -fixit -x c %t 2> /dev/null +// RUN: grep -v CHECK %t | FileCheck %s + +unsign

[clang] [sema] Improve -Wsign-compare (PR #65684)

2023-09-08 Thread Shafik Yaghmour via cfe-commits
@@ -15423,29 +15489,29 @@ static void AnalyzeImplicitConversions( // FIXME: Use a more uniform representation for this. for (auto *SE : POE->semantics()) if (auto *OVE = dyn_cast(SE)) -WorkList.push_back({OVE->getSourceExpr(), CC, IsListInit}); +Wo

[clang] [sema] Improve -Wsign-compare (PR #65684)

2023-09-08 Thread Shafik Yaghmour via cfe-commits
@@ -15277,35 +15351,33 @@ static void CheckImplicitConversion(Sema &S, Expr *E, QualType T, } } -static void CheckConditionalOperator(Sema &S, AbstractConditionalOperator *E, - SourceLocation CC, QualType T); - -static void CheckCondi

[clang] [sema] Improve -Wsign-compare (PR #65684)

2023-09-08 Thread Shafik Yaghmour via cfe-commits
@@ -15478,7 +15544,7 @@ static void AnalyzeImplicitConversions( // Ignore checking string literals that are in logical and operators. // This is a common pattern for asserts. continue; -WorkList.push_back({ChildExpr, CC, IsListInit}); +WorkList.push_ba

[clang] [sema] Improve -Wsign-compare (PR #65684)

2023-09-08 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik review_requested https://github.com/llvm/llvm-project/pull/65684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [sema] Improve -Wsign-compare (PR #65684)

2023-09-08 Thread Shafik Yaghmour via cfe-commits
shafik wrote: > Yes, there's this way and also when you compare integers smaller than `int`, > but those don't trigger -Wsign-compare. -Wsign-compare only triggers if a > signed operand is converted to an unsigned operand. This is a PR description > bug :) I did not understand that. I can see

[clang] [sema] Improve -Wsign-compare (PR #65684)

2023-09-08 Thread via cfe-commits
apple-fcloutier wrote: FWIW, this is not new behavior: https://godbolt.org/z/Mh1d43vr5 I'm less worried about unsigned -> signed promotions because they still end up evaluating like comparisons of arbitrary-precision integers. https://github.com/llvm/llvm-project/pull/65684 ___

[clang] 3ed9e9e - [Clang] Add captures to the instantiation scope of lambda call operators

2023-09-08 Thread Corentin Jabot via cfe-commits
Author: Corentin Jabot Date: 2023-09-08T17:50:27+02:00 New Revision: 3ed9e9e3ace6f9ce320cf4e75cffa04a7c7241b5 URL: https://github.com/llvm/llvm-project/commit/3ed9e9e3ace6f9ce320cf4e75cffa04a7c7241b5 DIFF: https://github.com/llvm/llvm-project/commit/3ed9e9e3ace6f9ce320cf4e75cffa04a7c7241b5.diff

[PATCH] D159126: [Clang] Add captures to the instantiation scope of lambda call operators

2023-09-08 Thread Corentin Jabot 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 rG3ed9e9e3ace6: [Clang] Add captures to the instantiation scope of lambda call operators (authored by cor3ntin). Repository: rG LLVM Github Monorepo

[PATCH] D159126: [Clang] Add captures to the instantiation scope of lambda call operators

2023-09-08 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Looks like the test is missing a RUN line and hence makes lit fail: http://45.33.8.238/linux/117631/step_7.txt Please take a look and revert for now if it takes a while to fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D159486: Fix build error in CI.

2023-09-08 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam created this revision. zahiraam added a reviewer: aaron.ballman. Herald added a project: All. zahiraam requested review of this revision. Herald added a project: clang. Fix buildbot failure https://lab.llvm.org/buildbot/#/builders/38/builds/14427. Repository: rG LLVM Github Monorepo

[PATCH] D159126: [Clang] Add captures to the instantiation scope of lambda call operators

2023-09-08 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D159126#4642010 , @thakis wrote: > Looks like the test is missing a RUN line and hence makes lit fail: > http://45.33.8.238/linux/117631/step_7.txt > > Please take a look and revert for now if it takes a while to fix. Won'

[clang] 390b486 - Add 'run' line and 'expected-no-diagnostics' to test added in 3ed9e9e3ace6f9ce320cf4e75cffa04a7c7241b5

2023-09-08 Thread via cfe-commits
Author: erichkeane Date: 2023-09-08T09:05:16-07:00 New Revision: 390b48675be80420f471bd3be74577495b1b1897 URL: https://github.com/llvm/llvm-project/commit/390b48675be80420f471bd3be74577495b1b1897 DIFF: https://github.com/llvm/llvm-project/commit/390b48675be80420f471bd3be74577495b1b1897.diff LO

[PATCH] D159126: [Clang] Add captures to the instantiation scope of lambda call operators

2023-09-08 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D159126#4642023 , @erichkeane wrote: > In D159126#4642010 , @thakis wrote: > >> Looks like the test is missing a RUN line and hence makes lit fail: >> http://45.33.8.238/linux/1176

[PATCH] D159474: [NFC][CLANG] Fix static analyzer bugs about unnecessary object copies with auto

2023-09-08 Thread Soumi Manna via Phabricator via cfe-commits
Manna updated this revision to Diff 556273. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159474/new/ https://reviews.llvm.org/D159474 Files: clang/include/clang/ExtractAPI/ExtractAPIVisitor.h clang/lib/Analysis/UnsafeBufferUsage.cpp clang/lib/ExtractAPI/Serialization/SymbolGraphSe

[clang] 38750d7 - Fix Clang Sphinx build

2023-09-08 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-09-08T12:19:09-04:00 New Revision: 38750d7ec179283e4798331f45cccbff122066dd URL: https://github.com/llvm/llvm-project/commit/38750d7ec179283e4798331f45cccbff122066dd DIFF: https://github.com/llvm/llvm-project/commit/38750d7ec179283e4798331f45cccbff122066dd.diff

[clang] [RISCV] Support predefined marcro __riscv_misaligned_{fast,avoid}. (PR #65756)

2023-09-08 Thread Fangrui Song via cfe-commits
@@ -1220,3 +1220,15 @@ // RUN: -march=rv64i_zve32x_zvkt1p0 -x c -E -dM %s \ // RUN: -o - | FileCheck --check-prefix=CHECK-ZVKT-EXT %s // CHECK-ZVKT-EXT: __riscv_zvkt 100{{$}} + +// RUN: %clang -target riscv32-unknown-linux-gnu -march=rv32i -x c -E -dM %s \

[clang] [RISCV] Support predefined marcro __riscv_misaligned_{fast,avoid}. (PR #65756)

2023-09-08 Thread Jessica Clarke via cfe-commits
@@ -1220,3 +1220,15 @@ // RUN: -march=rv64i_zve32x_zvkt1p0 -x c -E -dM %s \ // RUN: -o - | FileCheck --check-prefix=CHECK-ZVKT-EXT %s // CHECK-ZVKT-EXT: __riscv_zvkt 100{{$}} + +// RUN: %clang -target riscv32-unknown-linux-gnu -march=rv32i -x c -E -dM %s \

[clang] [RISCV] Support predefined marcro __riscv_misaligned_{fast,avoid}. (PR #65756)

2023-09-08 Thread Jessica Clarke via cfe-commits
https://github.com/jrtc27 edited https://github.com/llvm/llvm-project/pull/65756 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Support predefined marcro __riscv_misaligned_{fast,avoid}. (PR #65756)

2023-09-08 Thread Jessica Clarke via cfe-commits
@@ -322,6 +327,8 @@ bool RISCVTargetInfo::handleTargetFeatures(std::vector &Features, if (ISAInfo->hasExtension("zfh") || ISAInfo->hasExtension("zhinx")) HasLegalHalfType = true; + FastUnalignedAccess = llvm::is_contained(Features, "+unaligned-scalar-mem"); ---

[clang] [Clang] Fix the for statement disappearing in AST when an error occurs in the conditional expression of the for statement (PR #65381)

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

[clang] 3cfdef3 - [Clang] Fix the for statement disappearing in AST when an error occurs in the conditional expression of the for statement (#65381)

2023-09-08 Thread via cfe-commits
Author: yronglin Date: 2023-09-09T00:48:06+08:00 New Revision: 3cfdef37155d1f0e5b32abe7c84e8304ef77ca10 URL: https://github.com/llvm/llvm-project/commit/3cfdef37155d1f0e5b32abe7c84e8304ef77ca10 DIFF: https://github.com/llvm/llvm-project/commit/3cfdef37155d1f0e5b32abe7c84e8304ef77ca10.diff LOG:

[PATCH] D158641: [AArch64][Android][DRAFT] Fix FMV ifunc resolver usage on old Android APIs.

2023-09-08 Thread Pavel Iliin via Phabricator via cfe-commits
ilinpv added inline comments. Comment at: compiler-rt/lib/builtins/cpu_model.c:1379 +void init_cpu_features_resolver(unsigned long hwcap, const __ifunc_arg_t *arg) { + if (__aarch64_cpu_features.features) MaskRay wrote: > It seems that we don't need the `_con

[PATCH] D158641: [AArch64][Android][DRAFT] Fix FMV ifunc resolver usage on old Android APIs.

2023-09-08 Thread Pavel Iliin via Phabricator via cfe-commits
ilinpv added inline comments. Comment at: compiler-rt/lib/builtins/cpu_model.c:1379 +void init_cpu_features_resolver(unsigned long hwcap, const __ifunc_arg_t *arg) { + if (__aarch64_cpu_features.features) ilinpv wrote: > MaskRay wrote: > > It seems that we do

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

2023-09-08 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The primary issue with over-wide bitfield accesses is ensuring we don't cause data races. C++ [intro.memory]p3: "A memory location is either an object of scalar type that is not a bit-field or a maximal sequence of adjacent bit-fields all having nonzero width. Two or mor

[clang-tools-extra] [clang-tidy] The first PR our of many PRs for the "Initialized Class Members" check. (PR #65189)

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

[PATCH] D158641: [AArch64][Android][DRAFT] Fix FMV ifunc resolver usage on old Android APIs.

2023-09-08 Thread Pavel Iliin via Phabricator via cfe-commits
ilinpv added inline comments. Comment at: compiler-rt/lib/builtins/cpu_model.c:1382 +return; +#if defined(__ANDROID__) + // ifunc resolvers don't have hwcaps in arguments on Android API lower enh wrote: > rprichard wrote: > > enh wrote: > > > srhines wrote:

[PATCH] D72959: Relative VTables ABI on Fuchsia

2023-09-08 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan abandoned this revision. leonardchan marked an inline comment as done. leonardchan added a comment. Herald added a subscriber: bd1976llvm. This was landed in various other smaller changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D729

[clang] [Clang][RISCV] Use Decl for checkRVVTypeSupport (PR #65778)

2023-09-08 Thread Yueh-Ting Chen via cfe-commits
https://github.com/eopXD review_requested https://github.com/llvm/llvm-project/pull/65778 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RISCV] Use Decl for checkRVVTypeSupport (PR #65778)

2023-09-08 Thread Yueh-Ting Chen via cfe-commits
https://github.com/eopXD review_requested https://github.com/llvm/llvm-project/pull/65778 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RISCV] Use Decl for checkRVVTypeSupport (PR #65778)

2023-09-08 Thread Yueh-Ting Chen via cfe-commits
https://github.com/eopXD created https://github.com/llvm/llvm-project/pull/65778: Using ValueDecl will cause error for OpenMP. Decl should do the work. >From 559c8a27f34c983822bb00dfd45c71798c7ecb36 Mon Sep 17 00:00:00 2001 From: eopXD Date: Fri, 8 Sep 2023 09:59:25 -0700 Subject: [PATCH] [Cla

[clang] [Clang][RISCV] Use Decl for checkRVVTypeSupport (PR #65778)

2023-09-08 Thread Yueh-Ting Chen via cfe-commits
https://github.com/eopXD review_requested https://github.com/llvm/llvm-project/pull/65778 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RISCV] Use Decl for checkRVVTypeSupport (PR #65778)

2023-09-08 Thread via cfe-commits
https://github.com/github-actions[bot] labeled https://github.com/llvm/llvm-project/pull/65778 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D159483: [Modules] Add a flag to control builtin headers being in system modules

2023-09-08 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556279. iana added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159483/new/ https://reviews.llvm.org/D159483 Files: clang/include/clang/Basic/Features.def clang/include/clang/Basic/LangOpti

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-08 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556280. iana added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/lib/Basic/Module.cpp clang/lib/Headers/__stddef_null.h clang/lib/

[PATCH] D159115: [clang-repl] Adapt to the recent dylib-related changes in ORC.

2023-09-08 Thread Tulio Magno Quites Machado Filho via Phabricator via cfe-commits
tuliom added a comment. In D159115#4641834 , @mgorny wrote: > Is that actually a regression, or merely the test wasn't checking it before? I can't tell because the test didn't exist before. > My educated guess would be that the code in the test redefine

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-08 Thread Louis Dionne via Phabricator via cfe-commits
ldionne resigned from this revision. ldionne added a comment. Unfortunately I am too backed up with libc++ stuff to review with the PR transition, so I'm resigning from this one. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://re

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-08 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/test/Modules/Inputs/System/usr/include/stdint.h:2 typedef int my_awesome_nonstandard_integer_type; + +/* C99 7.18.1.1 Exact-width integer types. Why do we need all this code now (I assume this is copied from t

[clang] [Clang][RISCV] Use Decl for checkRVVTypeSupport (PR #65778)

2023-09-08 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: Need to add the test https://github.com/llvm/llvm-project/pull/65778 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D153152: Adds tweak to add declarations for pure virtuals

2023-09-08 Thread Robert Schneider via Phabricator via cfe-commits
robot updated this revision to Diff 556283. robot marked 3 inline comments as done. robot added a comment. Herald added a project: clang. WIP - several improvements I thought it might be a good idea to give an update even though this is still work in progress. - Don't print `virtual` for added d

<    1   2   3   4   >