[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Giulio Eulisse via cfe-commits
@@ -0,0 +1,133 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[clang] Fix math-errno issue (PR #66381)

2023-09-15 Thread Zahira Ammarguellat via cfe-commits
@@ -2339,6 +2345,28 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, // LLVM counterparts if the call is marked 'const' (known to never set errno). // In case FP exceptions are enabled, the experimental versions of the // intrinsics

[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Giulio Eulisse via cfe-commits
@@ -0,0 +1,133 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[clang] Fix math-errno issue (PR #66381)

2023-09-15 Thread Andy Kaylor via cfe-commits
@@ -2339,6 +2345,28 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, // LLVM counterparts if the call is marked 'const' (known to never set errno). // In case FP exceptions are enabled, the experimental versions of the // intrinsics

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
ldionne wrote: What a tricky change! The ones that seem simple are sometimes the ones that end up being the most involved :) https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
ldionne wrote: What a tricky change! The ones that seem simple are sometimes the ones that end up being the most involved :) https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
@@ -37,9 +37,10 @@ struct __fn { _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))), "Bad bounds passed to std::ranges::clamp"); -if (std::invoke(__comp,

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
@@ -108,7 +108,33 @@ constexpr bool test() { auto prvalue_proj = [](const CheckDoubleMove& x) -> CheckDoubleMove { return x; }; assert(::ranges::clamp(val, low, high, moving_comp, prvalue_proj) == ); } + { // Make sure we don't call the projection more than three

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
https://github.com/ldionne edited https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
https://github.com/ldionne requested changes to this pull request. https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
@@ -37,9 +37,10 @@ struct __fn { _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))), "Bad bounds passed to std::ranges::clamp"); -if (std::invoke(__comp,

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
@@ -108,7 +108,33 @@ constexpr bool test() { auto prvalue_proj = [](const CheckDoubleMove& x) -> CheckDoubleMove { return x; }; assert(::ranges::clamp(val, low, high, moving_comp, prvalue_proj) == ); } + { // Make sure we don't call the projection more than three

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
https://github.com/ldionne edited https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
@@ -37,9 +37,10 @@ struct __fn { _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))), "Bad bounds passed to std::ranges::clamp"); -if (std::invoke(__comp,

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
@@ -108,7 +108,33 @@ constexpr bool test() { auto prvalue_proj = [](const CheckDoubleMove& x) -> CheckDoubleMove { return x; }; assert(::ranges::clamp(val, low, high, moving_comp, prvalue_proj) == ); } + { // Make sure we don't call the projection more than three

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
https://github.com/ldionne requested changes to this pull request. https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
@@ -37,9 +37,10 @@ struct __fn { _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))), "Bad bounds passed to std::ranges::clamp"); -if (std::invoke(__comp,

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
@@ -37,9 +37,10 @@ struct __fn { _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))), "Bad bounds passed to std::ranges::clamp"); -if (std::invoke(__comp,

[PATCH] D158296: [clang] Diagnose overly complex Record in __builtin_dump_struct

2023-09-15 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:732-733 +int RDKind = RD->isClass() ? 0 : (RD->isStruct() ? 1 : 2); +S.Diag(PtrArg->getBeginLoc(), diag::err_builtin_dump_struct_too_complex) +<< RDKind << RD->getName(); +return

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Jocelyn Castellano via cfe-commits
https://github.com/pandaninjas updated https://github.com/llvm/llvm-project/pull/66315 >From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001 From: PandaNinjas Date: Wed, 13 Sep 2023 17:38:17 -0700 Subject: [PATCH 01/12] [libc++] Prevent calling the projection more than three

[clang] Fix math-errno issue (PR #66381)

2023-09-15 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/66381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Add IntegralAP for arbitrary-precision integers (PR #65844)

2023-09-15 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/65844 >From 1e61f47f0978446915cf250b017ea68b0e271d2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?=

[clang] Fix math-errno issue (PR #66381)

2023-09-15 Thread Zahira Ammarguellat via cfe-commits
@@ -2339,6 +2345,28 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, // LLVM counterparts if the call is marked 'const' (known to never set errno). // In case FP exceptions are enabled, the experimental versions of the // intrinsics

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Jocelyn Castellano via cfe-commits
https://github.com/pandaninjas updated https://github.com/llvm/llvm-project/pull/66315 >From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001 From: PandaNinjas Date: Wed, 13 Sep 2023 17:38:17 -0700 Subject: [PATCH 01/11] [libc++] Prevent calling the projection more than three

[clang] Fix math-errno issue (PR #66381)

2023-09-15 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/66381 >From 997e3b69ac5c20a9130b957c86c08b16d23af07c Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Thu, 14 Sep 2023 06:27:35 -0700 Subject: [PATCH 1/5] Fix math-errno issue ---

[clang] Fix math-errno issue (PR #66381)

2023-09-15 Thread Zahira Ammarguellat via cfe-commits
@@ -2339,6 +2345,28 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, // LLVM counterparts if the call is marked 'const' (known to never set errno). // In case FP exceptions are enabled, the experimental versions of the // intrinsics

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-15 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu marked an inline comment as done. zequanwu added inline comments. Comment at: llvm/lib/ProfileData/InstrProfCorrelator.cpp:42 +const char *InstrProfCorrelator::CovFunctionNameAttributeName = +"Cov Function Name"; phosek wrote: > I missed this

[clang] Fix math-errno issue (PR #66381)

2023-09-15 Thread Aaron Ballman via cfe-commits
@@ -2339,6 +2345,28 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, // LLVM counterparts if the call is marked 'const' (known to never set errno). // In case FP exceptions are enabled, the experimental versions of the // intrinsics

[clang] Fix math-errno issue (PR #66381)

2023-09-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: The logic makes sense to me, but it would be nice if we had a second set of eyes on this given how dense the code is. @jcranmer-intel how does this seem to you? https://github.com/llvm/llvm-project/pull/66381

[clang] Fix math-errno issue (PR #66381)

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

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-15 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: llvm/lib/ProfileData/InstrProfCorrelator.cpp:42 +const char *InstrProfCorrelator::CovFunctionNameAttributeName = +"Cov Function Name"; I missed this earlier, but I think that spelling this out in full, that is

[PATCH] D159522: [Clang][C] Fixed a bug where we reject an _Atomic qualified integer in a switch statment

2023-09-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM (with a tiny nit with the formatting in the release notes), thank you for the fix! Comment at: clang/docs/ReleaseNotes.rst:223 (`#64836

[clang] [clang][Interp] Three-way comparisons (PR #65901)

2023-09-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/65901 >From 1b76f3b46359c7a688bc5cefc15254253fb57e64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 10 Sep 2023 17:02:22 +0200 Subject: [PATCH] [clang][Interp] Three-way comparisons ---

[clang] Replace llvm.memcpy et al's i1 isVolatile with i8 VolFlags (PR #65748)

2023-09-15 Thread Nathan Sidwell via cfe-commits
@@ -24790,8 +24790,8 @@ static SDValue LowerVACOPY(SDValue Op, const X86Subtarget , return DAG.getMemcpy( Chain, DL, DstPtr, SrcPtr, DAG.getIntPtrConstant(Subtarget.isTarget64BitLP64() ? 24 : 16, DL), - Align(Subtarget.isTarget64BitLP64() ? 8 : 4),

[clang] [clang][deps] Load module map file from PCM (PR #66389)

2023-09-15 Thread Jan Svoboda via cfe-commits
@@ -1307,6 +1307,9 @@ void ModuleMap::setInferredModuleAllowedBy(Module *M, std::error_code ModuleMap::canonicalizeModuleMapPath(SmallVectorImpl ) { + FileManager = SourceMgr.getFileManager(); + FM.makeAbsolutePath(Path); jansvoboda11 wrote: > > The

[clang] [analyzer] Fix StackAddrEscapeChecker crash on temporary object fields (PR #66493)

2023-09-15 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/66493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle AttributedStmts (PR #66495)

2023-09-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/66495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d462bd5 - [clang][Interp] Handle AttributedStmts (#66495)

2023-09-15 Thread via cfe-commits
Author: Timm Baeder Date: 2023-09-15T21:03:18+02:00 New Revision: d462bd527a6a351e513197f2b3814155adca960f URL: https://github.com/llvm/llvm-project/commit/d462bd527a6a351e513197f2b3814155adca960f DIFF: https://github.com/llvm/llvm-project/commit/d462bd527a6a351e513197f2b3814155adca960f.diff

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

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

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

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

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

2023-09-15 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited 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-15 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun commented: I think it is useful to have something like this checked in, I support this PR. https://github.com/llvm/llvm-project/pull/66424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [DependencyScanningFilesystem] Make sure the local/shared cache filename lookups use only absolute paths (PR #66122)

2023-09-15 Thread Ben Langmuir via cfe-commits
@@ -330,3 +353,20 @@ DependencyScanningWorkerFilesystem::openFileForRead(const Twine ) { return Result.getError(); return DepScanFile::create(Result.get()); } + +std::error_code DependencyScanningWorkerFilesystem::setCurrentWorkingDirectory( +const Twine ) { +

[clang] [DependencyScanningFilesystem] Make sure the local/shared cache filename lookups use only absolute paths (PR #66122)

2023-09-15 Thread Argyrios Kyrtzidis via cfe-commits
@@ -330,3 +353,20 @@ DependencyScanningWorkerFilesystem::openFileForRead(const Twine ) { return Result.getError(); return DepScanFile::create(Result.get()); } + +std::error_code DependencyScanningWorkerFilesystem::setCurrentWorkingDirectory( +const Twine ) { +

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-15 Thread via cfe-commits
@@ -29,16 +31,19 @@ void ImplementationInNamespaceCheck::check( if (!Result.SourceManager->isInMainFile(MatchedDecl->getLocation())) return; - if (const auto *NS = dyn_cast(MatchedDecl)) { -if (NS->getName() != RequiredNamespace) { - diag(NS->getLocation(),

[clang] [DependencyScanningFilesystem] Make sure the local/shared cache filename lookups use only absolute paths (PR #66122)

2023-09-15 Thread Argyrios Kyrtzidis via cfe-commits
@@ -330,3 +353,20 @@ DependencyScanningWorkerFilesystem::openFileForRead(const Twine ) { return Result.getError(); return DepScanFile::create(Result.get()); } + +std::error_code DependencyScanningWorkerFilesystem::setCurrentWorkingDirectory( +const Twine ) { +

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

2023-09-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/66514 >From 7ff6c1b8cb0fed5c4365f560f546b8f1c9d975c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 15 Sep 2023 15:51:39 +0200 Subject: [PATCH] [clang][Diagnostics] Highlight code snippets

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

2023-09-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/66514 >From 85e868765f37e09b922ff00869f1f1a7ff1ebd9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 15 Sep 2023 15:51:39 +0200 Subject: [PATCH] [clang][Diagnostics] Highlight code snippets

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-15 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D157913#4646718 , @thakis wrote: > Looks like this breaks check-clang on mac: > http://45.33.8.238/macm1/69297/step_7.txt > > Please take a look and revert for now if it takes a while to fix.

[clang] 1f33bfc - Fix test case in 32db121b29f78e4c41116b2a8f1c730f9522b202.

2023-09-15 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2023-09-15T14:42:55-04:00 New Revision: 1f33bfc23fb9e94b4db75b1b18fd00a438446f51 URL: https://github.com/llvm/llvm-project/commit/1f33bfc23fb9e94b4db75b1b18fd00a438446f51 DIFF: https://github.com/llvm/llvm-project/commit/1f33bfc23fb9e94b4db75b1b18fd00a438446f51.diff

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-15 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Looks like this breaks check-clang on mac: http://45.33.8.238/macm1/69297/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/D157913/new/

[clang] [DependencyScanningFilesystem] Make sure the local/shared cache filename lookups use only absolute paths (PR #66122)

2023-09-15 Thread Ben Langmuir via cfe-commits
@@ -330,3 +353,20 @@ DependencyScanningWorkerFilesystem::openFileForRead(const Twine ) { return Result.getError(); return DepScanFile::create(Result.get()); } + +std::error_code DependencyScanningWorkerFilesystem::setCurrentWorkingDirectory( +const Twine ) { +

[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Jakub Kuderski via cfe-commits
kuhar wrote: A few more questions @ktf: 1. Would it be possible to add a benchmark that compares this paged vector to `std::vector` and `llvm::SmallVector` for a few data types? Maybe `int`, `std::string`, `std::vector`. I would love to see what the performance characteristics are like. We

[clang] [Coverage] Add coverage for constructor member initializers. (PR #66441)

2023-09-15 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. https://github.com/llvm/llvm-project/pull/66441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DependencyScanningFilesystem] Make sure the local/shared cache filename lookups use only absolute paths (PR #66122)

2023-09-15 Thread Argyrios Kyrtzidis via cfe-commits
@@ -330,3 +353,20 @@ DependencyScanningWorkerFilesystem::openFileForRead(const Twine ) { return Result.getError(); return DepScanFile::create(Result.get()); } + +std::error_code DependencyScanningWorkerFilesystem::setCurrentWorkingDirectory( +const Twine ) { +

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Jocelyn Castellano via cfe-commits
https://github.com/pandaninjas updated https://github.com/llvm/llvm-project/pull/66315 >From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001 From: PandaNinjas Date: Wed, 13 Sep 2023 17:38:17 -0700 Subject: [PATCH 01/10] [libc++] Prevent calling the projection more than three

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Jocelyn Castellano via cfe-commits
https://github.com/pandaninjas updated https://github.com/llvm/llvm-project/pull/66315 >From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001 From: PandaNinjas Date: Wed, 13 Sep 2023 17:38:17 -0700 Subject: [PATCH 1/9] [libc++] Prevent calling the projection more than three

[clang] Honor -fno-sanitize-link-runtime for libclang_rt.asan_static (PR #66414)

2023-09-15 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka commented: Which branch exactly changed? https://github.com/llvm/llvm-project/pull/66414 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Use byval for SystemZ indirect arguments (PR #66404)

2023-09-15 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: In any case: - We absolutely can't use byval here. - If you think we need a new attribute for this, please start a Discourse thread to get some feedback. (I'm still not understanding what you're trying to fix here, but maybe additional perspectives would help bridge the

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
https://github.com/ldionne resolved https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D159522: [Clang][C] Fixed a bug where we reject an _Atomic qualified integer in a switch statment

2023-09-15 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 556871. to268 marked an inline comment as done. to268 added a comment. Added recommendation by @aaron.ballman Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159522/new/ https://reviews.llvm.org/D159522 Files:

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
@@ -37,9 +37,10 @@ struct __fn { _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))), "Bad bounds passed to std::ranges::clamp"); -if (std::invoke(__comp,

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
https://github.com/ldionne requested changes to this pull request. https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
https://github.com/ldionne edited https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
@@ -37,9 +37,10 @@ struct __fn { _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))), "Bad bounds passed to std::ranges::clamp"); -if (std::invoke(__comp,

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
https://github.com/ldionne requested changes to this pull request. https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
@@ -37,9 +37,10 @@ struct __fn { _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))), ldionne wrote: You're right, sorry for the noise. It supports a custom comparator, not a custom projection.

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
https://github.com/ldionne resolved https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
@@ -37,9 +37,10 @@ struct __fn { _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))), ldionne wrote: You're right, sorry for the noise. It supports a custom comparator, not a custom projection.

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Jocelyn Castellano via cfe-commits
https://github.com/pandaninjas updated https://github.com/llvm/llvm-project/pull/66315 >From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001 From: PandaNinjas Date: Wed, 13 Sep 2023 17:38:17 -0700 Subject: [PATCH 1/9] [libc++] Prevent calling the projection more than three

[clang] [analyzer] Improve constraint inferring on concrete div/mod (PR #65448)

2023-09-15 Thread Ding Fei via cfe-commits
danix800 wrote: > Uh, this isn't my expertiese. I'm a bit scared to do this alone. I'm also > short on time to verify this patch at scale. Look forward to hear more advice! @llvm/pr-subscribers-clang-static-analyzer https://github.com/llvm/llvm-project/pull/65448

[clang] [analyzer] Improve constraint inferring on concrete div/mod (PR #65448)

2023-09-15 Thread Ding Fei via cfe-commits
@@ -1824,6 +1835,94 @@ RangeSet SymbolicRangeInferrer::VisitBinaryOperator(Range LHS, return {RangeFactory, ValueFactory.getValue(Min), ValueFactory.getValue(Max)}; } +RangeSet SymbolicRangeInferrer::handleConcreteModulo(Range LHS, +

[clang] [analyzer] Improve constraint inferring on concrete div/mod (PR #65448)

2023-09-15 Thread Ding Fei via cfe-commits
@@ -1824,6 +1835,94 @@ RangeSet SymbolicRangeInferrer::VisitBinaryOperator(Range LHS, return {RangeFactory, ValueFactory.getValue(Min), ValueFactory.getValue(Max)}; } +RangeSet SymbolicRangeInferrer::handleConcreteModulo(Range LHS, +

[clang] [analyzer] Improve constraint inferring on concrete div/mod (PR #65448)

2023-09-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes 1. Reduce constraint on modulo with small concrete range when assigned; 2. Improve constraint inferring on modulo over concrete value; 3. Improve constraint inferring on division over concrete value. Fixes #54377 --- Full diff:

[clang] [analyzer] Improve constraint inferring on concrete div/mod (PR #65448)

2023-09-15 Thread Ding Fei via cfe-commits
https://github.com/danix800 edited https://github.com/llvm/llvm-project/pull/65448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D159522: [Clang][C] Fixed a bug where we reject an _Atomic qualified integer in a switch statment

2023-09-15 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 556868. to268 added a comment. I have added the missing ReleaseNote. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159522/new/ https://reviews.llvm.org/D159522 Files: clang/docs/ReleaseNotes.rst

[clang] [analyzer] Reduce constraint on modulo with small concrete range (PR #65448)

2023-09-15 Thread Ding Fei via cfe-commits
https://github.com/danix800 edited https://github.com/llvm/llvm-project/pull/65448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-15 Thread Zequan Wu 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 rG32db121b29f7: [Coverage] Allow Clang coverage to be used with debug info correlation. (authored by zequanwu). Changed prior to commit:

[clang] 32db121 - [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-15 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2023-09-15T13:47:23-04:00 New Revision: 32db121b29f78e4c41116b2a8f1c730f9522b202 URL: https://github.com/llvm/llvm-project/commit/32db121b29f78e4c41116b2a8f1c730f9522b202 DIFF: https://github.com/llvm/llvm-project/commit/32db121b29f78e4c41116b2a8f1c730f9522b202.diff

[clang] [analyzer] Reduce constraint on modulo with small concrete range (PR #65448)

2023-09-15 Thread Ding Fei via cfe-commits
https://github.com/danix800 updated https://github.com/llvm/llvm-project/pull/65448 >From 111de0e99482cf8c8c206286bb9a4f40149992c6 Mon Sep 17 00:00:00 2001 From: dingfei Date: Wed, 6 Sep 2023 10:03:21 +0800 Subject: [PATCH] [analyzer] Improve constraint inferring on concrete div/mod 1. Reduce

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Jocelyn Castellano via cfe-commits
@@ -37,9 +37,10 @@ struct __fn { _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))), pandaninjas wrote: I think we don't need a similar fix in `std::clamp` because `std::clamp` doesn't support

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Jocelyn Castellano via cfe-commits
@@ -37,9 +37,10 @@ struct __fn { _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))), pandaninjas wrote: I think we don't need a similar fix in `std::clamp` because `std::clamp` doesn't support

[clang] [clang][deps] Load module map file from PCM (PR #66389)

2023-09-15 Thread Ben Langmuir via cfe-commits
@@ -1307,6 +1307,9 @@ void ModuleMap::setInferredModuleAllowedBy(Module *M, std::error_code ModuleMap::canonicalizeModuleMapPath(SmallVectorImpl ) { + FileManager = SourceMgr.getFileManager(); + FM.makeAbsolutePath(Path); benlangmuir wrote: > The

[clang] [clang][Interp] Handle AttributedStmts (PR #66495)

2023-09-15 Thread via cfe-commits
@@ -628,6 +630,12 @@ bool ByteCodeStmtGen::visitAsmStmt(const AsmStmt *S) { return this->emitInvalid(S); } +template +bool ByteCodeStmtGen::visitAttributedStmt(const AttributedStmt *S) { + // Ignore all attributes. cor3ntin wrote: I'm sitting in core,

[PATCH] D159522: [Clang][C] Fixed a bug where we reject an _Atomic qualified integer in a switch statment

2023-09-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for working on this! You should also add a release note for the fix. Comment at: clang/lib/Sema/SemaOverload.cpp:6306-6310 + ExprResult Converted = DefaultLvalueConversion(From); + QualType T = Converted.isUsable() ?

[clang] [Coverage] Add coverage for constructor member initializers. (PR #66441)

2023-09-15 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/66441 >From d6dfbf826e642d4d78062efe49a7221ee8ba0372 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Fri, 15 Sep 2023 13:23:58 -0400 Subject: [PATCH] [Coverage] Add coverage for constructor member initializers.

[clang] [Coverage] Add coverage for constructor member initializers. (PR #66441)

2023-09-15 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/66441 >From be614f6412f0ddd9e4fea8842fbf0ddc389e6be6 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Thu, 14 Sep 2023 18:07:31 -0400 Subject: [PATCH 1/2] [Coverage] Add coverage for constructor member initializers.

[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Jakub Kuderski via cfe-commits
@@ -0,0 +1,133 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Jakub Kuderski via cfe-commits
@@ -0,0 +1,92 @@ +//===- llvm/unittest/ADT/PagedVectorTest.cpp --===// +// +// 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:

[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Jakub Kuderski via cfe-commits
@@ -0,0 +1,133 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Jakub Kuderski via cfe-commits
@@ -0,0 +1,84 @@ +//===- llvm/unittest/ADT/PagedVectorTest.cpp --===// +// +// 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:

[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Jakub Kuderski via cfe-commits
@@ -0,0 +1,133 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Jakub Kuderski via cfe-commits
@@ -0,0 +1,133 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Jakub Kuderski via cfe-commits
@@ -0,0 +1,133 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Jakub Kuderski via cfe-commits
@@ -0,0 +1,133 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[clang] [clang][deps] Load module map file from PCM (PR #66389)

2023-09-15 Thread Jan Svoboda via cfe-commits
@@ -1307,6 +1307,9 @@ void ModuleMap::setInferredModuleAllowedBy(Module *M, std::error_code ModuleMap::canonicalizeModuleMapPath(SmallVectorImpl ) { + FileManager = SourceMgr.getFileManager(); + FM.makeAbsolutePath(Path); jansvoboda11 wrote: > Is the idea

[PATCH] D145214: [TSAN] add support for riscv64

2023-09-15 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added a comment. Herald added subscribers: wangpc, sunshaoce. @alexfanqi are you still actively working on this? maybe we can move it to github then. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145214/new/

[clang] Extend `retcon.once` coroutines lowering to optionally produce a normal result (PR #66333)

2023-09-15 Thread Anton Korobeynikov via cfe-commits
https://github.com/asl closed https://github.com/llvm/llvm-project/pull/66333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][doc] Add documentation for the ASTs used to represent C++ templates (PR #66436)

2023-09-15 Thread Scott McPeak via cfe-commits
smcpeak wrote: Hi Tom! :) Indeed, any documentation brings with it an ongoing maintenance burden. There are two main things I see that need synchronization: the text descriptions of the fields, and the diagrams. For the fields, one idea I had is to write a script that runs as part of the

[clang] [DependencyScanningFilesystem] Make sure the local/shared cache filename lookups use only absolute paths (PR #66122)

2023-09-15 Thread Ben Langmuir via cfe-commits
@@ -330,3 +353,20 @@ DependencyScanningWorkerFilesystem::openFileForRead(const Twine ) { return Result.getError(); return DepScanFile::create(Result.get()); } + +std::error_code DependencyScanningWorkerFilesystem::setCurrentWorkingDirectory( +const Twine ) { +

<    1   2   3   4   5   >