[jenkinsci/oic-auth-plugin] 84924d: document ADFS token lifetime for devs

2024-10-10 Thread 'James Nord' via Jenkins Commits
  Branch: refs/heads/master
  Home:   https://github.com/jenkinsci/oic-auth-plugin
  Commit: 84924d9901cd0a7951b2cdffe6e782f41f0ca9b3
  
https://github.com/jenkinsci/oic-auth-plugin/commit/84924d9901cd0a7951b2cdffe6e782f41f0ca9b3
  Author: James Nord 
  Date:   2024-10-08 (Tue, 08 Oct 2024)

  Changed paths:
M docs/developer/AD-FS/setup-test-instance.md

  Log Message:
  ---
  document ADFS token lifetime for devs


  Commit: 4f73328ebd2c14777673d45b33135deb80c5ebd8
  
https://github.com/jenkinsci/oic-auth-plugin/commit/4f73328ebd2c14777673d45b33135deb80c5ebd8
  Author: James Nord 
  Date:   2024-10-10 (Thu, 10 Oct 2024)

  Changed paths:
M docs/developer/AD-FS/setup-test-instance.md

  Log Message:
  ---
  Merge pull request #420 from jenkinsci/add-adfs-token-lifetime

document ADFS token lifetime for devs


Compare: 
https://github.com/jenkinsci/oic-auth-plugin/compare/7706fbdc9c3f...4f73328ebd2c

To unsubscribe from these emails, change your notification settings at 
https://github.com/jenkinsci/oic-auth-plugin/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-commits/jenkinsci/oic-auth-plugin/push/refs/heads/master/7706fb-4f7332%40github.com.


[clang] Enable matrices in HLSL (PR #111415)

2024-10-10 Thread Greg Roth via cfe-commits


@@ -17,12 +17,12 @@ void add(sx10x10_t a, sx5x10_t b, sx10x5_t c) {
   // expected-error@-1 {{assigning to 'sx10x10_t' (aka 'float 
__attribute__((matrix_type(10, 10)))') from incompatible type 'sx5x10_t' (aka 
'float __attribute__((matrix_type(5, 10)))')}}
 
   a = b + &c;
-  // expected-error@-1 {{invalid operands to binary expression ('sx5x10_t' 
(aka 'float __attribute__((matrix_type(5, 10)))') and 'sx10x5_t *' (aka 'float  
__attribute__((matrix_type(10, 5)))*'))}}
-  // expected-error@-2 {{casting 'sx10x5_t *' (aka 'float  
__attribute__((matrix_type(10, 5)))*') to incompatible type 'float'}}
+  // expected-error@-1 {{invalid operands to binary expression ('sx5x10_t' 
(aka 'float __attribute__((matrix_type(5, 10)))') and 'sx10x5_t *' (aka 'float 
* __attribute__((matrix_type(10, 5)))'))}}

pow2clk wrote:

Another oddity in how pointers to matrices were printed before was a double 
space between the type and the attribute. It's minor, but it suggested 
something was missing there.

https://github.com/llvm/llvm-project/pull/111415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[Lldb-commits] [lldb] [lldb] Add include for SBLanguages in lldb-enumerations (PR #111907)

2024-10-10 Thread Vladimir Vereschaka via lldb-commits

vvereschaka wrote:

@chelcassanova `lldb/API/SBLanguages.h` is generated file. I suppose its 
generation must be enabled for the `lldb-server` target in that case; otherwise 
we get the following build errors:
```
In file included from 
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/include/lldb/lldb-types.h:12:
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/include/lldb/lldb-enumerations.h:15:10:
 fatal error: 'lldb/API/SBLanguages.h' file not found
   15 | #include 
  |  ^~~~
1 error generated.
```
https://lab.llvm.org/staging/#/builders/195/builds/4266

i.e. when only 'lldb-server' target gets built (`cmake --build . --target 
lldb-server`)

https://github.com/llvm/llvm-project/pull/111907
_______
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[jenkinsci/oic-auth-plugin] 60fc09: Replace EOL Google Oauth library

2024-10-10 Thread 'James Nord' via Jenkins Commits
  ---
  FormValidation should be an error as value is required

Co-authored-by: Pere 


  Commit: d5e15228fc5410a024a4d0e9d03e5e5ea8a02882
  
https://github.com/jenkinsci/oic-auth-plugin/commit/d5e15228fc5410a024a4d0e9d03e5e5ea8a02882
  Author: James Nord 
  Date:   2024-10-09 (Wed, 09 Oct 2024)

  Changed paths:
M src/main/java/org/jenkinsci/plugins/oic/OicServerManualConfiguration.java

  Log Message:
  ---
  fix empty strings


  Commit: 7706fbdc9c3f2e5374ea4c4bf59b264b9ea1cd86
  
https://github.com/jenkinsci/oic-auth-plugin/commit/7706fbdc9c3f2e5374ea4c4bf59b264b9ea1cd86
  Author: James Nord 
  Date:   2024-10-10 (Thu, 10 Oct 2024)

  Changed paths:
M pom.xml
A src/main/java/org/jenkinsci/plugins/oic/AnythingGoesTokenValidator.java
A src/main/java/org/jenkinsci/plugins/oic/CustomOidcConfiguration.java
R src/main/java/org/jenkinsci/plugins/oic/JenkinsAwareConnectionFactory.java
M src/main/java/org/jenkinsci/plugins/oic/OicCrumbExclusion.java
R src/main/java/org/jenkinsci/plugins/oic/OicJsonWebTokenVerifier.java
M src/main/java/org/jenkinsci/plugins/oic/OicSecurityRealm.java
M src/main/java/org/jenkinsci/plugins/oic/OicServerConfiguration.java
M src/main/java/org/jenkinsci/plugins/oic/OicServerManualConfiguration.java
M 
src/main/java/org/jenkinsci/plugins/oic/OicServerWellKnownConfiguration.java
R src/main/java/org/jenkinsci/plugins/oic/OicSession.java
R src/main/java/org/jenkinsci/plugins/oic/OicTokenResponse.java
A src/main/java/org/jenkinsci/plugins/oic/ProxyAwareResourceRetriever.java
R 
src/main/java/org/jenkinsci/plugins/oic/WellKnownOpenIDConfigurationResponse.java
A src/main/java/org/jenkinsci/plugins/oic/ssl/AnythingGoesTrustManager.java
A src/main/java/org/jenkinsci/plugins/oic/ssl/IgnoringHostNameVerifier.java
A src/main/java/org/jenkinsci/plugins/oic/ssl/TLSUtils.java
M src/main/resources/org/jenkinsci/plugins/oic/Messages.properties
M 
src/main/resources/org/jenkinsci/plugins/oic/OicSecurityRealm/help-sendScopesInTokenRequest.html
M 
src/main/resources/org/jenkinsci/plugins/oic/OicSecurityRealm/help-sendScopesInTokenRequest_fr.html
A 
src/main/resources/org/jenkinsci/plugins/oic/OicSecurityRealm/help-subjectType.html
M 
src/main/resources/org/jenkinsci/plugins/oic/OicServerManualConfiguration/config.jelly
M 
src/main/resources/org/jenkinsci/plugins/oic/OicServerManualConfiguration/help-issuer.html
M 
src/main/resources/org/jenkinsci/plugins/oic/OicServerManualConfiguration/help-issuer_fr.html
M src/test/java/org/jenkinsci/plugins/oic/ConfigurationAsCodeTest.java
M src/test/java/org/jenkinsci/plugins/oic/FieldTest.java
R 
src/test/java/org/jenkinsci/plugins/oic/JenkinsAwareConnectionFactoryTest.java
R src/test/java/org/jenkinsci/plugins/oic/OicJsonWebTokenVerifierTest.java
M 
src/test/java/org/jenkinsci/plugins/oic/OicServerWellKnownConfigurationTest.java
R src/test/java/org/jenkinsci/plugins/oic/OicSessionTest.java
R src/test/java/org/jenkinsci/plugins/oic/OicTokenResponseTest.java
M src/test/java/org/jenkinsci/plugins/oic/PluginTest.java
A 
src/test/java/org/jenkinsci/plugins/oic/ProxyAwareResourceRetrieverTest.java
M src/test/java/org/jenkinsci/plugins/oic/TestRealm.java
R 
src/test/java/org/jenkinsci/plugins/oic/WellKnownOpenIDConfigurationResponseTest.java
M src/test/resources/org/jenkinsci/plugins/oic/ConfigurationAsCode.yml
M src/test/resources/org/jenkinsci/plugins/oic/ConfigurationAsCodeExport.yml
M 
src/test/resources/org/jenkinsci/plugins/oic/ConfigurationAsCodeMinimal.yml

  Log Message:
  ---
  Merge pull request #409 from jtnord/pac4j

Replace EOL Google Oauth library


Compare: 
https://github.com/jenkinsci/oic-auth-plugin/compare/c7c0c06e8af5...7706fbdc9c3f

To unsubscribe from these emails, change your notification settings at 
https://github.com/jenkinsci/oic-auth-plugin/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-commits/jenkinsci/oic-auth-plugin/push/refs/heads/master/c7c0c0-7706fb%40github.com.


[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #99736)

2024-10-10 Thread Augusto Noronha via lldb-commits

augusto2112 wrote:

I'll revert it!

https://github.com/llvm/llvm-project/pull/99736
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[clang] [compiler-rt] [libcxx] [llvm] [clang] Warn about memset/memcpy to NonTriviallyCopyable types (PR #111434)

2024-10-10 Thread via cfe-commits


@@ -102,7 +102,7 @@ struct __aliasing_iterator_wrapper {
 
 _LIBCPP_HIDE_FROM_ABI _Alias operator*() const _NOEXCEPT {
   _Alias __val;
-  __builtin_memcpy(&__val, std::__to_address(__base_), sizeof(value_type));
+  __builtin_memcpy(&__val, static_cast(std::__to_address(__base_)), sizeof(value_type));

serge-sans-paille wrote:

There's one thing I don't understand: my understanding is that passing a 
pointer to a non-trivially copyable type to memcpy first or second argument is 
UB and ` _BaseIter` maybe a non-trivially copyable type, so what happens then?

https://github.com/llvm/llvm-project/pull/111434
_______
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #99736)

2024-10-10 Thread Robert O'Callahan via lldb-commits

rocallahan wrote:

I don't know what your normal protocol is but maybe you should revert it while 
I debug the failure?

The last successful CI run in this PR was from September 25.

https://github.com/llvm/llvm-project/pull/99736
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #99736)

2024-10-10 Thread Augusto Noronha via lldb-commits

augusto2112 wrote:

Looks like `TestReverseContinueBreakpoints.py` is failing on the bots 
(https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/13228/console)

https://github.com/llvm/llvm-project/pull/99736
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[clang] Enable matrices in HLSL (PR #111415)

2024-10-10 Thread Greg Roth via cfe-commits


@@ -852,34 +852,50 @@ void TypePrinter::printExtVectorAfter(const ExtVectorType 
*T, raw_ostream &OS) {
 
 void TypePrinter::printConstantMatrixBefore(const ConstantMatrixType *T,
 raw_ostream &OS) {
+  if (Policy.UseHLSLTypes)
+OS << "matrix<";
   printBefore(T->getElementType(), OS);
-  OS << " __attribute__((matrix_type(";
-  OS << T->getNumRows() << ", " << T->getNumColumns();
-  OS << ")))";

pow2clk wrote:

See my response to Florian 
[here](https://github.com/llvm/llvm-project/pull/111415/files#r1796090424)

https://github.com/llvm/llvm-project/pull/111415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Enable matrices in HLSL (PR #111415)

2024-10-10 Thread Greg Roth via cfe-commits


@@ -1381,7 +1381,7 @@ void ASTContext::InitBuiltinTypes(const TargetInfo 
&Target,
   if (LangOpts.OpenACC && !LangOpts.OpenMP) {
 InitBuiltinType(ArraySectionTy, BuiltinType::ArraySection);
   }
-  if (LangOpts.MatrixTypes)
+  if (LangOpts.MatrixTypes || LangOpts.HLSL)

pow2clk wrote:

I'll look into that. I didn't want to enable matrices by default because I 
didn't really want to allow the matrix attribute syntax in HLSL.

https://github.com/llvm/llvm-project/pull/111415
_______
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[tor-commits] [Git][tpo/applications/mullvad-browser][mullvad-browser-128.3.0esr-14.0-1] 2 commits: dropme! Bug 4234: Use the Firefox Update Process for Base Browser.

2024-10-10 Thread morgan (@morgan) via tor-commits


morgan pushed to branch mullvad-browser-128.3.0esr-14.0-1 at The Tor Project / 
Applications / Mullvad Browser


Commits:
bc8fd871 by Pier Angelo Vendrame at 2024-10-10T21:13:43+00:00
dropme! Bug 4234: Use the Firefox Update Process for Base Browser.

This commit is not for rebase.

Revert "fixup! Bug 4234: Use the Firefox Update Process for Base 
Browser."

This reverts commit af856ef0e56959a57baa0056916b84e02eaf4c67.

- - - - -
2a2f50eb by Pier Angelo Vendrame at 2024-10-10T21:13:44+00:00
Bug 1923264 - Discard unsupported updates in selectUpdate. 
r=bytesized,nalexander

UpdateService.#selectUpdate currently chooses always the most recent
update even when unsupported and an older but supported one is
available.
This commit makes #selectUpdate discard the unsupported update if a
supported alternative is found.

Differential Revision: https://phabricator.services.mozilla.com/D224905
- - - - -


3 changed files:

- toolkit/mozapps/update/tests/data/sharedUpdateXML.js
- + toolkit/mozapps/update/tests/unit_aus_update/mixedUnsupported.js
- toolkit/mozapps/update/tests/unit_aus_update/xpcshell.toml


Changes:

=
toolkit/mozapps/update/tests/data/sharedUpdateXML.js
=
@@ -141,6 +141,7 @@ function getRemoteUpdateString(aUpdateProps, aPatches) {
 name: "App Update Test",
 promptWaitTime: null,
 type: "major",
+unsupported: false,
   };
 
   for (let name in aUpdateProps) {
@@ -346,6 +347,7 @@ function getUpdateString(aUpdateProps) {
   aUpdateProps.disableBackgroundUpdates +
   '" '
 : "";
+  let unsupported = aUpdateProps.unsupported ? 'unsupported="true" ' : "";
   let custom1 = aUpdateProps.custom1 ? aUpdateProps.custom1 + " " : "";
   let custom2 = aUpdateProps.custom2 ? aUpdateProps.custom2 + " " : "";
   let buildID = 'buildID="' + aUpdateProps.buildID + '"';
@@ -360,6 +362,7 @@ function getUpdateString(aUpdateProps) {
 promptWaitTime +
 disableBITS +
 disableBackgroundUpdates +
+unsupported +
 custom1 +
 custom2 +
 buildID


=
toolkit/mozapps/update/tests/unit_aus_update/mixedUnsupported.js
=
@@ -0,0 +1,50 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * This tests that an older update is chosen over a more recent but unsupported
+ * update.
+ */
+
+async function run_test() {
+  setupTestCommon();
+  start_httpserver();
+  setUpdateURL(gURLData + gHTTPHandlerPath);
+  setUpdateChannel("test_channel");
+
+  let patchProps = {
+type: "complete",
+url: "http://complete/";,
+size: "9856459",
+  };
+  let patches = getRemotePatchString(patchProps);
+  patchProps = { type: "partial", url: "http://partial/";, size: "1316138" };
+  patches += getRemotePatchString(patchProps);
+
+  let oldAppVersion = "90.0";
+  let newAppVersion = "99.0";
+  let update1 = getRemoteUpdateString(
+{ appVersion: newAppVersion, unsupported: true },
+patches
+  );
+  let update2 = getRemoteUpdateString({ appVersion: oldAppVersion }, patches);
+  gResponseBody = getRemoteUpdatesXMLString(update1 + update2);
+
+  let checkResult = await waitForUpdateCheck(true, { updateCount: 2 });
+  let bestUpdate = await gAUS.selectUpdate(checkResult.updates);
+  bestUpdate.QueryInterface(Ci.nsIWritablePropertyBag);
+  Assert.equal(
+bestUpdate.unsupported,
+false,
+"The unsupported update has been discarded."
+  );
+  Assert.equal(
+bestUpdate.appVersion,
+oldAppVersion,
+"Expected the older version to be chosen over the more recent but 
unsupported."
+  );
+
+  stop_httpserver(doTestFinish);
+}


=
toolkit/mozapps/update/tests/unit_aus_update/xpcshell.toml
=
@@ -56,6 +56,8 @@ reason = "Feature is Firefox-specific and Windows-specific."
 ["languagePackUpdates.js"]
 skip-if = ["socketprocess_networking"] # Bug 1759035
 
+["mixedUnsupported.js"]
+
 ["multiUpdate.js"]
 skip-if = ["socketprocess_networking"] # Bug 1759035
 



View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/be3bc0554ba2d322e2d7d308e01e41ee264248dc...2a2f50ebed8d4b9a479e0a437987435bc4e24939

-- 
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/be3bc0554ba2d322e2d7d308e01e41ee264248dc...2a2f50ebed8d4b9a479e0a437987435bc4e24939
You're receiving this email because of your account on gitlab.torproject.org.


___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[clang-tools-extra] [clang-tidy] support `return c ? a : b;` in bugprone-return-const-ref-from-parameter (PR #107657)

2024-10-10 Thread Julian Schmidt via cfe-commits

https://github.com/5chmidti edited 
https://github.com/llvm/llvm-project/pull/107657
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang-tools-extra] [clang-tidy] support `return c ? a : b;` in bugprone-return-const-ref-from-parameter (PR #107657)

2024-10-10 Thread Julian Schmidt via cfe-commits


@@ -15,20 +16,24 @@ using namespace clang::ast_matchers;
 namespace clang::tidy::bugprone {
 
 void ReturnConstRefFromParameterCheck::registerMatchers(MatchFinder *Finder) {
-  Finder->addMatcher(
-  returnStmt(
-  hasReturnValue(declRefExpr(
-  to(parmVarDecl(hasType(hasCanonicalType(
- qualType(lValueReferenceType(pointee(
-  qualType(isConstQualified()
- .bind("type"
- .bind("param",
-  hasAncestor(
-  functionDecl(hasReturnTypeLoc(loc(qualType(
-   hasCanonicalType(equalsBoundNode("type"))
-  .bind("func")))
-  .bind("ret"),
-  this);
+  const auto DRef =
+  declRefExpr(
+  to(parmVarDecl(hasType(hasCanonicalType(
+ qualType(lValueReferenceType(pointee(
+  qualType(isConstQualified()
+ .bind("type"
+ .bind("param")))
+  .bind("dref");
+  const auto Func =
+  functionDecl(hasReturnTypeLoc(loc(
+   qualType(hasCanonicalType(equalsBoundNode("type"))
+  .bind("func");
+
+  Finder->addMatcher(returnStmt(hasReturnValue(DRef), hasAncestor(Func)), 
this);
+  Finder->addMatcher(conditionalOperator(eachOf(hasTrueExpression(DRef),

5chmidti wrote:

> I've also wrapped the `conditionalOperator` inside an `ignoresParens`

Maybe that should be done as a new commit? WDYT?

https://github.com/llvm/llvm-project/pull/107657
_______
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang-tools-extra] [clang-tidy] support `return c ? a : b;` in bugprone-return-const-ref-from-parameter (PR #107657)

2024-10-10 Thread Julian Schmidt via cfe-commits
TConstRef a) { return a; }
 int const &f4(TConst &a) { return a; }
 // CHECK-MESSAGES: :[[@LINE-1]]:35: warning: returning a constant reference 
parameter
 
+int const &f5(TConst &a) { return true ? a : a; }
+// CHECK-MESSAGES: :[[@LINE-1]]:42: warning: returning a constant reference 
parameter
+// CHECK-MESSAGES: :[[@LINE-2]]:46: warning: returning a constant reference 
parameter
+
 template 
 const T& tf1(const T &a) { return a; }
 // CHECK-MESSAGES: :[[@LINE-1]]:35: warning: returning a constant reference 
parameter
@@ -47,6 +51,11 @@ template 
 const T& itf4(typename ConstRef::type a) { return a; }
 // CHECK-MESSAGES: :[[@LINE-1]]:54: warning: returning a constant reference 
parameter
 
+template 
+const T& itf5(const T &a) { return true ? a : a; }
+// CHECK-MESSAGES: :[[@LINE-1]]:43: warning: returning a constant reference 
parameter
+// CHECK-MESSAGES: :[[@LINE-2]]:47: warning: returning a constant reference 
parameter
+
 void instantiate(const int ¶m, const float ¶mf, int &mut_param, float 
&mut_paramf) {
 itf1(0);
 itf1(param);

>From 1c3d6275de45b9c523ad0eaf61b8a63bce5f5aba Mon Sep 17 00:00:00 2001
From: Julian Schmidt 
Date: Wed, 9 Oct 2024 21:45:29 +0200
Subject: [PATCH 2/3] the conditional operator has to be the returned value

---
 .../bugprone/ReturnConstRefFromParameterCheck.cpp| 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git 
a/clang-tools-extra/clang-tidy/bugprone/ReturnConstRefFromParameterCheck.cpp 
b/clang-tools-extra/clang-tidy/bugprone/ReturnConstRefFromParameterCheck.cpp
index 9c12b8fb12838c..ea7432f2549cca 100644
--- a/clang-tools-extra/clang-tidy/bugprone/ReturnConstRefFromParameterCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/ReturnConstRefFromParameterCheck.cpp
@@ -30,10 +30,11 @@ void 
ReturnConstRefFromParameterCheck::registerMatchers(MatchFinder *Finder) {
   .bind("func");
 
   Finder->addMatcher(returnStmt(hasReturnValue(DRef), hasAncestor(Func)), 
this);
-  Finder->addMatcher(conditionalOperator(eachOf(hasTrueExpression(DRef),
-hasFalseExpression(DRef)),
- hasAncestor(Func)),
- this);
+  Finder->addMatcher(
+  returnStmt(hasReturnValue(ignoringParens(conditionalOperator(
+  eachOf(hasTrueExpression(DRef), hasFalseExpression(DRef)),
+  hasAncestor(Func),
+  this);
 }
 
 static bool isSameTypeIgnoringConst(QualType A, QualType B) {

>From f47238fec6d8a84fb968cc2c4eb6f78a76ebd6e0 Mon Sep 17 00:00:00 2001
From: Julian Schmidt 
Date: Thu, 10 Oct 2024 23:15:03 +0200
Subject: [PATCH 3/3] ignore parens for the DeclRefExpr of the parameter

---
 .../clang-tidy/bugprone/ReturnConstRefFromParameterCheck.cpp  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/clang-tools-extra/clang-tidy/bugprone/ReturnConstRefFromParameterCheck.cpp 
b/clang-tools-extra/clang-tidy/bugprone/ReturnConstRefFromParameterCheck.cpp
index ea7432f2549cca..7cc4fe519d3a64 100644
--- a/clang-tools-extra/clang-tidy/bugprone/ReturnConstRefFromParameterCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/ReturnConstRefFromParameterCheck.cpp
@@ -16,14 +16,14 @@ using namespace clang::ast_matchers;
 namespace clang::tidy::bugprone {
 
 void ReturnConstRefFromParameterCheck::registerMatchers(MatchFinder *Finder) {
-  const auto DRef =
+  const auto DRef = ignoringParens(
   declRefExpr(
   to(parmVarDecl(hasType(hasCanonicalType(
  qualType(lValueReferenceType(pointee(
   qualType(isConstQualified()
  .bind("type"
  .bind("param")))
-  .bind("dref");
+  .bind("dref"));
   const auto Func =
   functionDecl(hasReturnTypeLoc(loc(
qualType(hasCanonicalType(equalsBoundNode("type"))

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[tor-commits] [Git][tpo/applications/tor-browser][base-browser-128.3.0esr-14.0-1] 2 commits: dropme! Bug 4234: Use the Firefox Update Process for Base Browser.

2024-10-10 Thread morgan (@morgan) via tor-commits


morgan pushed to branch base-browser-128.3.0esr-14.0-1 at The Tor Project / 
Applications / Tor Browser


Commits:
e67837c7 by Pier Angelo Vendrame at 2024-10-10T21:12:54+00:00
dropme! Bug 4234: Use the Firefox Update Process for Base Browser.

This commit is not for rebase.

Revert "fixup! Bug 4234: Use the Firefox Update Process for Base 
Browser."

This reverts commit af856ef0e56959a57baa0056916b84e02eaf4c67.

- - - - -
011b3ff9 by Pier Angelo Vendrame at 2024-10-10T21:12:55+00:00
Bug 1923264 - Discard unsupported updates in selectUpdate. 
r=bytesized,nalexander

UpdateService.#selectUpdate currently chooses always the most recent
update even when unsupported and an older but supported one is
available.
This commit makes #selectUpdate discard the unsupported update if a
supported alternative is found.

Differential Revision: https://phabricator.services.mozilla.com/D224905
- - - - -


3 changed files:

- toolkit/mozapps/update/tests/data/sharedUpdateXML.js
- + toolkit/mozapps/update/tests/unit_aus_update/mixedUnsupported.js
- toolkit/mozapps/update/tests/unit_aus_update/xpcshell.toml


Changes:

=
toolkit/mozapps/update/tests/data/sharedUpdateXML.js
=
@@ -141,6 +141,7 @@ function getRemoteUpdateString(aUpdateProps, aPatches) {
 name: "App Update Test",
 promptWaitTime: null,
 type: "major",
+unsupported: false,
   };
 
   for (let name in aUpdateProps) {
@@ -346,6 +347,7 @@ function getUpdateString(aUpdateProps) {
   aUpdateProps.disableBackgroundUpdates +
   '" '
 : "";
+  let unsupported = aUpdateProps.unsupported ? 'unsupported="true" ' : "";
   let custom1 = aUpdateProps.custom1 ? aUpdateProps.custom1 + " " : "";
   let custom2 = aUpdateProps.custom2 ? aUpdateProps.custom2 + " " : "";
   let buildID = 'buildID="' + aUpdateProps.buildID + '"';
@@ -360,6 +362,7 @@ function getUpdateString(aUpdateProps) {
 promptWaitTime +
 disableBITS +
 disableBackgroundUpdates +
+unsupported +
 custom1 +
 custom2 +
 buildID


=
toolkit/mozapps/update/tests/unit_aus_update/mixedUnsupported.js
=
@@ -0,0 +1,50 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * This tests that an older update is chosen over a more recent but unsupported
+ * update.
+ */
+
+async function run_test() {
+  setupTestCommon();
+  start_httpserver();
+  setUpdateURL(gURLData + gHTTPHandlerPath);
+  setUpdateChannel("test_channel");
+
+  let patchProps = {
+type: "complete",
+url: "http://complete/";,
+size: "9856459",
+  };
+  let patches = getRemotePatchString(patchProps);
+  patchProps = { type: "partial", url: "http://partial/";, size: "1316138" };
+  patches += getRemotePatchString(patchProps);
+
+  let oldAppVersion = "90.0";
+  let newAppVersion = "99.0";
+  let update1 = getRemoteUpdateString(
+{ appVersion: newAppVersion, unsupported: true },
+patches
+  );
+  let update2 = getRemoteUpdateString({ appVersion: oldAppVersion }, patches);
+  gResponseBody = getRemoteUpdatesXMLString(update1 + update2);
+
+  let checkResult = await waitForUpdateCheck(true, { updateCount: 2 });
+  let bestUpdate = await gAUS.selectUpdate(checkResult.updates);
+  bestUpdate.QueryInterface(Ci.nsIWritablePropertyBag);
+  Assert.equal(
+bestUpdate.unsupported,
+false,
+"The unsupported update has been discarded."
+  );
+  Assert.equal(
+bestUpdate.appVersion,
+oldAppVersion,
+"Expected the older version to be chosen over the more recent but 
unsupported."
+  );
+
+  stop_httpserver(doTestFinish);
+}


=
toolkit/mozapps/update/tests/unit_aus_update/xpcshell.toml
=
@@ -56,6 +56,8 @@ reason = "Feature is Firefox-specific and Windows-specific."
 ["languagePackUpdates.js"]
 skip-if = ["socketprocess_networking"] # Bug 1759035
 
+["mixedUnsupported.js"]
+
 ["multiUpdate.js"]
 skip-if = ["socketprocess_networking"] # Bug 1759035
 



View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/c3282afe80a2df8dbfb0ec90b4d5027ef320f479...011b3ff959252cf754884418a3df3b97c634e685

-- 
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/c3282afe80a2df8dbfb0ec90b4d5027ef320f479...011b3ff959252cf754884418a3df3b97c634e685
You're receiving this email because of your account on gitlab.torproject.org.


___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-128.3.0esr-14.0-1] 2 commits: dropme! Bug 4234: Use the Firefox Update Process for Base Browser.

2024-10-10 Thread morgan (@morgan) via tor-commits


morgan pushed to branch tor-browser-128.3.0esr-14.0-1 at The Tor Project / 
Applications / Tor Browser


Commits:
39ab6faf by Pier Angelo Vendrame at 2024-10-10T20:55:41+00:00
dropme! Bug 4234: Use the Firefox Update Process for Base Browser.

This commit is not for rebase.

Revert "fixup! Bug 4234: Use the Firefox Update Process for Base 
Browser."

This reverts commit af856ef0e56959a57baa0056916b84e02eaf4c67.

- - - - -
25d29e14 by Pier Angelo Vendrame at 2024-10-10T20:55:41+00:00
Bug 1923264 - Discard unsupported updates in selectUpdate. 
r=bytesized,nalexander

UpdateService.#selectUpdate currently chooses always the most recent
update even when unsupported and an older but supported one is
available.
This commit makes #selectUpdate discard the unsupported update if a
supported alternative is found.

Differential Revision: https://phabricator.services.mozilla.com/D224905
- - - - -


3 changed files:

- toolkit/mozapps/update/tests/data/sharedUpdateXML.js
- + toolkit/mozapps/update/tests/unit_aus_update/mixedUnsupported.js
- toolkit/mozapps/update/tests/unit_aus_update/xpcshell.toml


Changes:

=
toolkit/mozapps/update/tests/data/sharedUpdateXML.js
=
@@ -141,6 +141,7 @@ function getRemoteUpdateString(aUpdateProps, aPatches) {
 name: "App Update Test",
 promptWaitTime: null,
 type: "major",
+unsupported: false,
   };
 
   for (let name in aUpdateProps) {
@@ -346,6 +347,7 @@ function getUpdateString(aUpdateProps) {
   aUpdateProps.disableBackgroundUpdates +
   '" '
 : "";
+  let unsupported = aUpdateProps.unsupported ? 'unsupported="true" ' : "";
   let custom1 = aUpdateProps.custom1 ? aUpdateProps.custom1 + " " : "";
   let custom2 = aUpdateProps.custom2 ? aUpdateProps.custom2 + " " : "";
   let buildID = 'buildID="' + aUpdateProps.buildID + '"';
@@ -360,6 +362,7 @@ function getUpdateString(aUpdateProps) {
 promptWaitTime +
 disableBITS +
 disableBackgroundUpdates +
+unsupported +
 custom1 +
 custom2 +
 buildID


=
toolkit/mozapps/update/tests/unit_aus_update/mixedUnsupported.js
=
@@ -0,0 +1,50 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * This tests that an older update is chosen over a more recent but unsupported
+ * update.
+ */
+
+async function run_test() {
+  setupTestCommon();
+  start_httpserver();
+  setUpdateURL(gURLData + gHTTPHandlerPath);
+  setUpdateChannel("test_channel");
+
+  let patchProps = {
+type: "complete",
+url: "http://complete/";,
+size: "9856459",
+  };
+  let patches = getRemotePatchString(patchProps);
+  patchProps = { type: "partial", url: "http://partial/";, size: "1316138" };
+  patches += getRemotePatchString(patchProps);
+
+  let oldAppVersion = "90.0";
+  let newAppVersion = "99.0";
+  let update1 = getRemoteUpdateString(
+{ appVersion: newAppVersion, unsupported: true },
+patches
+  );
+  let update2 = getRemoteUpdateString({ appVersion: oldAppVersion }, patches);
+  gResponseBody = getRemoteUpdatesXMLString(update1 + update2);
+
+  let checkResult = await waitForUpdateCheck(true, { updateCount: 2 });
+  let bestUpdate = await gAUS.selectUpdate(checkResult.updates);
+  bestUpdate.QueryInterface(Ci.nsIWritablePropertyBag);
+  Assert.equal(
+bestUpdate.unsupported,
+false,
+"The unsupported update has been discarded."
+  );
+  Assert.equal(
+bestUpdate.appVersion,
+oldAppVersion,
+"Expected the older version to be chosen over the more recent but 
unsupported."
+  );
+
+  stop_httpserver(doTestFinish);
+}


=
toolkit/mozapps/update/tests/unit_aus_update/xpcshell.toml
=
@@ -56,6 +56,8 @@ reason = "Feature is Firefox-specific and Windows-specific."
 ["languagePackUpdates.js"]
 skip-if = ["socketprocess_networking"] # Bug 1759035
 
+["mixedUnsupported.js"]
+
 ["multiUpdate.js"]
 skip-if = ["socketprocess_networking"] # Bug 1759035
 



View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/61c5f5000b9eaf0bc46c71290c466562b8c5a8f4...25d29e14296a23a9421683d27428dff78038b473

-- 
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/61c5f5000b9eaf0bc46c71290c466562b8c5a8f4...25d29e14296a23a9421683d27428dff78038b473
You're receiving this email because of your account on gitlab.torproject.org.


___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[clang] Enable matrices in HLSL (PR #111415)

2024-10-10 Thread Greg Roth via cfe-commits

https://github.com/pow2clk edited 
https://github.com/llvm/llvm-project/pull/111415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[Lldb-commits] [lldb] [LLDB] FindLibCppStdFunctionCallableInfo improvements (PR #111892)

2024-10-10 Thread David Mentler via lldb-commits
lables.. do we really 
need to?
+  // Is it important to have the correct qualification in the summary?
+  .callable_case = LibCppStdFunctionCallableCase::Lambda
+};
   }
   
-  if (!target_func_load_addr)
+  // Unrecognized callable type - skip the original implementation for now
+  if (!callable_type.IsVoidType())
 return optional_info;
-
   
   // Member __f_ has type __base*, the contents of which will hold:
   // 1) a vtable entry which may hold type information needed to discover the

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[clang] Enable matrices in HLSL (PR #111415)

2024-10-10 Thread Greg Roth via cfe-commits

https://github.com/pow2clk edited 
https://github.com/llvm/llvm-project/pull/111415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Enable matrices in HLSL (PR #111415)

2024-10-10 Thread Greg Roth via cfe-commits


@@ -17,12 +17,12 @@ void add(sx10x10_t a, sx5x10_t b, sx10x5_t c) {
   // expected-error@-1 {{assigning to 'sx10x10_t' (aka 'float 
__attribute__((matrix_type(10, 10)))') from incompatible type 'sx5x10_t' (aka 
'float __attribute__((matrix_type(5, 10)))')}}
 
   a = b + &c;
-  // expected-error@-1 {{invalid operands to binary expression ('sx5x10_t' 
(aka 'float __attribute__((matrix_type(5, 10)))') and 'sx10x5_t *' (aka 'float  
__attribute__((matrix_type(10, 5)))*'))}}
-  // expected-error@-2 {{casting 'sx10x5_t *' (aka 'float  
__attribute__((matrix_type(10, 5)))*') to incompatible type 'float'}}
+  // expected-error@-1 {{invalid operands to binary expression ('sx5x10_t' 
(aka 'float __attribute__((matrix_type(5, 10)))') and 'sx10x5_t *' (aka 'float 
* __attribute__((matrix_type(10, 5)))'))}}

pow2clk wrote:

hi @fhahn!

Thanks for taking a look at this!

It was intentional, but this is the consequence of the change I commented on 
[here](https://github.com/llvm/llvm-project/pull/111415/files#r1790670980) 
hoping you'd weigh in on. I made the change this way in TypePrinter because it 
was more convenient to insert the HLSL printing style that way, but I can 
maintain the previous behavior. The reason I thought that perhaps the alternate 
position of `*` might be correct or preferable is because it is the way that 
vectors are printed with an admittedly contrived and double erroneous 
[example](https://godbolt.org/z/Wjzzx7sov).

At any rate, we can defer the discussion of whether the vector printing should 
conform with the matrix printing or vice versa for later. For now, I'll 
implement the printing so that it maintains previous behavior.

 

https://github.com/llvm/llvm-project/pull/111415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[tor-commits] [Git][tpo/applications/mullvad-browser][mullvad-browser-128.3.0esr-14.0-1] Bug 1922204: fixup square spoofed orientation. r=tjr

2024-10-10 Thread morgan (@morgan) via tor-commits


morgan pushed to branch mullvad-browser-128.3.0esr-14.0-1 at The Tor Project / 
Applications / Mullvad Browser


Commits:
be3bc055 by Fatih at 2024-10-10T20:53:43+00:00
Bug 1922204: fixup square spoofed orientation. r=tjr

Differential Revision: https://phabricator.services.mozilla.com/D224312
- - - - -


1 changed file:

- toolkit/components/resistfingerprinting/nsRFPService.cpp


Changes:

=
toolkit/components/resistfingerprinting/nsRFPService.cpp
=
@@ -2287,10 +2287,12 @@ Maybe 
nsRFPService::GetOverriddenFingerprintingSettingsForURI(
 
 /* static */
 uint16_t nsRFPService::ViewportSizeToAngle(int32_t aWidth, int32_t aHeight) {
+  // Note that, if screen is square, we return portrait-primary.
+  // That's why we use > on non-android and >= on Android.
 #ifdef MOZ_WIDGET_ANDROID
   bool neutral = aHeight >= aWidth;
 #else
-  bool neutral = aWidth >= aHeight;
+  bool neutral = aWidth > aHeight;
 #endif
   if (neutral) {
 return 0;
@@ -2301,7 +2303,7 @@ uint16_t nsRFPService::ViewportSizeToAngle(int32_t 
aWidth, int32_t aHeight) {
 /* static */
 dom::OrientationType nsRFPService::ViewportSizeToOrientationType(
 int32_t aWidth, int32_t aHeight) {
-  if (aWidth >= aHeight) {
+  if (aWidth > aHeight) {
 return dom::OrientationType::Landscape_primary;
   }
   return dom::OrientationType::Portrait_primary;



View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/be3bc0554ba2d322e2d7d308e01e41ee264248dc

-- 
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/be3bc0554ba2d322e2d7d308e01e41ee264248dc
You're receiving this email because of your account on gitlab.torproject.org.


_______
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[clang] Add arrangeCXXMethodCall to the CodeGenABITypes interface. (PR #111597)

2024-10-10 Thread Hiroshi Yamauchi via cfe-commits


@@ -75,6 +75,12 @@ const CGFunctionInfo &arrangeCXXMethodType(CodeGenModule 
&CGM,
const FunctionProtoType *FTP,
const CXXMethodDecl *MD);
 
+const CGFunctionInfo &arrangeCXXMethodCall(CodeGenModule &CGM,
+   CanQualType returnType,
+   ArrayRef argTypes,
+   FunctionType::ExtInfo info,
+   RequiredArgs args);

hjyamauchi wrote:

@rjmccall Updated. Do you mean like the latest revision?

https://github.com/llvm/llvm-project/pull/111597
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[tor-commits] [Git][tpo/applications/tor-browser][base-browser-128.3.0esr-14.0-1] Bug 1922204: fixup square spoofed orientation. r=tjr

2024-10-10 Thread morgan (@morgan) via tor-commits


morgan pushed to branch base-browser-128.3.0esr-14.0-1 at The Tor Project / 
Applications / Tor Browser


Commits:
c3282afe by Fatih at 2024-10-10T20:52:43+00:00
Bug 1922204: fixup square spoofed orientation. r=tjr

Differential Revision: https://phabricator.services.mozilla.com/D224312
- - - - -


1 changed file:

- toolkit/components/resistfingerprinting/nsRFPService.cpp


Changes:

=
toolkit/components/resistfingerprinting/nsRFPService.cpp
=
@@ -2287,10 +2287,12 @@ Maybe 
nsRFPService::GetOverriddenFingerprintingSettingsForURI(
 
 /* static */
 uint16_t nsRFPService::ViewportSizeToAngle(int32_t aWidth, int32_t aHeight) {
+  // Note that, if screen is square, we return portrait-primary.
+  // That's why we use > on non-android and >= on Android.
 #ifdef MOZ_WIDGET_ANDROID
   bool neutral = aHeight >= aWidth;
 #else
-  bool neutral = aWidth >= aHeight;
+  bool neutral = aWidth > aHeight;
 #endif
   if (neutral) {
 return 0;
@@ -2301,7 +2303,7 @@ uint16_t nsRFPService::ViewportSizeToAngle(int32_t 
aWidth, int32_t aHeight) {
 /* static */
 dom::OrientationType nsRFPService::ViewportSizeToOrientationType(
 int32_t aWidth, int32_t aHeight) {
-  if (aWidth >= aHeight) {
+  if (aWidth > aHeight) {
 return dom::OrientationType::Landscape_primary;
   }
   return dom::OrientationType::Portrait_primary;



View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/c3282afe80a2df8dbfb0ec90b4d5027ef320f479

-- 
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/c3282afe80a2df8dbfb0ec90b4d5027ef320f479
You're receiving this email because of your account on gitlab.torproject.org.


_______
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[clang] Add arrangeCXXMethodCall to the CodeGenABITypes interface. (PR #111597)

2024-10-10 Thread Hiroshi Yamauchi via cfe-commits

https://github.com/hjyamauchi updated 
https://github.com/llvm/llvm-project/pull/111597

>From 1c7101f579c4eb65773d8af7bdd7a3b37247f554 Mon Sep 17 00:00:00 2001
From: Hiroshi Yamauchi 
Date: Thu, 10 Oct 2024 13:50:01 -0700
Subject: [PATCH] Add arrangeCXXMethodCall to the CodeGenABITypes interface.

Also add ExtParameterInfos to the argument list of
arrangeFreeFunctionCall.
---
 clang/include/clang/CodeGen/CodeGenABITypes.h | 24 ++
 clang/lib/CodeGen/CodeGenABITypes.cpp | 25 +--
 2 files changed, 37 insertions(+), 12 deletions(-)

diff --git a/clang/include/clang/CodeGen/CodeGenABITypes.h 
b/clang/include/clang/CodeGen/CodeGenABITypes.h
index 9cbc5a8a2a3f41..e275f5c944c707 100644
--- a/clang/include/clang/CodeGen/CodeGenABITypes.h
+++ b/clang/include/clang/CodeGen/CodeGenABITypes.h
@@ -75,11 +75,25 @@ const CGFunctionInfo &arrangeCXXMethodType(CodeGenModule 
&CGM,
const FunctionProtoType *FTP,
const CXXMethodDecl *MD);
 
-const CGFunctionInfo &arrangeFreeFunctionCall(CodeGenModule &CGM,
-  CanQualType returnType,
-  ArrayRef argTypes,
-  FunctionType::ExtInfo info,
-  RequiredArgs args);
+const CGFunctionInfo &arrangeCXXMethodCall(
+CodeGenModule &CGM, CanQualType returnType, ArrayRef argTypes,
+FunctionType::ExtInfo info,
+ArrayRef paramInfos,
+RequiredArgs args);
+
+const CGFunctionInfo &arrangeFreeFunctionCall(
+CodeGenModule &CGM, CanQualType returnType, ArrayRef argTypes,
+FunctionType::ExtInfo info,
+ArrayRef paramInfos,
+RequiredArgs args);
+
+// An overload with an empty `paramInfos`
+inline const CGFunctionInfo &arrangeFreeFunctionCall(
+CodeGenModule &CGM, CanQualType returnType, ArrayRef argTypes,
+FunctionType::ExtInfo info,
+RequiredArgs args) {
+  return arrangeFreeFunctionCall(CGM, returnType, argTypes, info, {}, args);
+}
 
 /// Returns the implicit arguments to add to a complete, non-delegating C++
 /// constructor call.
diff --git a/clang/lib/CodeGen/CodeGenABITypes.cpp 
b/clang/lib/CodeGen/CodeGenABITypes.cpp
index a6073e1188d6fa..b3c16288d3422a 100644
--- a/clang/lib/CodeGen/CodeGenABITypes.cpp
+++ b/clang/lib/CodeGen/CodeGenABITypes.cpp
@@ -60,13 +60,24 @@ CodeGen::arrangeCXXMethodType(CodeGenModule &CGM,
 }
 
 const CGFunctionInfo &
-CodeGen::arrangeFreeFunctionCall(CodeGenModule &CGM,
- CanQualType returnType,
- ArrayRef argTypes,
- FunctionType::ExtInfo info,
- RequiredArgs args) {
-  return CGM.getTypes().arrangeLLVMFunctionInfo(returnType, FnInfoOpts::None,
-argTypes, info, {}, args);
+CodeGen::arrangeCXXMethodCall(
+CodeGenModule &CGM, CanQualType returnType, ArrayRef argTypes,
+FunctionType::ExtInfo info,
+ArrayRef paramInfos,
+RequiredArgs args) {
+  return CGM.getTypes().arrangeLLVMFunctionInfo(
+  returnType, FnInfoOpts::IsInstanceMethod, argTypes, info, paramInfos,
+  args);
+}
+
+const CGFunctionInfo &
+CodeGen::arrangeFreeFunctionCall(
+CodeGenModule &CGM, CanQualType returnType, ArrayRef argTypes,
+FunctionType::ExtInfo info,
+ArrayRef paramInfos,
+RequiredArgs args) {
+  return CGM.getTypes().arrangeLLVMFunctionInfo(
+  returnType, FnInfoOpts::None, argTypes, info, paramInfos, args);
 }
 
 ImplicitCXXConstructorArgs

_______
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [-Wunsafe-buffer-usage] Emit a warning if pointer returned by vector::data and array::data is cast to larger type (PR #111910)

2024-10-10 Thread via cfe-commits
ed){}
+   span_duplicate(T *, unsigned){}
 
-  T array[10];
+   T array[10];
 
-  public:
+   public:
 
-  T* data() {
-return array;
-  }
+   T* data() {
+ return array;
+   }
 
-};
+ };
 }
 
 using namespace std;
@@ -89,21 +119,28 @@ void cast_without_data(int *ptr) {
  float *p = (float*) ptr;
 }
 
-void warned_patterns(std::span span_ptr, std::span base_span, 
span span_without_qual) {
-A *a1 = (A*)span_ptr.data(); // expected-warning{{unsafe invocation of 
span::data}}
-a1 = (A*)span_ptr.data(); // expected-warning{{unsafe invocation of 
span::data}}
+void warned_patterns_span(std::span span_ptr, std::span base_span, 
span span_without_qual) {
+A *a1 = (A*)span_ptr.data(); // expected-warning{{unsafe invocation of 
'data'}}
+a1 = (A*)span_ptr.data(); // expected-warning{{unsafe invocation of 
'data'}}
 
-a1 = (A*)(span_ptr.data()); // expected-warning{{unsafe invocation of 
span::data}}
-A *a2 = (A*) (span_without_qual.data()); // expected-warning{{unsafe 
invocation of span::data}}
+a1 = (A*)(span_ptr.data()); // expected-warning{{unsafe invocation of 
'data'}}
+A *a2 = (A*) (span_without_qual.data()); // expected-warning{{unsafe 
invocation of 'data'}}
 
-a2 = (A*) span_without_qual.data(); // expected-warning{{unsafe invocation 
of span::data}}
+a2 = (A*) span_without_qual.data(); // expected-warning{{unsafe invocation 
of 'data'}}
 
  // TODO:: Should we warn when we cast from base to derived type?
- Derived *b = dynamic_cast (base_span.data());// 
expected-warning{{unsafe invocation of span::data}}
+ Derived *b = dynamic_cast (base_span.data());// 
expected-warning{{unsafe invocation of 'data'}}
 
 // TODO:: This pattern is safe. We can add special handling for it, if we 
decide this
 // is the recommended fixit for the unsafe invocations.
-A *a3 = (A*)span_ptr.subspan(0, sizeof(A)).data(); // 
expected-warning{{unsafe invocation of span::data}}
+A *a3 = (A*)span_ptr.subspan(0, sizeof(A)).data(); // 
expected-warning{{unsafe invocation of 'data'}}
+}
+
+void warned_patterns_array(std::array array_ptr, std::array 
base_span, span span_without_qual) {
+const A *a1 = (A*)array_ptr.data(); // expected-warning{{unsafe invocation 
of 'data'}}
+a1 = (A*)array_ptr.data(); // expected-warning{{unsafe invocation of 
'data'}}
+
+a1 = (A*)(array_ptr.data()); // expected-warning{{unsafe invocation of 
'data'}}
 }
 
 void not_warned_patterns(std::span span_ptr, std::span base_span) {

``




https://github.com/llvm/llvm-project/pull/111910
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [-Wunsafe-buffer-usage] Emit a warning if pointer returned by vector::data and array::data is cast to larger type (PR #111910)

2024-10-10 Thread Malavika Samak via cfe-commits
ements = new T[n];
+   }
+
+   constexpr T* data() const noexcept {
+  return elements;
+   }
+
+   ~vector() {
+ delete[] elements;
+   }
+ };
+
+ template 
+ class array {
+   T elements[N];
+
+   public:
+
+   constexpr const T* data() const noexcept {
+  return elements;
+   }
+
+ };
 
- 
-  constexpr T* hello() const noexcept {
-   return elements;
-  }
-};
- 
  template  class span_duplicate {
-  span_duplicate(T *, unsigned){}
+   span_duplicate(T *, unsigned){}
 
-  T array[10];
+   T array[10];
 
-  public:
+   public:
 
-  T* data() {
-return array;
-  }
+   T* data() {
+ return array;
+   }
 
-};
+ };
 }
 
 using namespace std;
@@ -89,21 +119,28 @@ void cast_without_data(int *ptr) {
  float *p = (float*) ptr;
 }
 
-void warned_patterns(std::span span_ptr, std::span base_span, 
span span_without_qual) {
-A *a1 = (A*)span_ptr.data(); // expected-warning{{unsafe invocation of 
span::data}}
-a1 = (A*)span_ptr.data(); // expected-warning{{unsafe invocation of 
span::data}}
+void warned_patterns_span(std::span span_ptr, std::span base_span, 
span span_without_qual) {
+A *a1 = (A*)span_ptr.data(); // expected-warning{{unsafe invocation of 
'data'}}
+a1 = (A*)span_ptr.data(); // expected-warning{{unsafe invocation of 
'data'}}
 
-a1 = (A*)(span_ptr.data()); // expected-warning{{unsafe invocation of 
span::data}}
-A *a2 = (A*) (span_without_qual.data()); // expected-warning{{unsafe 
invocation of span::data}}
+a1 = (A*)(span_ptr.data()); // expected-warning{{unsafe invocation of 
'data'}}
+A *a2 = (A*) (span_without_qual.data()); // expected-warning{{unsafe 
invocation of 'data'}}
 
-a2 = (A*) span_without_qual.data(); // expected-warning{{unsafe invocation 
of span::data}}
+a2 = (A*) span_without_qual.data(); // expected-warning{{unsafe invocation 
of 'data'}}
 
  // TODO:: Should we warn when we cast from base to derived type?
- Derived *b = dynamic_cast (base_span.data());// 
expected-warning{{unsafe invocation of span::data}}
+ Derived *b = dynamic_cast (base_span.data());// 
expected-warning{{unsafe invocation of 'data'}}
 
 // TODO:: This pattern is safe. We can add special handling for it, if we 
decide this
 // is the recommended fixit for the unsafe invocations.
-A *a3 = (A*)span_ptr.subspan(0, sizeof(A)).data(); // 
expected-warning{{unsafe invocation of span::data}}
+A *a3 = (A*)span_ptr.subspan(0, sizeof(A)).data(); // 
expected-warning{{unsafe invocation of 'data'}}
+}
+
+void warned_patterns_array(std::array array_ptr, std::array 
base_span, span span_without_qual) {
+const A *a1 = (A*)array_ptr.data(); // expected-warning{{unsafe invocation 
of 'data'}}
+a1 = (A*)array_ptr.data(); // expected-warning{{unsafe invocation of 
'data'}}
+
+a1 = (A*)(array_ptr.data()); // expected-warning{{unsafe invocation of 
'data'}}
 }
 
 void not_warned_patterns(std::span span_ptr, std::span base_span) {

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[jenkinsci/mailer-plugin]

2024-10-10 Thread 'github-merge-queue[bot]' via Jenkins Commits
  Branch: 
refs/heads/gh-readonly-queue/master/pr-318-0c9639c1aeb3be6b01137ab3ed2393c3d36f95fe
  Home:   https://github.com/jenkinsci/mailer-plugin

To unsubscribe from these emails, change your notification settings at 
https://github.com/jenkinsci/mailer-plugin/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-commits/jenkinsci/mailer-plugin/push/refs/heads/gh-readonly-queue/master/pr-318-0c9639c1aeb3be6b01137ab3ed2393c3d36f95fe/d4b251-00%40github.com.


[jenkinsci/mailer-plugin] d4b251: Require Java 17 or newer; migrate to EE 9 (#318)

2024-10-10 Thread 'Basil Crow' via Jenkins Commits
  Branch: refs/heads/master
  Home:   https://github.com/jenkinsci/mailer-plugin
  Commit: d4b25144138f8ed3ea3763d7bbe4688d061dcadf
  
https://github.com/jenkinsci/mailer-plugin/commit/d4b25144138f8ed3ea3763d7bbe4688d061dcadf
  Author: Basil Crow 
  Date:   2024-10-10 (Thu, 10 Oct 2024)

  Changed paths:
M Jenkinsfile
M pom.xml
M src/main/java/hudson/tasks/Mailer.java

  Log Message:
  ---
  Require Java 17 or newer; migrate to EE 9 (#318)



To unsubscribe from these emails, change your notification settings at 
https://github.com/jenkinsci/mailer-plugin/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-commits/jenkinsci/mailer-plugin/push/refs/heads/master/0c9639-d4b251%40github.com.


[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-128.3.0esr-14.0-1] Bug 1922204: fixup square spoofed orientation. r=tjr

2024-10-10 Thread morgan (@morgan) via tor-commits


morgan pushed to branch tor-browser-128.3.0esr-14.0-1 at The Tor Project / 
Applications / Tor Browser


Commits:
61c5f500 by Fatih at 2024-10-10T09:43:32+02:00
Bug 1922204: fixup square spoofed orientation. r=tjr

Differential Revision: https://phabricator.services.mozilla.com/D224312
- - - - -


1 changed file:

- toolkit/components/resistfingerprinting/nsRFPService.cpp


Changes:

=
toolkit/components/resistfingerprinting/nsRFPService.cpp
=
@@ -2287,10 +2287,12 @@ Maybe 
nsRFPService::GetOverriddenFingerprintingSettingsForURI(
 
 /* static */
 uint16_t nsRFPService::ViewportSizeToAngle(int32_t aWidth, int32_t aHeight) {
+  // Note that, if screen is square, we return portrait-primary.
+  // That's why we use > on non-android and >= on Android.
 #ifdef MOZ_WIDGET_ANDROID
   bool neutral = aHeight >= aWidth;
 #else
-  bool neutral = aWidth >= aHeight;
+  bool neutral = aWidth > aHeight;
 #endif
   if (neutral) {
 return 0;
@@ -2301,7 +2303,7 @@ uint16_t nsRFPService::ViewportSizeToAngle(int32_t 
aWidth, int32_t aHeight) {
 /* static */
 dom::OrientationType nsRFPService::ViewportSizeToOrientationType(
 int32_t aWidth, int32_t aHeight) {
-  if (aWidth >= aHeight) {
+  if (aWidth > aHeight) {
 return dom::OrientationType::Landscape_primary;
   }
   return dom::OrientationType::Portrait_primary;



View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/61c5f5000b9eaf0bc46c71290c466562b8c5a8f4

-- 
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/61c5f5000b9eaf0bc46c71290c466562b8c5a8f4
You're receiving this email because of your account on gitlab.torproject.org.


_______
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[jenkinsci/mailer-plugin] d4b251: Require Java 17 or newer; migrate to EE 9 (#318)

2024-10-10 Thread 'Basil Crow' via Jenkins Commits
  Branch: 
refs/heads/gh-readonly-queue/master/pr-318-0c9639c1aeb3be6b01137ab3ed2393c3d36f95fe
  Home:   https://github.com/jenkinsci/mailer-plugin
  Commit: d4b25144138f8ed3ea3763d7bbe4688d061dcadf
  
https://github.com/jenkinsci/mailer-plugin/commit/d4b25144138f8ed3ea3763d7bbe4688d061dcadf
  Author: Basil Crow 
  Date:   2024-10-10 (Thu, 10 Oct 2024)

  Changed paths:
M Jenkinsfile
M pom.xml
M src/main/java/hudson/tasks/Mailer.java

  Log Message:
  ---
  Require Java 17 or newer; migrate to EE 9 (#318)



To unsubscribe from these emails, change your notification settings at 
https://github.com/jenkinsci/mailer-plugin/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-commits/jenkinsci/mailer-plugin/push/refs/heads/gh-readonly-queue/master/pr-318-0c9639c1aeb3be6b01137ab3ed2393c3d36f95fe/00-d4b251%40github.com.


[jenkinsci/credentials-binding-plugin] a2c173: Require Java 17 or newer; migrate to EE 9

2024-10-10 Thread 'Jesse Glick' via Jenkins Commits
  Branch: refs/heads/master
  Home:   https://github.com/jenkinsci/credentials-binding-plugin
  Commit: a2c173bcf991fe4576469eadb481823cef795d59
  
https://github.com/jenkinsci/credentials-binding-plugin/commit/a2c173bcf991fe4576469eadb481823cef795d59
  Author: Basil Crow 
  Date:   2024-10-08 (Tue, 08 Oct 2024)

  Changed paths:
M pom.xml
M 
src/main/java/org/jenkinsci/plugins/credentialsbinding/impl/ZipFileBinding.java
M 
src/test/java/org/jenkinsci/plugins/credentialsbinding/impl/BuildWrapperOrderCredentialsBindingTest.java
M 
src/test/java/org/jenkinsci/plugins/credentialsbinding/masking/AlmquistShellSecretPatternFactoryTest.java
M 
src/test/java/org/jenkinsci/plugins/credentialsbinding/masking/BashSecretPatternFactoryTest.java
M 
src/test/java/org/jenkinsci/plugins/credentialsbinding/masking/BourneShellSecretPatternFactoryTest.java
M 
src/test/java/org/jenkinsci/plugins/credentialsbinding/test/CredentialsTestUtil.java

  Log Message:
  ---
  Require Java 17 or newer; migrate to EE 9


  Commit: 619cb15e923f30fce17888f0533091ac9e30e922
  
https://github.com/jenkinsci/credentials-binding-plugin/commit/619cb15e923f30fce17888f0533091ac9e30e922
  Author: Jesse Glick 
  Date:   2024-10-10 (Thu, 10 Oct 2024)

  Changed paths:
M pom.xml
M 
src/main/java/org/jenkinsci/plugins/credentialsbinding/impl/ZipFileBinding.java
M 
src/test/java/org/jenkinsci/plugins/credentialsbinding/impl/BuildWrapperOrderCredentialsBindingTest.java
M 
src/test/java/org/jenkinsci/plugins/credentialsbinding/masking/AlmquistShellSecretPatternFactoryTest.java
M 
src/test/java/org/jenkinsci/plugins/credentialsbinding/masking/BashSecretPatternFactoryTest.java
M 
src/test/java/org/jenkinsci/plugins/credentialsbinding/masking/BourneShellSecretPatternFactoryTest.java
M 
src/test/java/org/jenkinsci/plugins/credentialsbinding/test/CredentialsTestUtil.java

  Log Message:
  ---
  Merge pull request #318 from basil/jakarta

Require Java 17 or newer; migrate to EE 9


Compare: 
https://github.com/jenkinsci/credentials-binding-plugin/compare/d8886e0492c2...619cb15e923f

To unsubscribe from these emails, change your notification settings at 
https://github.com/jenkinsci/credentials-binding-plugin/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-commits/jenkinsci/credentials-binding-plugin/push/refs/heads/master/d8886e-619cb1%40github.com.


[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-10-10 Thread Shilei Tian via cfe-commits

https://github.com/shiltian edited 
https://github.com/llvm/llvm-project/pull/94647
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-10-10 Thread Shilei Tian via cfe-commits


@@ -439,6 +439,26 @@ struct AAAMDAttributesFunction : public AAAMDAttributes {
   indicatePessimisticFixpoint();
   return;
 }
+
+SmallPtrSet VisitedConsts;
+
+for (Instruction &I : instructions(F)) {

shiltian wrote:

I don't think it is generally a good idea to put this logic into `initialize` 
unless it can directly changes the status of the AA.

https://github.com/llvm/llvm-project/pull/94647
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-10 Thread via cfe-commits
AtMost(TheCall, 0))
+  return true;
+break;
+  }
   }
   return false;
 }
diff --git 
a/clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync-errors.hlsl 
b/clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync-errors.hlsl
new file mode 100644
index 00..82f36758d8f9ec
--- /dev/null
+++ 
b/clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync-errors.hlsl
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -finclude-default-header -triple 
dxil-pc-shadermodel6.6-library %s -emit-llvm-only -disable-llvm-passes -verify 
-verify-ignore-unexpected
+
+void test_too_many_arg() {
+  __builtin_hlsl_group_memory_barrier_with_group_sync(0);
+  // expected-error@-1 {{too many arguments to function call, expected at most 
0, have 1}}
+}
diff --git 
a/clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync.hlsl 
b/clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync.hlsl
new file mode 100644
index 00..145cb21f775b08
--- /dev/null
+++ b/clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync.hlsl
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN:   dxil-pc-shadermodel6.0-library %s \
+// RUN:   -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN:   -DTARGET=dx -DFNATTRS=noundef -check-prefixes=CHECK,CHECK-DXIL
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN:   spirv-unknown-vulkan-compute %s \
+// RUN:   -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN:   -DTARGET=spv -DFNATTRS="spir_func noundef" 
-check-prefixes=CHECK,CHECK-SPIRV
+
+// CHECK-DXIL: define void @
+// CHECK-SPIRV: define spir_func void @
+void test_GroupMemoryBarrierWithGroupSync() {
+// CHECK: call void @llvm.[[TARGET]].group.memory.barrier.with.group.sync()
+  GroupMemoryBarrierWithGroupSync();
+}
+
+// CHECK: declare void @llvm.[[TARGET]].group.memory.barrier.with.group.sync() 
#[[ATTRS:[0-9]+]]
+// CHECK-NOT: attributes #[[ATTRS]] = {{.+}}memory(none){{.+}}
+// CHECK: attributes #[[ATTRS]] = {

``




https://github.com/llvm/llvm-project/pull/111883
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-10 Thread via cfe-commits
kArgCountAtMost(TheCall, 0))
+  return true;
+break;
+  }
   }
   return false;
 }
diff --git 
a/clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync-errors.hlsl 
b/clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync-errors.hlsl
new file mode 100644
index 00..82f36758d8f9ec
--- /dev/null
+++ 
b/clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync-errors.hlsl
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -finclude-default-header -triple 
dxil-pc-shadermodel6.6-library %s -emit-llvm-only -disable-llvm-passes -verify 
-verify-ignore-unexpected
+
+void test_too_many_arg() {
+  __builtin_hlsl_group_memory_barrier_with_group_sync(0);
+  // expected-error@-1 {{too many arguments to function call, expected at most 
0, have 1}}
+}
diff --git 
a/clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync.hlsl 
b/clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync.hlsl
new file mode 100644
index 00..145cb21f775b08
--- /dev/null
+++ b/clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync.hlsl
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN:   dxil-pc-shadermodel6.0-library %s \
+// RUN:   -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN:   -DTARGET=dx -DFNATTRS=noundef -check-prefixes=CHECK,CHECK-DXIL
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN:   spirv-unknown-vulkan-compute %s \
+// RUN:   -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN:   -DTARGET=spv -DFNATTRS="spir_func noundef" 
-check-prefixes=CHECK,CHECK-SPIRV
+
+// CHECK-DXIL: define void @
+// CHECK-SPIRV: define spir_func void @
+void test_GroupMemoryBarrierWithGroupSync() {
+// CHECK: call void @llvm.[[TARGET]].group.memory.barrier.with.group.sync()
+  GroupMemoryBarrierWithGroupSync();
+}
+
+// CHECK: declare void @llvm.[[TARGET]].group.memory.barrier.with.group.sync() 
#[[ATTRS:[0-9]+]]
+// CHECK-NOT: attributes #[[ATTRS]] = {{.+}}memory(none){{.+}}
+// CHECK: attributes #[[ATTRS]] = {

``




https://github.com/llvm/llvm-project/pull/111883
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-10 Thread Adam Yang via cfe-commits

https://github.com/adam-yang ready_for_review 
https://github.com/llvm/llvm-project/pull/111883
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [libcxx] [clang & libcxx] constexpr pointer tagging (DO NOT MERGE) (PR #111861)

2024-10-10 Thread Hana Dusíková via cfe-commits
ule raw_storage_iterator   { header 
"__memory/raw_storage_iterator.h" }
 module shared_ptr { header "__memory/shared_ptr.h" 
}
 module swap_allocator { header 
"__memory/swap_allocator.h" }
+module tagged_ptr { header "__memory/tagged_ptr.h" 
}
 module temp_value { header "__memory/temp_value.h" 
}
 module temporary_buffer   {
   header "__memory/temporary_buffer.h"

From c7b2a6df38d8edabfa631166df91273853116b2d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= 
Date: Thu, 10 Oct 2024 22:15:08 +0200
Subject: [PATCH 2/2] add fallback to reinterpret_cast when builtins are not
 available

---
 libcxx/include/__memory/tagged_ptr.h | 24 
 1 file changed, 24 insertions(+)

diff --git a/libcxx/include/__memory/tagged_ptr.h 
b/libcxx/include/__memory/tagged_ptr.h
index 7c99d0e9299f48..b26ef45b3e19a8 100644
--- a/libcxx/include/__memory/tagged_ptr.h
+++ b/libcxx/include/__memory/tagged_ptr.h
@@ -68,13 +68,25 @@ template  struct bitmask_tag {
 using tag_type = Tag;
 
 [[clang::always_inline]] static constexpr dirty_pointer 
encode_pointer_with_tag(clean_pointer _ptr, tag_type _value) noexcept {
+#if __has_builtin(__builtin_tag_pointer_mask_or)
   return static_cast(__builtin_tag_pointer_mask_or((void 
*)(_ptr), static_cast(_value), _mask));
+#else
+  return 
reinterpret_cast((reinterpret_cast(_ptr) & 
static_cast(_mask)) | (static_cast(_value) & 
~static_cast(_mask)));
+#endif
 }
 [[clang::always_inline]] static constexpr clean_pointer 
recover_pointer(dirty_pointer _ptr) noexcept {
+#if __has_builtin(__builtin_tag_pointer_mask)
   return static_cast(__builtin_tag_pointer_mask((void 
*)_ptr, ~_mask));
+#else
+  return reinterpret_cast(reinterpret_cast(_ptr) 
& ~static_cast(_mask));
+#endif
 }
 [[clang::always_inline]] static constexpr tag_type 
recover_value(dirty_pointer _ptr) noexcept {
+#if __has_builtin(__builtin_tag_pointer_mask_as_int)
   return static_cast(__builtin_tag_pointer_mask_as_int((void 
*)_ptr, _mask));
+#else
+  return static_cast(reinterpret_cast(_ptr) & 
static_cast(_mask));
+#endif
 }
   };
 };
@@ -99,13 +111,25 @@ template  struct shift_tag {
 using tag_type = Tag;
 
 [[clang::always_inline]] static constexpr dirty_pointer 
encode_pointer_with_tag(clean_pointer _ptr, tag_type _value) noexcept {
+#if __has_builtin(__builtin_tag_pointer_shift_or)
   return static_cast(__builtin_tag_pointer_shift_or((void 
*)(_ptr), (uintptr_t)_value, _shift));
+#else
+  return 
reinterpret_cast((reinterpret_cast(_ptr) << _shift) | 
(static_cast(_value) & ((1ull << static_cast(_shift)) - 
1ull)));
+#endif
 }
 [[clang::always_inline]] static constexpr clean_pointer 
recover_pointer(dirty_pointer _ptr) noexcept {
+#if __has_builtin(__builtin_tag_pointer_unshift)
   return static_cast(__builtin_tag_pointer_unshift((void 
*)_ptr, _shift));
+#else
+  return reinterpret_cast(reinterpret_cast(_ptr) 
>> _shift);
+#endif
 }
 [[clang::always_inline]] static constexpr tag_type 
recover_value(dirty_pointer _ptr) noexcept {
+#if __has_builtin(__builtin_tag_pointer_mask_as_int)
   return static_cast(__builtin_tag_pointer_mask_as_int((void 
*)_ptr, _mask));
+#else
+  return static_cast(reinterpret_cast(_ptr) & 
static_cast(_mask));
+#endif  
 }
   };
 };

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[Lldb-commits] [lldb] [lldb] Add include for SBLanguages in lldb-enumerations (PR #111907)

2024-10-10 Thread Chelsea Cassanova via lldb-commits

https://github.com/chelcassanova closed 
https://github.com/llvm/llvm-project/pull/111907
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] b355426 - [lldb] Add include for SBLanguages in lldb-enumerations (#111907)

2024-10-10 Thread via lldb-commits

Author: Chelsea Cassanova
Date: 2024-10-10T13:11:46-07:00
New Revision: b3554265f24aa570bbc8693af8420a306c459f94

URL: 
https://github.com/llvm/llvm-project/commit/b3554265f24aa570bbc8693af8420a306c459f94
DIFF: 
https://github.com/llvm/llvm-project/commit/b3554265f24aa570bbc8693af8420a306c459f94.diff

LOG: [lldb] Add include for SBLanguages in lldb-enumerations (#111907)

This adds an include for SBLanguages.h in lldb-enumerations.h so that
files that need this enum do not have to explicitly include SBLanguages.

Added: 


Modified: 
lldb/include/lldb/lldb-enumerations.h

Removed: 




diff  --git a/lldb/include/lldb/lldb-enumerations.h 
b/lldb/include/lldb/lldb-enumerations.h
index 232d1dfdb5c9d0..217cd7f65cc1c4 100644
--- a/lldb/include/lldb/lldb-enumerations.h
+++ b/lldb/include/lldb/lldb-enumerations.h
@@ -12,6 +12,8 @@
 #include 
 #include 
 
+#include 
+
 #ifndef SWIG
 // Macro to enable bitmask operations on an enum.  Without this, Enum | Enum
 // gets promoted to an int, so you have to say Enum a = Enum(eFoo | eBar).  If



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[llvm-branch-commits] [sanitizer] VReport thread status for failed PTRACE_ATTACH (PR #111901)

2024-10-10 Thread Vitaly Buka via llvm-branch-commits

https://github.com/vitalybuka updated 
https://github.com/llvm/llvm-project/pull/111901


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [sanitizer] VReport thread status for failed PTRACE_ATTACH (PR #111901)

2024-10-10 Thread Vitaly Buka via llvm-branch-commits

https://github.com/vitalybuka updated 
https://github.com/llvm/llvm-project/pull/111901


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [sanitizer] VReport BeforeFork/AfterFork (PR #111900)

2024-10-10 Thread Vitaly Buka via llvm-branch-commits

https://github.com/vitalybuka updated 
https://github.com/llvm/llvm-project/pull/111900


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [sanitizer] VReport BeforeFork/AfterFork (PR #111900)

2024-10-10 Thread Vitaly Buka via llvm-branch-commits

https://github.com/vitalybuka updated 
https://github.com/llvm/llvm-project/pull/111900


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[Lldb-commits] [lldb] [lldb] Return an llvm::Error from GetFrameBaseValue (PR #111882)

2024-10-10 Thread Jonas Devlieghere via lldb-commits

https://github.com/JDevlieghere closed 
https://github.com/llvm/llvm-project/pull/111882
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 69b0b7e - [lldb] Return an llvm::Error from GetFrameBaseValue (#111882)

2024-10-10 Thread via lldb-commits

Author: Jonas Devlieghere
Date: 2024-10-10T13:11:08-07:00
New Revision: 69b0b7e7ac3adc42df517c25ed7017b5af9be9f1

URL: 
https://github.com/llvm/llvm-project/commit/69b0b7e7ac3adc42df517c25ed7017b5af9be9f1
DIFF: 
https://github.com/llvm/llvm-project/commit/69b0b7e7ac3adc42df517c25ed7017b5af9be9f1.diff

LOG: [lldb] Return an llvm::Error from GetFrameBaseValue (#111882)

This fixes the following assertion: "Cannot create Expected from
Error success value." The problem was that GetFrameBaseValue return
false without updating the Status argument. This patch eliminates the 
opportunity for mistakes by returning an llvm:Error.

Added: 


Modified: 
lldb/include/lldb/Target/StackFrame.h
lldb/source/Expression/DWARFExpression.cpp
lldb/source/Target/StackFrame.cpp

Removed: 




diff  --git a/lldb/include/lldb/Target/StackFrame.h 
b/lldb/include/lldb/Target/StackFrame.h
index 5cc0fccee03b8f..fdbe1f567eabfa 100644
--- a/lldb/include/lldb/Target/StackFrame.h
+++ b/lldb/include/lldb/Target/StackFrame.h
@@ -195,14 +195,10 @@ class StackFrame : public ExecutionContextScope,
   /// \param [out] value
   ///   The address of the CFA for this frame, if available.
   ///
-  /// \param [out] error_ptr
-  ///   If there is an error determining the CFA address, this may contain a
-  ///   string explaining the failure.
-  ///
   /// \return
-  ///   Returns true if the CFA value was successfully set in value.  Some
-  ///   frames may be unable to provide this value; they will return false.
-  bool GetFrameBaseValue(Scalar &value, Status *error_ptr);
+  ///   If there is an error determining the CFA address, return an error
+  ///   explaining the failure. Success otherwise.
+  llvm::Error GetFrameBaseValue(Scalar &value);
 
   /// Get the DWARFExpressionList corresponding to the Canonical Frame Address.
   ///

diff  --git a/lldb/source/Expression/DWARFExpression.cpp 
b/lldb/source/Expression/DWARFExpression.cpp
index 22d899f799d0fd..97bcd4f7eec26f 100644
--- a/lldb/source/Expression/DWARFExpression.cpp
+++ b/lldb/source/Expression/DWARFExpression.cpp
@@ -1780,14 +1780,12 @@ llvm::Expected DWARFExpression::Evaluate(
   if (exe_ctx) {
 if (frame) {
   Scalar value;
-  Status fb_err;
-  if (frame->GetFrameBaseValue(value, &fb_err)) {
-int64_t fbreg_offset = opcodes.GetSLEB128(&offset);
-value += fbreg_offset;
-stack.push_back(value);
-stack.back().SetValueType(Value::ValueType::LoadAddress);
-  } else
-return fb_err.ToError();
+  if (llvm::Error err = frame->GetFrameBaseValue(value))
+return err;
+  int64_t fbreg_offset = opcodes.GetSLEB128(&offset);
+  value += fbreg_offset;
+  stack.push_back(value);
+  stack.back().SetValueType(Value::ValueType::LoadAddress);
 } else {
   return llvm::createStringError(
   "invalid stack frame in context for DW_OP_fbreg opcode");

diff  --git a/lldb/source/Target/StackFrame.cpp 
b/lldb/source/Target/StackFrame.cpp
index fe0d4c93c50627..ed493e35316137 100644
--- a/lldb/source/Target/StackFrame.cpp
+++ b/lldb/source/Target/StackFrame.cpp
@@ -1079,12 +1079,12 @@ ValueObjectSP 
StackFrame::GetValueForVariableExpressionPath(
   return valobj_sp;
 }
 
-bool StackFrame::GetFrameBaseValue(Scalar &frame_base, Status *error_ptr) {
+llvm::Error StackFrame::GetFrameBaseValue(Scalar &frame_base) {
   std::lock_guard guard(m_mutex);
   if (!m_cfa_is_valid) {
 m_frame_base_error = Status::FromErrorString(
 "No frame base available for this historical stack frame.");
-return false;
+return m_frame_base_error.ToError();
   }
 
   if (m_flags.IsClear(GOT_FRAME_BASE)) {
@@ -1113,12 +1113,11 @@ bool StackFrame::GetFrameBaseValue(Scalar &frame_base, 
Status *error_ptr) {
 }
   }
 
-  if (m_frame_base_error.Success())
-frame_base = m_frame_base;
+  if (m_frame_base_error.Fail())
+return m_frame_base_error.ToError();
 
-  if (error_ptr)
-*error_ptr = m_frame_base_error.Clone();
-  return m_frame_base_error.Success();
+  frame_base = m_frame_base;
+  return llvm::Error::success();
 }
 
 DWARFExpressionList *StackFrame::GetFrameBaseExpression(Status *error_ptr) {


    
_______
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Add include for SBLanguages in lldb-enumerations (PR #111907)

2024-10-10 Thread Chelsea Cassanova via lldb-commits

https://github.com/chelcassanova updated 
https://github.com/llvm/llvm-project/pull/111907

>From e4393924a46dc62f2edfae5675b48002042f2032 Mon Sep 17 00:00:00 2001
From: Chelsea Cassanova 
Date: Thu, 10 Oct 2024 12:58:06 -0700
Subject: [PATCH] [lldb] Add include for SBLanguages in lldb-enumerations

This adds an include for SBLanguages.h in lldb-enumerations.h so that
files that need this enum do not have to explicitly include SBLanguages.
---
 lldb/include/lldb/lldb-enumerations.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lldb/include/lldb/lldb-enumerations.h 
b/lldb/include/lldb/lldb-enumerations.h
index 938f6e3abe8f2a..4a7ae7b1ed7d73 100644
--- a/lldb/include/lldb/lldb-enumerations.h
+++ b/lldb/include/lldb/lldb-enumerations.h
@@ -12,6 +12,8 @@
 #include 
 #include 
 
+#include 
+
 #ifndef SWIG
 // Macro to enable bitmask operations on an enum.  Without this, Enum | Enum
 // gets promoted to an int, so you have to say Enum a = Enum(eFoo | eBar).  If

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[clang] [ItaniumCXXABI] Mark RTTI type name as global unnamed_addr (PR #111343)

2024-10-10 Thread Richard Smith via cfe-commits

zygoloid wrote:

@luxufan I think we may need changes on the LLVM side before we can make 
progress here -- either to clarify what `unnamed_addr` is intended to mean, or 
perhaps to split it into separate attributes for cloning and merging.

But before we go down that path, this PR doesn't describe the motivation for 
this change, so it'd be useful to get an idea of how much of a difference you 
expect this to make. Are you seeing a lot of duplicated symbols containing type 
manglings?

https://github.com/llvm/llvm-project/pull/111343
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[Lldb-commits] [lldb] [lldb] Add include for SBLanguages in lldb-enumerations (PR #111907)

2024-10-10 Thread Chelsea Cassanova via lldb-commits

https://github.com/chelcassanova updated 
https://github.com/llvm/llvm-project/pull/111907

>From c179c081ff76ce53a0c13265b1e68eb682699415 Mon Sep 17 00:00:00 2001
From: Chelsea Cassanova 
Date: Thu, 10 Oct 2024 12:58:06 -0700
Subject: [PATCH] [lldb] Add include for SBLanguages in lldb-enumerations

This adds an include for SBLanguages.h in lldb-enumerations.h so that
files that need this enum do not have to explicitly include SBLanguages.
---
 lldb/include/lldb/lldb-enumerations.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lldb/include/lldb/lldb-enumerations.h 
b/lldb/include/lldb/lldb-enumerations.h
index 938f6e3abe8f2a..df3aadcb0689c6 100644
--- a/lldb/include/lldb/lldb-enumerations.h
+++ b/lldb/include/lldb/lldb-enumerations.h
@@ -11,6 +11,7 @@
 
 #include 
 #include 
+#include 
 
 #ifndef SWIG
 // Macro to enable bitmask operations on an enum.  Without this, Enum | Enum

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Add include for SBLanguages in lldb-enumerations (PR #111907)

2024-10-10 Thread Med Ismail Bennani via lldb-commits

https://github.com/medismailben approved this pull request.

LGTM with format fix

https://github.com/llvm/llvm-project/pull/111907
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Add include for SBLanguages in lldb-enumerations (PR #111907)

2024-10-10 Thread via lldb-commits

github-actions[bot] wrote:




:warning: C/C++ code formatter, clang-format found issues in your code. 
:warning:



You can test this locally with the following command:


``bash
git-clang-format --diff a4916d200518ac077be93995af18bd80fcb89cc2 
133ace4b281abf205d35bbb6ed6ef7b2a39a8c2a --extensions h -- 
lldb/include/lldb/lldb-enumerations.h
``





View the diff from clang-format here.


``diff
diff --git a/lldb/include/lldb/lldb-enumerations.h 
b/lldb/include/lldb/lldb-enumerations.h
index df3aadcb06..049000c774 100644
--- a/lldb/include/lldb/lldb-enumerations.h
+++ b/lldb/include/lldb/lldb-enumerations.h
@@ -10,8 +10,8 @@
 #define LLDB_LLDB_ENUMERATIONS_H
 
 #include 
-#include 
 #include 
+#include 
 
 #ifndef SWIG
 // Macro to enable bitmask operations on an enum.  Without this, Enum | Enum

``




https://github.com/llvm/llvm-project/pull/111907
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [LLDB][SBSaveCore] Add Extension to Save a thread and N pointers deep (PR #111601)

2024-10-10 Thread Jacob Lalonde via lldb-commits
d..5ecd0bc61df0e4 100644
--- 
a/lldb/test/API/functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump.py
+++ 
b/lldb/test/API/functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump.py
@@ -489,7 +489,7 @@ def test_save_core_one_thread_one_heap(self):
 options.SetPluginName("minidump")
 options.SetStyle(lldb.eSaveCoreCustomOnly)
 thread = process.GetThreadAtIndex(0)
-options.save_thread_with_heaps(thread)
+options.save_thread_with_heaps(thread, 1)
 
 error = process.SaveCore(options)
 self.assertTrue(error.Success())
@@ -498,6 +498,24 @@ def test_save_core_one_thread_one_heap(self):
 # proc/pid maps prevent us from checking the number of regions, but
 # this is mostly a smoke test for the extension.
 self.assertEqual(core_proc.GetNumThreads(), 1)
+addr = (
+process.GetThreadAtIndex(0)
+.GetFrameAtIndex(0)
+.FindVariable("str")
+.Dereference()
+.GetAddress()
+.GetOffset()
+)
+core_addr = (
+core_proc.GetThreadAtIndex(0)
+.GetFrameAtIndex(0)
+.FindVariable("str")
+.Dereference()
+.GetAddress()
+.GetOffset()
+)
+self.assertEqual(addr, core_addr)
+
 finally:
 if os.path.isfile(custom_file):
     os.unlink(custom_file)
diff --git a/lldb/test/API/functionalities/process_save_core_minidump/main.cpp 
b/lldb/test/API/functionalities/process_save_core_minidump/main.cpp
index fa34a371f20647..2c9b64349cc8bc 100644
--- a/lldb/test/API/functionalities/process_save_core_minidump/main.cpp
+++ b/lldb/test/API/functionalities/process_save_core_minidump/main.cpp
@@ -18,7 +18,7 @@ size_t h() {
 
 int main() {
   std::thread t1(f);
-
+  char *str = new char[10];
   size_t x = h();
 
   t1.join();

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-10 Thread via cfe-commits

github-actions[bot] wrote:




:warning: C/C++ code formatter, clang-format found issues in your code. 
:warning:



You can test this locally with the following command:


``bash
git-clang-format --diff a4916d200518ac077be93995af18bd80fcb89cc2 
49edfec7f8d2fb84144ef903bc5db3ab2099a1ae --extensions h,cpp -- 
clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/CGHLSLRuntime.h 
clang/lib/Headers/hlsl/hlsl_intrinsics.h clang/lib/Sema/SemaHLSL.cpp 
llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
``





View the diff from clang-format here.


``diff
diff --git a/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp 
b/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
index 3905503d6d..eb3a98e3d7 100644
--- a/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
@@ -229,7 +229,7 @@ private:
 
   bool selectSpvThreadId(Register ResVReg, const SPIRVType *ResType,
  MachineInstr &I) const;
-  
+
   bool selectWaveReadLaneAt(Register ResVReg, const SPIRVType *ResType,
 MachineInstr &I) const;
 

``




https://github.com/llvm/llvm-project/pull/111010
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[Lldb-commits] [lldb] Support inline diagnostics in CommandReturnObject (PR #110901)

2024-10-10 Thread Jonas Devlieghere via lldb-commits


@@ -38,19 +38,23 @@ class Args {
 
 std::unique_ptr ptr;
 char quote = '\0';
+/// The position of the argument in the original argument string.
+std::optional column;
 
 char *data() { return ptr.get(); }
 
   public:
 ArgEntry() = default;
-ArgEntry(llvm::StringRef str, char quote);
+ArgEntry(llvm::StringRef str, char quote, std::optional column);
 
 llvm::StringRef ref() const { return c_str(); }
 const char *c_str() const { return ptr.get(); }
 
 /// Returns true if this argument was quoted in any way.
 bool IsQuoted() const { return quote != '\0'; }
 char GetQuoteChar() const { return quote; }
+std::optional GetPos() const { return column; }
+uint16_t GetLength() const { return ref().size(); }

JDevlieghere wrote:

I was talking specifically about `GetLength`, not `GetPos`. It makes sense that 
the column info is a `uint16_t`, but the length of the argument shouldn't be 
unnecessarily truncated (imho). 

https://github.com/llvm/llvm-project/pull/110901
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Add include for SBLanguages in lldb-enumerations (PR #111907)

2024-10-10 Thread via lldb-commits

llvmbot wrote:




@llvm/pr-subscribers-lldb

Author: Chelsea Cassanova (chelcassanova)


Changes

This adds an include for SBLanguages.h in lldb-enumerations.h so that files 
that need this enum do not have to explicitly include SBLanguages.

---
Full diff: https://github.com/llvm/llvm-project/pull/111907.diff


1 Files Affected:

- (modified) lldb/include/lldb/lldb-enumerations.h (+1) 


``diff
diff --git a/lldb/include/lldb/lldb-enumerations.h 
b/lldb/include/lldb/lldb-enumerations.h
index 938f6e3abe8f2a..df3aadcb0689c6 100644
--- a/lldb/include/lldb/lldb-enumerations.h
+++ b/lldb/include/lldb/lldb-enumerations.h
@@ -11,6 +11,7 @@
 
 #include 
 #include 
+#include 
 
 #ifndef SWIG
 // Macro to enable bitmask operations on an enum.  Without this, Enum | Enum

``




https://github.com/llvm/llvm-project/pull/111907
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[clang] [llvm] [SystemZ][z/OS] Add new openFileForReadBinary function, and pass IsText parameter to getBufferForFile (PR #111723)

2024-10-10 Thread Abhina Sree via cfe-commits


@@ -54,7 +54,9 @@ std::unique_ptr HeaderMap::Create(FileEntryRef FE, 
FileManager &FM) {
   unsigned FileSize = FE.getSize();
   if (FileSize <= sizeof(HMapHeader)) return nullptr;
 
-  auto FileBuffer = FM.getBufferForFile(FE);
+  auto FileBuffer =
+  FM.getBufferForFile(FE, /*IsVolatile=*/false,
+  /*RequiresNullTerminator=*/true, /*IsText=*/false);

abhina-sree wrote:

So the following tests were previously failing on z/OS due to the binary/text 
issue and will be fixed by this change
clang/test/Preprocessor/headermap-rel.c
clang/test/Preprocessor/headermap-rel2.c

https://github.com/llvm/llvm-project/pull/111723
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[Lldb-commits] [lldb] [lldb] Add include for SBLanguages in lldb-enumerations (PR #111907)

2024-10-10 Thread Chelsea Cassanova via lldb-commits

https://github.com/chelcassanova created 
https://github.com/llvm/llvm-project/pull/111907

This adds an include for SBLanguages.h in lldb-enumerations.h so that files 
that need this enum do not have to explicitly include SBLanguages.

>From 133ace4b281abf205d35bbb6ed6ef7b2a39a8c2a Mon Sep 17 00:00:00 2001
From: Chelsea Cassanova 
Date: Thu, 10 Oct 2024 12:58:06 -0700
Subject: [PATCH] [lldb] Add include for SBLanguages in lldb-enumerations

This adds an include for SBLanguages.h in lldb-enumerations.h so that
files that need this enum do not have to explicitly include SBLanguages.
---
 lldb/include/lldb/lldb-enumerations.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lldb/include/lldb/lldb-enumerations.h 
b/lldb/include/lldb/lldb-enumerations.h
index 938f6e3abe8f2a..df3aadcb0689c6 100644
--- a/lldb/include/lldb/lldb-enumerations.h
+++ b/lldb/include/lldb/lldb-enumerations.h
@@ -11,6 +11,7 @@
 
 #include 
 #include 
+#include 
 
 #ifndef SWIG
 // Macro to enable bitmask operations on an enum.  Without this, Enum | Enum

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #99736)

2024-10-10 Thread via lldb-commits

github-actions[bot] wrote:



@rocallahan Congratulations on having your first Pull Request (PR) merged into 
the LLVM Project!

Your changes will be combined with recent changes from other authors, then 
tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a 
problem with a build, you may receive a report in an email or a comment on this 
PR.

Please check whether problems have been caused by your change specifically, as 
the builds can include changes from many authors. It is not uncommon for your 
change to be included in a build that fails due to someone else's changes, or 
infrastructure issues.

How to do this, and the rest of the post-merge process, is covered in detail 
[here](https://llvm.org/docs/MyFirstTypoFix.html#myfirsttypofix-issues-after-landing-your-pr).

If your change does cause a problem, it may be reverted, or you can revert it 
yourself. This is a normal part of [LLVM 
development](https://llvm.org/docs/DeveloperPolicy.html#patch-reversion-policy).
 You can fix your changes and open a new PR to merge them again.

If you don't get any reports, no action is required from you. Your changes are 
working as expected, well done!


https://github.com/llvm/llvm-project/pull/99736
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #99736)

2024-10-10 Thread Jonas Devlieghere via lldb-commits

https://github.com/JDevlieghere closed 
https://github.com/llvm/llvm-project/pull/99736
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] d5e1de6 - [lldb] Implement basic support for reverse-continue (#99736)

2024-10-10 Thread via lldb-commits

Author: Robert O'Callahan
Date: 2024-10-10T13:01:47-07:00
New Revision: d5e1de6da96c1ab3b8cae68447e8ed3696a7006e

URL: 
https://github.com/llvm/llvm-project/commit/d5e1de6da96c1ab3b8cae68447e8ed3696a7006e
DIFF: 
https://github.com/llvm/llvm-project/commit/d5e1de6da96c1ab3b8cae68447e8ed3696a7006e.diff

LOG: [lldb] Implement basic support for reverse-continue (#99736)

This commit only adds support for the
`SBProcess::ReverseContinue()` API. A user-accessible command for this
will follow in a later commit.

This feature depends on a gdbserver implementation (e.g. `rr`) providing
support for the `bc` and `bs` packets. `lldb-server` does not support
those packets, and there is no plan to change that. So, for testing
purposes, `lldbreverse.py` wraps `lldb-server` with a Python
implementation of *very limited* record-and-replay functionality for use
by *tests only*.

The majority of this PR is test infrastructure (about 700 of the 950
lines added).

Added: 
lldb/packages/Python/lldbsuite/test/lldbgdbproxy.py
lldb/packages/Python/lldbsuite/test/lldbreverse.py
lldb/test/API/functionalities/reverse-execution/Makefile

lldb/test/API/functionalities/reverse-execution/TestReverseContinueBreakpoints.py

lldb/test/API/functionalities/reverse-execution/TestReverseContinueNotSupported.py
lldb/test/API/functionalities/reverse-execution/main.c

Modified: 
lldb/include/lldb/API/SBProcess.h
lldb/include/lldb/Target/Process.h
lldb/include/lldb/Target/StopInfo.h
lldb/include/lldb/lldb-enumerations.h
lldb/packages/Python/lldbsuite/test/gdbclientutils.py
lldb/packages/Python/lldbsuite/test/lldbtest.py
lldb/source/API/SBProcess.cpp
lldb/source/API/SBThread.cpp
lldb/source/Interpreter/CommandInterpreter.cpp
lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h
lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
lldb/source/Plugins/Process/Windows/Common/ProcessWindows.h
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp
lldb/source/Plugins/Process/scripted/ScriptedProcess.h
lldb/source/Target/Process.cpp
lldb/source/Target/StopInfo.cpp
lldb/source/Target/Thread.cpp
lldb/tools/lldb-dap/JSONUtils.cpp
lldb/tools/lldb-dap/LLDBUtils.cpp

Removed: 




diff  --git a/lldb/include/lldb/API/SBProcess.h 
b/lldb/include/lldb/API/SBProcess.h
index 1624e02070b1b2..8b8ed830b54cc0 100644
--- a/lldb/include/lldb/API/SBProcess.h
+++ b/lldb/include/lldb/API/SBProcess.h
@@ -159,6 +159,7 @@ class LLDB_API SBProcess {
   lldb::SBError Destroy();
 
   lldb::SBError Continue();
+  lldb::SBError Continue(RunDirection direction);
 
   lldb::SBError Stop();
 

diff  --git a/lldb/include/lldb/Target/Process.h 
b/lldb/include/lldb/Target/Process.h
index b8c53a474ba6b9..fe7fbc50fd5770 100644
--- a/lldb/include/lldb/Target/Process.h
+++ b/lldb/include/lldb/Target/Process.h
@@ -857,10 +857,10 @@ class Process : public 
std::enable_shared_from_this,
   /// \see Thread:Resume()
   /// \see Thread:Step()
   /// \see Thread:Suspend()
-  Status Resume();
+  Status Resume(lldb::RunDirection direction = lldb::eRunForward);
 
   /// Resume a process, and wait for it to stop.
-  Status ResumeSynchronous(Stream *stream);
+  Status ResumeSynchronous(Stream *stream, lldb::RunDirection direction = 
lldb::eRunForward);
 
   /// Halts a running process.
   ///
@@ -1104,9 +1104,14 @@ class Process : public 
std::enable_shared_from_this,
   /// \see Thread:Resume()
   /// \see Thread:Step()
   /// \see Thread:Suspend()
-  virtual Status DoResume() {
-return Status::FromErrorStringWithFormatv(
-"error: {0} does not support resuming processes", GetPluginName());
+  virtual Status DoResume(lldb::RunDirection direction) {
+if (direction == lldb::RunDirection::eRunForward) {
+  return Status::FromErrorStringWithFormatv(
+  "error: {0} does not support resuming processes", GetPluginName());
+} else {
+  return Status::FromErrorStringWithFormatv(
+  "error: {0} does not support reverse execution of processes", 
GetPluginName());
+}
   }
 
   /// Called after resuming a process.
@@ -2332,6 +2337,8 @@ class Process : public 
std::enable_shared_from_this,
 
   bool IsRunning() const;
 
+  lldb::RunDirection GetLastRunDirection() { return m_last_run_direction; }
+
   DynamicCheckerFunctions *GetDynamicCheckers() {
 return m_dynamic_checkers_up.get();
   }
@@ -2851,7 +2858,

[llvm-branch-commits] [sanitizer] VReport BeforeFork/AfterFork (PR #111900)

2024-10-10 Thread Florian Mayer via llvm-branch-commits

https://github.com/fmayer approved this pull request.


https://github.com/llvm/llvm-project/pull/111900
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [sanitizer] VReport thread status for failed PTRACE_ATTACH (PR #111901)

2024-10-10 Thread Florian Mayer via llvm-branch-commits

https://github.com/fmayer approved this pull request.


https://github.com/llvm/llvm-project/pull/111901
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [sanitizer] VReport thread status for failed PTRACE_ATTACH (PR #111901)

2024-10-10 Thread Florian Mayer via llvm-branch-commits


@@ -148,6 +148,14 @@ bool ThreadSuspender::SuspendThread(tid_t tid) {
 // Log this event and move on.
 VReport(1, "Could not attach to thread %zu (errno %d).\n", (uptr)tid,
 pterrno);
+if (common_flags()->verbosity >= 2) {
+  InternalScopedString path;
+  path.AppendF("/proc/%d/task/%llu/status", pid_, tid);
+  InternalMmapVector buffer;
+  ReadFileToVector(path.data(), &buffer);
+  buffer.push_back(0);

fmayer wrote:

nit: '\0'

https://github.com/llvm/llvm-project/pull/111901
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-10 Thread Finn Plummer via cfe-commits

https://github.com/inbelic updated 
https://github.com/llvm/llvm-project/pull/111010

>From 70089645ec5cf62b491a56df96ec46f4328fbc11 Mon Sep 17 00:00:00 2001
From: Finn Plummer 
Date: Thu, 3 Oct 2024 11:43:51 -0700
Subject: [PATCH 01/11] [HLSL] Implement `WaveReadLaneAt` intrinsic

- create a clang built-in in Builtins.td
- add semantic checking in SemaHLSL.cpp
- link the WaveReadLaneAt api in hlsl_intrinsics.h
- add lowering to spirv backend op GroupNonUniformShuffle
  with Scope = 2 (Group) in SPIRVInstructionSelector.cpp

- add tests for HLSL intrinsic lowering to spirv intrinsic in
  WaveReadLaneAt.hlsl
- add tests for sema checks in WaveReadLaneAt-errors.hlsl
- add spir-v backend tests in WaveReadLaneAt.ll
---
 clang/include/clang/Basic/Builtins.td |  6 +++
 clang/lib/CodeGen/CGBuiltin.cpp   | 16 
 clang/lib/CodeGen/CGHLSLRuntime.h |  1 +
 clang/lib/Headers/hlsl/hlsl_intrinsics.h  |  7 
 clang/lib/Sema/SemaHLSL.cpp   | 20 ++
 .../CodeGenHLSL/builtins/WaveReadLaneAt.hlsl  | 40 +++
 .../BuiltIns/WaveReadLaneAt-errors.hlsl   | 21 ++
 llvm/include/llvm/IR/IntrinsicsSPIRV.td   |  1 +
 .../Target/SPIRV/SPIRVInstructionSelector.cpp | 15 +++
 .../SPIRV/hlsl-intrinsics/WaveReadLaneAt.ll   | 28 +
 10 files changed, 155 insertions(+)
 create mode 100644 clang/test/CodeGenHLSL/builtins/WaveReadLaneAt.hlsl
 create mode 100644 clang/test/SemaHLSL/BuiltIns/WaveReadLaneAt-errors.hlsl
 create mode 100644 llvm/test/CodeGen/SPIRV/hlsl-intrinsics/WaveReadLaneAt.ll

diff --git a/clang/include/clang/Basic/Builtins.td 
b/clang/include/clang/Basic/Builtins.td
index 8090119e512fbb..eec9acd4d27d7d 100644
--- a/clang/include/clang/Basic/Builtins.td
+++ b/clang/include/clang/Basic/Builtins.td
@@ -4703,6 +4703,12 @@ def HLSLWaveIsFirstLane : LangBuiltin<"HLSL_LANG"> {
   let Prototype = "bool()";
 }
 
+def HLSLWaveReadLaneAt : LangBuiltin<"HLSL_LANG"> {
+  let Spellings = ["__builtin_hlsl_wave_read_lane_at"];
+  let Attributes = [NoThrow, Const];
+  let Prototype = "void(...)";
+}
+
 def HLSLClamp : LangBuiltin<"HLSL_LANG"> {
   let Spellings = ["__builtin_hlsl_elementwise_clamp"];
   let Attributes = [NoThrow, Const];
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index da3eca73bfb575..dff56af9282e9d 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -18835,6 +18835,22 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
 Intrinsic::ID ID = CGM.getHLSLRuntime().getWaveIsFirstLaneIntrinsic();
 return EmitRuntimeCall(Intrinsic::getDeclaration(&CGM.getModule(), ID));
   }
+  case Builtin::BI__builtin_hlsl_wave_read_lane_at: {
+// Due to the use of variadic arguments we must explicitly retreive them 
and
+// create our function type.
+Value *OpExpr = EmitScalarExpr(E->getArg(0));
+Value *OpIndex = EmitScalarExpr(E->getArg(1));
+llvm::FunctionType *FT = llvm::FunctionType::get(
+OpExpr->getType(), ArrayRef{OpExpr->getType(), OpIndex->getType()},
+false);
+
+// Get overloaded name
+std::string name =
+Intrinsic::getName(CGM.getHLSLRuntime().getWaveReadLaneAtIntrinsic(),
+   ArrayRef{OpExpr->getType()}, &CGM.getModule());
+return EmitRuntimeCall(CGM.CreateRuntimeFunction(FT, name, {}, false, 
true),
+   ArrayRef{OpExpr, OpIndex}, 
"hlsl.wave.read.lane.at");
+  }
   case Builtin::BI__builtin_hlsl_elementwise_sign: {
 Value *Op0 = EmitScalarExpr(E->getArg(0));
 llvm::Type *Xty = Op0->getType();
diff --git a/clang/lib/CodeGen/CGHLSLRuntime.h 
b/clang/lib/CodeGen/CGHLSLRuntime.h
index a8aabca7348ffb..a639ce2d784f4a 100644
--- a/clang/lib/CodeGen/CGHLSLRuntime.h
+++ b/clang/lib/CodeGen/CGHLSLRuntime.h
@@ -87,6 +87,7 @@ class CGHLSLRuntime {
   GENERATE_HLSL_INTRINSIC_FUNCTION(SDot, sdot)
   GENERATE_HLSL_INTRINSIC_FUNCTION(UDot, udot)
   GENERATE_HLSL_INTRINSIC_FUNCTION(WaveIsFirstLane, wave_is_first_lane)
+  GENERATE_HLSL_INTRINSIC_FUNCTION(WaveReadLaneAt, wave_read_lane_at)
 
   
//===--===//
   // End of reserved area for HLSL intrinsic getters.
diff --git a/clang/lib/Headers/hlsl/hlsl_intrinsics.h 
b/clang/lib/Headers/hlsl/hlsl_intrinsics.h
index 810a16d75f0228..a7bdc353ae71bf 100644
--- a/clang/lib/Headers/hlsl/hlsl_intrinsics.h
+++ b/clang/lib/Headers/hlsl/hlsl_intrinsics.h
@@ -2015,6 +2015,13 @@ _HLSL_AVAILABILITY(shadermodel, 6.0)
 _HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_is_first_lane)
 __attribute__((convergent)) bool WaveIsFirstLane();
 
+// \brief Returns the value of the expression for the given lane index within
+// the specified wave.
+template 
+_HLSL_AVAILABILITY(shadermodel, 6.0)
+_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
+__attribute__((convergent)) T WaveReadLaneAt(T, int32_t);
+
 
//===-

[Lldb-commits] [lldb] Support inline diagnostics in CommandReturnObject (PR #110901)

2024-10-10 Thread via lldb-commits

jimingham wrote:

Except for the test request, this LGTM. 

https://github.com/llvm/llvm-project/pull/110901
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Support inline diagnostics in CommandReturnObject (PR #110901)

2024-10-10 Thread Adrian Prantl via lldb-commits


@@ -38,19 +38,23 @@ class Args {
 
 std::unique_ptr ptr;
 char quote = '\0';
+/// The position of the argument in the original argument string.
+std::optional column;
 
 char *data() { return ptr.get(); }
 
   public:
 ArgEntry() = default;
-ArgEntry(llvm::StringRef str, char quote);
+ArgEntry(llvm::StringRef str, char quote, std::optional column);
 
 llvm::StringRef ref() const { return c_str(); }
 const char *c_str() const { return ptr.get(); }
 
 /// Returns true if this argument was quoted in any way.
 bool IsQuoted() const { return quote != '\0'; }
 char GetQuoteChar() const { return quote; }
+std::optional GetPos() const { return column; }
+uint16_t GetLength() const { return ref().size(); }

adrian-prantl wrote:

1. This is the column position of something a human typed. Even uint8_t is a 
stretch.
2. In Clang and LLVM debug info metadata we (somewhat consistently) use 
uint16_t for column counts.

https://github.com/llvm/llvm-project/pull/110901
_______
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Support inline diagnostics in CommandReturnObject (PR #110901)

2024-10-10 Thread via lldb-commits


@@ -0,0 +1,11 @@
+# RUN: echo quit | %lldb -o "log enable -x" \

jimingham wrote:

Can you write one of these tests where the wrong option isn't the first?  From 
the standpoint of "things you could get wrong", "only working for the first 
option" seems a likely failure mode.

https://github.com/llvm/llvm-project/pull/110901
___________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[clang] [ItaniumCXXABI] Mark RTTI type name as global unnamed_addr (PR #111343)

2024-10-10 Thread Eli Friedman via cfe-commits

efriedma-quic wrote:

Oh... GlobalValue::canBeOmittedFromSymbolTable is a rabbit-hole I didn't know 
existed.  Apparently I don't know how unnamed_addr works.  
(canBeOmittedFromSymbolTable is completely inconsistent with the way everything 
else in the compiler reasons about unnamed_addr.)

https://github.com/llvm/llvm-project/pull/111343
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-10 Thread Adam Yang via cfe-commits

https://github.com/adam-yang edited 
https://github.com/llvm/llvm-project/pull/111883
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-10 Thread Adam Yang via cfe-commits

https://github.com/adam-yang edited 
https://github.com/llvm/llvm-project/pull/111883
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-10 Thread Adam Yang via cfe-commits

https://github.com/adam-yang edited 
https://github.com/llvm/llvm-project/pull/111883
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-10 Thread Adam Yang via cfe-commits

https://github.com/adam-yang edited 
https://github.com/llvm/llvm-project/pull/111883
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Turn `-Wdeprecated-literal-operator` on by default (PR #111027)

2024-10-10 Thread Erich Keane via cfe-commits

https://github.com/erichkeane updated 
https://github.com/llvm/llvm-project/pull/111027

>From 21dc8df292d85b7f48f75ea2a707be6c4971e2f9 Mon Sep 17 00:00:00 2001
From: erichkeane 
Date: Thu, 3 Oct 2024 09:41:08 -0700
Subject: [PATCH 1/3] Turn Wdeprecated-literal-operator on by default

It would be nice to see what our users think about this change, as this
is something that WG21/EWG quite wants to fix a handful of questionable
issues with UB. Depending on the outcome of this after being committed,
we might instead suggest EWG undeprecate this, and require a bit of
'magic' from the lexer.

Additionally, this patch makes it so we emit this diagnostic ALSO in
cases where the literal name is reserved.  It doesn't make sense to
limit that.
---
 clang/docs/ReleaseNotes.rst   | 22 +++
 .../clang/Basic/DiagnosticSemaKinds.td|  2 +-
 clang/lib/Sema/SemaExprCXX.cpp| 21 +++---
 clang/test/CXX/drs/cwg14xx.cpp|  2 +-
 clang/test/CXX/drs/cwg17xx.cpp|  3 +
 clang/test/CXX/drs/cwg25xx.cpp|  3 +
 clang/test/CXX/lex/lex.literal/lex.ext/p1.cpp |  2 +-
 .../test/CXX/lex/lex.literal/lex.ext/p10.cpp  |  2 +-
 .../test/CXX/lex/lex.literal/lex.ext/p11.cpp  |  6 +-
 clang/test/CXX/lex/lex.literal/lex.ext/p3.cpp | 10 +--
 clang/test/CXX/lex/lex.literal/lex.ext/p4.cpp | 10 +--
 clang/test/CXX/lex/lex.literal/lex.ext/p5.cpp |  8 +--
 clang/test/CXX/lex/lex.literal/lex.ext/p6.cpp |  8 +--
 clang/test/CXX/lex/lex.literal/lex.ext/p7.cpp |  6 +-
 clang/test/CXX/lex/lex.literal/lex.ext/p8.cpp |  6 +-
 clang/test/CXX/lex/lex.literal/lex.ext/p9.cpp |  2 +-
 .../CXX/over/over.oper/over.literal/p2.cpp| 28 
 .../CXX/over/over.oper/over.literal/p3.cpp| 66 +--
 .../CXX/over/over.oper/over.literal/p5.cpp| 20 +++---
 .../CXX/over/over.oper/over.literal/p6.cpp| 12 ++--
 .../CXX/over/over.oper/over.literal/p7.cpp| 10 +--
 .../CXX/over/over.oper/over.literal/p8.cpp| 16 ++---
 clang/test/FixIt/fixit-c++11.cpp  |  4 +-
 clang/test/Parser/cxx0x-literal-operators.cpp |  6 +-
 .../Parser/cxx11-user-defined-literals.cpp| 29 
 .../cxx11-user-defined-literals-unused.cpp|  4 +-
 .../SemaCXX/cxx11-user-defined-literals.cpp   | 60 -
 clang/test/SemaCXX/cxx2a-consteval.cpp|  6 +-
 clang/test/SemaCXX/cxx98-compat.cpp   |  2 +-
 clang/test/SemaCXX/literal-operators.cpp  | 46 ++---
 ...ser-defined-literals-in-system-headers.cpp |  3 +-
 clang/test/SemaCXX/reserved-identifier.cpp|  8 ++-
 clang/test/SemaCXX/warn-xor-as-pow.cpp|  6 +-
 33 files changed, 237 insertions(+), 202 deletions(-)

diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 44d5f348ed2d54..edd1f1d2302d58 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -99,6 +99,20 @@ C++ Specific Potentially Breaking Changes
 // Was error, now evaluates to false.
 constexpr bool b = f() == g();
 
+- The warning ``-Wdeprecated-literal-operator`` is now on by default, as this 
is
+  something that WG21 has shown interest in removing from the language. The
+  result is that anyone who is compiling with ``-Werror`` should see this
+  diagnostic.  To fix this diagnostic, simply removing the space character from
+  between the ``operator""`` and the user defined literal name will make the
+  source no longer deprecated. This is consistent with CWG2521.
+
+  .. code-block:: c++
+
+// Now diagnoses by default.
+unsigned operator"" _udl_name(unsigned long long);
+// Fixed version:
+unsigned operator""_udl_name(unsigned long long);
+
 ABI Changes in This Version
 ---
 
@@ -216,6 +230,10 @@ Resolutions to C++ Defect Reports
 - Clang now allows trailing requires clause on explicit deduction guides.
   (`CWG2707: Deduction guides cannot have a trailing requires-clause 
`_).
 
+- Clang now diagnoses a space in the first production of a 
``literal-operator-id``
+  by default.
+  (`CWG2521: User-defined literals and reserved identifiers 
`_).
+
 C Language Changes
 --
 
@@ -378,6 +396,10 @@ Improvements to Clang's diagnostics
 
 - Clang now emits a diagnostic note at the class declaration when the method 
definition does not match any declaration (#GH110638).
 
+- Clang now emits a ``-Wdepredcated-literal-operator`` diagnostic, even if the
+  name was a reserved name, which we improperly allowed to suppress the
+  diagnostic.
+
 Improvements to Clang's time-trace
 --
 
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td 
b/clang/include/clang/Basic/DiagnosticSemaKinds.td
index dc84110ef78211..3c9f6ecb506e36 100644
--- a/clang/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td
@@ -439,7 +439,7 @@ def warn_reserv

[jenkinsci/jenkins] dfe923: Update dependency lit to v3.2.1

2024-10-10 Thread 'renovate[bot]' via Jenkins Commits
  Branch: refs/heads/renovate/lit-3.x
  Home:   https://github.com/jenkinsci/jenkins
  Commit: dfe9234779c5156627ae0d038995f76ab2a27166
  
https://github.com/jenkinsci/jenkins/commit/dfe9234779c5156627ae0d038995f76ab2a27166
  Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  Date:   2024-10-10 (Thu, 10 Oct 2024)

  Changed paths:
M core/src/site/site.xml

  Log Message:
  ---
  Update dependency lit to v3.2.1



To unsubscribe from these emails, change your notification settings at 
https://github.com/jenkinsci/jenkins/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-commits/jenkinsci/jenkins/push/refs/heads/renovate/lit-3.x/00-dfe923%40github.com.


[clang] Turn `-Wdeprecated-literal-operator` on by default (PR #111027)

2024-10-10 Thread Erich Keane via cfe-commits

erichkeane wrote:

> LGTM, please keep an eye out for fallout in the wild though. It may be 
> interesting to see how many instances of `-Wno-deprecated-literal-operator` 
> exist now and do a search again before release to see how many new instances 
> show up.

Thats a good idea!  I did our initial search:

https://github.com/search?q=Wno-deprecated-literal-operator&type=code

Looks like 63 total files, 285 issues, 127 PRs, 203 commits.

So so far, most projects are fixing them appears.   We can re-do this search at 
one point.

https://github.com/llvm/llvm-project/pull/111027
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Turn `-Wdeprecated-literal-operator` on by default (PR #111027)

2024-10-10 Thread via cfe-commits

https://github.com/cor3ntin approved this pull request.

LGTM

https://github.com/llvm/llvm-project/pull/111027
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-10 Thread Adam Yang via cfe-commits
/Builtins.td
@@ -4831,7 +4831,7 @@ def HLSLRadians : LangBuiltin<"HLSL_LANG"> {
 }
 
 def HLSLGroupMemoryBarrierWithGroupSync: LangBuiltin<"HLSL_LANG"> {
-  let Spellings = ["__builtin_group_memory_barrier_with_group_sync"];
+  let Spellings = ["__builtin_hlsl_group_memory_barrier_with_group_sync"];
   let Attributes = [NoThrow, Const];
   let Prototype = "void(...)";
 }
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 45890019ee2a64..61bc4335fa738a 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -18901,8 +18901,9 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
 CGM.getHLSLRuntime().getRadiansIntrinsic(), ArrayRef{Op0},
 nullptr, "hlsl.radians");
   }
-  case Builtin::BI__builtin_group_memory_barrier_with_group_sync: {
-Intrinsic::ID ID = 
CGM.getHLSLRuntime().getGroupMemoryBarrierWithGroupSyncIntrinsic();
+  case Builtin::BI__builtin_hlsl_group_memory_barrier_with_group_sync: {
+Intrinsic::ID ID =
+CGM.getHLSLRuntime().getGroupMemoryBarrierWithGroupSyncIntrinsic();
 return EmitRuntimeCall(Intrinsic::getDeclaration(&CGM.getModule(), ID));
   }
   }
diff --git a/clang/lib/CodeGen/CGHLSLRuntime.h 
b/clang/lib/CodeGen/CGHLSLRuntime.h
index 1e095cedf58731..fb29d39ef6982e 100644
--- a/clang/lib/CodeGen/CGHLSLRuntime.h
+++ b/clang/lib/CodeGen/CGHLSLRuntime.h
@@ -89,7 +89,8 @@ class CGHLSLRuntime {
   GENERATE_HLSL_INTRINSIC_FUNCTION(SDot, sdot)
   GENERATE_HLSL_INTRINSIC_FUNCTION(UDot, udot)
   GENERATE_HLSL_INTRINSIC_FUNCTION(WaveIsFirstLane, wave_is_first_lane)
-  GENERATE_HLSL_INTRINSIC_FUNCTION(GroupMemoryBarrierWithGroupSync, 
groupMemoryBarrierWithGroupSync)
+  GENERATE_HLSL_INTRINSIC_FUNCTION(GroupMemoryBarrierWithGroupSync,
+   group_memory_barrier_with_group_sync)
 
   
//===--===//
   // End of reserved area for HLSL intrinsic getters.
diff --git a/clang/lib/Headers/hlsl/hlsl_intrinsics.h 
b/clang/lib/Headers/hlsl/hlsl_intrinsics.h
index 637df8924e2468..9f72af0f99007a 100644
--- a/clang/lib/Headers/hlsl/hlsl_intrinsics.h
+++ b/clang/lib/Headers/hlsl/hlsl_intrinsics.h
@@ -2177,7 +2177,7 @@ float4 radians(float4);
 /// accesses have been completed and all threads in the group have reached this
 /// call.
 
-_HLSL_BUILTIN_ALIAS(__builtin_group_memory_barrier_with_group_sync)
+_HLSL_BUILTIN_ALIAS(__builtin_hlsl_group_memory_barrier_with_group_sync)
 void GroupMemoryBarrierWithGroupSync(void);
 
 } // namespace hlsl
diff --git a/clang/lib/Sema/SemaHLSL.cpp b/clang/lib/Sema/SemaHLSL.cpp
index 30480f8f57c12d..57220ce320079e 100644
--- a/clang/lib/Sema/SemaHLSL.cpp
+++ b/clang/lib/Sema/SemaHLSL.cpp
@@ -2018,7 +2018,7 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned 
BuiltinID, CallExpr *TheCall) {
   return true;
 break;
   }
-  case Builtin::BI__builtin_group_memory_barrier_with_group_sync: {
+  case Builtin::BI__builtin_hlsl_group_memory_barrier_with_group_sync: {
 if (SemaRef.checkArgCountAtMost(TheCall, 0))
   return true;
 break;
diff --git 
a/clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync-errors.hlsl 
b/clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync-errors.hlsl
index 58d265c7c56f38..82f36758d8f9ec 100644
--- 
a/clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync-errors.hlsl
+++ 
b/clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync-errors.hlsl
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -finclude-default-header -triple 
dxil-pc-shadermodel6.6-library %s -emit-llvm-only -disable-llvm-passes -verify 
-verify-ignore-unexpected
 
 void test_too_many_arg() {
-  __builtin_group_memory_barrier_with_group_sync(0);
+  __builtin_hlsl_group_memory_barrier_with_group_sync(0);
   // expected-error@-1 {{too many arguments to function call, expected at most 
0, have 1}}
 }
diff --git 
a/clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync.hlsl 
b/clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync.hlsl
index 1287de6119384a..145cb21f775b08 100644
--- a/clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync.hlsl
@@ -10,10 +10,10 @@
 // CHECK-DXIL: define void @
 // CHECK-SPIRV: define spir_func void @
 void test_GroupMemoryBarrierWithGroupSync() {
-// CHECK: call void @llvm.[[TARGET]].groupMemoryBarrierWithGroupSync()
+// CHECK: call void @llvm.[[TARGET]].group.memory.barrier.with.group.sync()
   GroupMemoryBarrierWithGroupSync();
 }
 
-// CHECK: declare void @llvm.[[TARGET]].groupMemoryBarrierWithGroupSync() 
#[[ATTRS:[0-9]+]]
+// CHECK: declare void @llvm.[[TARGET]].group.memory.barrier.with.group.sync() 
#[[ATTRS:[0-9]+]]
 // CHECK-NOT: attributes #[[ATTRS]] = {{.+}}memory(none){{.+}}
 // CHECK: attributes #[[ATTRS]] = {

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[Lldb-commits] [lldb] [lldb] Disable find-module.test in case of a remote target (PR #94165)

2024-10-10 Thread Dmitry Vasilyev via lldb-commits

https://github.com/slydiman closed 
https://github.com/llvm/llvm-project/pull/94165
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[clang] Turn `-Wdeprecated-literal-operator` on by default (PR #111027)

2024-10-10 Thread Aaron Ballman via cfe-commits

https://github.com/AaronBallman approved this pull request.

LGTM, please keep an eye out for fallout in the wild though. It may be 
interesting to see how many instances of `-Wno-deprecated-literal-operator` 
exist now and do a search again before release to see how many new instances 
show up.

https://github.com/llvm/llvm-project/pull/111027
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[Lldb-commits] [lldb] [lldb] Fixed TestEchoCommands.test running on a remote target (PR #94127)

2024-10-10 Thread Dmitry Vasilyev via lldb-commits

https://github.com/slydiman closed 
https://github.com/llvm/llvm-project/pull/94127
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[clang] [libcxx] [clang & libcxx] constexpr pointer tagging (DO NOT MERGE) (PR #111861)

2024-10-10 Thread Hana Dusíková via cfe-commits

hanickadot wrote:

> Hmm, so needs to somehow allow accessing bits that aren't low bits?

yes, for example upper byte on aarch64

> As a general comment not specific to this patch, I'd prefer to build around 
> llvm.ptrmask and geps as much as possible, as opposed to relying on ptrtoint.

I 100% agree, I have my partially working version which is using ptr.mask and a 
new intrinsic for tagging. But I wasn't able to finish it. But if ever this 
functionality will get in, it should not be implemented with ptrtoint. And 
that's the point of the proposal, to avoid cast via number.

> Oh, hmm, I guess the cases where comparisons are actually legal is pretty 
> restrictive; maybe you're mostly okay here. Maybe less so if the constexpr 
> restrictions on pointer casts ever get relaxed...

My intention is a normal user shouldn't interact with raw tagged pointer, only 
if they need to interact with existing pointer tagging facility via 
`.unsafe_dirty_pointer()` and I can specify it that dereferencing and comparing 
such pointers is implementation specific.

https://github.com/llvm/llvm-project/pull/111861
___________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Turn `-Wdeprecated-literal-operator` on by default (PR #111027)

2024-10-10 Thread Aaron Ballman via cfe-commits


@@ -503,17 +503,16 @@ bool Sema::checkLiteralOperatorId(const CXXScopeSpec &SS,
 const IdentifierInfo *II = Name.Identifier;
 ReservedIdentifierStatus Status = II->isReserved(PP.getLangOpts());
 SourceLocation Loc = Name.getEndLoc();
-if (!PP.getSourceManager().isInSystemHeader(Loc)) {

AaronBallman wrote:

I don't think we need it any longer because I believe we suppress diagnostics 
in system headers via the diagnostics engine itself; you can test it out by 
using GNU line markers to pretend some code is a system header: 
https://godbolt.org/z/PsaM19Pe8

https://github.com/llvm/llvm-project/pull/111027
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


mercurial@51991: 9 new changesets

2024-10-10 Thread Mercurial Commits via Mercurial-devel
9 new changesets in mercurial:

https://www.mercurial-scm.org/repo/hg/rev/46afce95e5a5
changeset:   51983:46afce95e5a5
user:Matt Harbison 
date:Mon Oct 07 13:19:16 2024 -0400
summary: tests: skip `test-wsgicgi.t` on MSYS

https://www.mercurial-scm.org/repo/hg/rev/a878d260ec57
changeset:   51984:a878d260ec57
user:Matt Harbison 
date:Mon Oct 07 15:48:06 2024 -0400
summary: tests: stabilize `test-bundle-phase-internal.t` on Windows

https://www.mercurial-scm.org/repo/hg/rev/2924676d4728
changeset:   51985:2924676d4728
user:Matt Harbison 
date:Mon Oct 07 16:20:07 2024 -0400
summary: tests: force `seq` to print with '\n' EOL

https://www.mercurial-scm.org/repo/hg/rev/92a708af7b05
changeset:   51986:92a708af7b05
user:Matt Harbison 
date:Mon Oct 07 17:26:31 2024 -0400
summary: tests: cleanup some special casing of `seq` emitting '\r\n'

https://www.mercurial-scm.org/repo/hg/rev/d8b981968a55
changeset:   51987:d8b981968a55
user:Matt Harbison 
date:Mon Oct 07 18:26:41 2024 -0400
summary: tests: stabilize `test-clonebundles.t` on Windows

https://www.mercurial-scm.org/repo/hg/rev/df887ca0d891
changeset:   51988:df887ca0d891
user:Matt Harbison 
date:Mon Oct 07 18:33:45 2024 -0400
summary: tests: stabilize `test-journal.t` on Windows

https://www.mercurial-scm.org/repo/hg/rev/b99f0b76acf9
changeset:   51989:b99f0b76acf9
user:Matt Harbison 
date:Mon Oct 07 19:11:54 2024 -0400
summary: tests: stabilize `test-largefiles-cache.t` on Windows

https://www.mercurial-scm.org/repo/hg/rev/4b347e9429e7
changeset:   51990:4b347e9429e7
user:Matt Harbison 
date:Mon Oct 07 21:48:36 2024 -0400
summary: tests: stabilize `test-split-legacy-inline-changelog.t` on Windows

https://www.mercurial-scm.org/repo/hg/rev/f0bee30af890
changeset:   51991:f0bee30af890
tag: tip
user:Matt Harbison 
date:Tue Oct 08 01:06:57 2024 -0400
summary: tests: replace inline `waitlock()` with `wait-on-file` script

-- 
Repository URL: https://www.mercurial-scm.org/repo/hg
___
Mercurial-devel mailing list
Mercurial-devel@lists.mercurial-scm.org
https://lists.mercurial-scm.org/mailman/listinfo/mercurial-devel


[clang] [ItaniumCXXABI] Mark RTTI type name as global unnamed_addr (PR #111343)

2024-10-10 Thread Richard Smith via cfe-commits

zygoloid wrote:

> unnamed_addr doesn't allow cloning; there's no way to make it work in a 
> reasonable way even if we wanted it. See, for example, #32127 .

OK. The LangRef is very vague on its semantics, would be nice to get that 
clarified by someone who knows the intent.

Is the same true for `local_unnamed_addr`? In the change that added it 
(https://reviews.llvm.org/D20348), it appears that the intent was to support 
cloning (not putting the symbol in the symbol table will result in cloning).

https://github.com/llvm/llvm-project/pull/111343
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [libcxx] [clang & libcxx] constexpr pointer tagging (DO NOT MERGE) (PR #111861)

2024-10-10 Thread Eli Friedman via cfe-commits

efriedma-quic wrote:

> Intention is to allow to use any bits in pointer for tagging and give freedom

Hmm, so needs to somehow allow accessing bits that aren't low bits?

As a general comment not specific to this patch, I'd prefer to build around 
llvm.ptrmask and geps as much as possible, as opposed to relying on ptrtoint.

> In ExprConstant.cpp the comparison of tags is happening at the end of 
> comparing pointers, where they were compared based on offsets (calculated out 
> of LValue's path) so they should be same, but they can differ in tag.

Oh, hmm, I guess the cases where comparisons are actually legal is pretty 
restrictive; maybe you're mostly okay here.  Maybe less so if the constexpr 
restrictions on pointer casts ever get relaxed...

https://github.com/llvm/llvm-project/pull/111861
_______
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang] fix overload resolution for object parameters with top-level cv-qualifiers in member functions (PR #110435)

2024-10-10 Thread Oleksandr T. via cfe-commits
 2 files changed, 36 insertions(+), 16 deletions(-)

diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index 95db7a4305cc87..c1799dfd2bc163 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -1422,8 +1422,14 @@ static bool IsOverloadOrOverrideImpl(Sema &SemaRef, 
FunctionDecl *New,
   // the implicit object parameter are of the same type.
 
   auto NormalizeQualifiers = [&](const CXXMethodDecl *M, Qualifiers Q) {
-if (M->isExplicitObjectMemberFunction())
+if (M->isExplicitObjectMemberFunction()) {
+  if (M->getNumParams() > 0) {
+auto ThisType = M->getParamDecl(0)->getType().getCanonicalType();
+if (ThisType.isConstQualified())
+  Q.removeConst();
+  }
   return Q;
+}
 
 // We do not allow overloading based off of '__restrict'.
 Q.removeRestrict();
@@ -1439,14 +1445,23 @@ static bool IsOverloadOrOverrideImpl(Sema &SemaRef, 
FunctionDecl *New,
 return Q;
   };
 
-  auto CompareType = [&](QualType Base, QualType D) {
-auto BS = Base.getNonReferenceType().getCanonicalType().split();
+  auto AreQualifiersEqual = [&](SplitQualType BS, SplitQualType DS) {
 BS.Quals = NormalizeQualifiers(OldMethod, BS.Quals);
+DS.Quals = NormalizeQualifiers(NewMethod, DS.Quals);
+
+if (OldMethod->isExplicitObjectMemberFunction()) {
+  BS.Quals.removeVolatile();
+  DS.Quals.removeVolatile();
+}
 
+return BS.Quals == DS.Quals;
+  };
+
+  auto CompareType = [&](QualType Base, QualType D) {
+auto BS = Base.getNonReferenceType().getCanonicalType().split();
 auto DS = D.getNonReferenceType().getCanonicalType().split();
-DS.Quals = NormalizeQualifiers(NewMethod, DS.Quals);
 
-if (BS.Quals != DS.Quals)
+if (!AreQualifiersEqual(BS, DS))
   return false;
 
 if (OldMethod->isImplicitObjectMemberFunction() &&
@@ -1511,12 +1526,6 @@ static bool IsOverloadOrOverrideImpl(Sema &SemaRef, 
FunctionDecl *New,
   auto NewObjectType = New->getFunctionObjectParameterReferenceType();
   auto OldObjectType = Old->getFunctionObjectParameterReferenceType();
 
-  if (Old->isExplicitObjectMemberFunction() &&
-  OldObjectType.getQualifiers() != NewObjectType.getQualifiers())
-return OldObjectType.isConstQualified() &&
-   (NewObjectType.isConstQualified() ||
-NewObjectType.isVolatileQualified());
-
   auto IsImplicitWithNoRefQual = [](const CXXMethodDecl *F) {
 return F->getRefQualifier() == RQ_None &&
!F->isExplicitObjectMemberFunction();
diff --git a/clang/test/SemaCXX/cxx2b-deducing-this.cpp 
b/clang/test/SemaCXX/cxx2b-deducing-this.cpp
index 7dcd63a587c708..2a984a75f37d21 100644
--- a/clang/test/SemaCXX/cxx2b-deducing-this.cpp
+++ b/clang/test/SemaCXX/cxx2b-deducing-this.cpp
@@ -142,8 +142,8 @@ struct Corresponding {
 void d(this Corresponding&&);
 void d(this const Corresponding&);
 void d(this const int&);
-void d(this const int);
-void d(this int);
+void d(this const int);  // expected-note {{previous declaration is here}}
+void d(this int);// expected-error {{class member cannot be 
redeclared}}
 
 void e(this const Corresponding&&); // expected-note {{here}}
 void e() const &&; // expected-error{{cannot be redeclared}}
@@ -171,9 +171,8 @@ struct CorrespondingTpl {
 void d(this Corresponding&&);
 void d(this const Corresponding&);
 void d(this const int&);
-void d(this const int);
-void d(this int);
-
+void d(this const int); // expected-note {{previous declaration is here}}
+void d(this int);   // expected-error {{class member cannot be 
redeclared}}
 void e(this const CorrespondingTpl&&); // expected-note {{here}}
 void e() const &&; // expected-error{{cannot be redeclared}}
 };
@@ -1085,4 +1084,16 @@ struct C2 {
   void f(this volatile C2); // expected-error {{class member cannot be 
redeclared}} \
 // expected-warning {{volatile-qualified parameter 
type 'volatile C2' is deprecated}}
 };
+
+struct C3 {
+  void f(this volatile C3); // expected-note {{previous declaration is here}} \
+// expected-warning {{volatile-qualified parameter 
type 'volatile C3' is deprecated}}
+  void f(this const C3);// expected-error {{class member cannot be 
redeclared}}
+};
+
+struct C4 {
+  void f(this const C4);  // expected-note {{previous declaration is 
here}}
+  void f(this const volatile C4); // expected-error {{class member cannot be 
redeclared}} \
+      // expected-warning {{volatile-qualified 
parameter type 'const volatile C4' is deprecated}}
+};
 }

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-10-10 Thread Greg Roth via cfe-commits


@@ -19,20 +19,20 @@
 using namespace llvm;
 
 static bool finalizeLinkage(Module &M) {
-  SmallPtrSet EntriesAndExports;
+  SmallPtrSet Funcs;
 
   // Find all entry points and export functions

pow2clk wrote:

Updated

https://github.com/llvm/llvm-project/pull/106146
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [libcxx] [clang & libcxx] constexpr pointer tagging (DO NOT MERGE) (PR #111861)

2024-10-10 Thread Hana Dusíková via cfe-commits
s_inline]] constexpr auto operator--(int) noexcept {
+auto copy = auto(*this);
+this->operator--();
+return copy;
+  }
+  
+  // observers
+  constexpr dirty_pointer unsafe_dirty_pointer() const noexcept {
+// this function is not intentionally constexpr, as it is needed only to 
interact with
+// existing runtime code
+return _pointer;
+  } 
+  
+  static constexpr bool support_aliasing_masking = 
pointer_tagging_schema_with_aliasing;
+  
+  [[clang::always_inline]] constexpr clean_pointer aliasing_pointer() const 
noexcept {
+if constexpr (support_aliasing_masking) {
+  if !consteval {
+return schema::recover_aliasing_pointer(_pointer);
+  }
+}
+
+return schema::recover_pointer(_pointer);
+  }
+  
+  [[clang::always_inline]] constexpr clean_pointer pointer() const noexcept {
+return schema::recover_pointer(_pointer);
+  }
+  
+  [[clang::always_inline]] constexpr tag_type tag() const noexcept {
+return schema::recover_value(_pointer);
+  }
+  
+  template  [[nodiscard, clang::always_inline]] friend 
constexpr decltype(auto) get(tagged_ptr _pair) noexcept {
+static_assert(I < 3);
+if constexpr (I == 0) {
+  return _pair.pointer();
+} else {
+  return _pair.tag();
+}
+  }
+  
+  [[clang::always_inline]] constexpr explicit operator bool() const noexcept {
+return pointer() != nullptr;
+  }
+  
+  [[clang::always_inline]] friend constexpr ptrdiff_t operator-(tagged_ptr 
lhs, tagged_ptr rhs) noexcept {
+return lhs.pointer() - rhs.pointer();
+  }
+  
+  // comparison operators
+  [[clang::always_inline]] friend bool operator==(tagged_ptr, tagged_ptr) = 
default;
+  
+  struct _compare_object {
+clean_pointer pointer;
+tag_type tag;
+
+friend auto operator<=>(_compare_object, _compare_object) = default;
+  };
+  
+  [[clang::always_inline]] friend constexpr auto operator<=>(tagged_ptr lhs, 
tagged_ptr rhs) noexcept {
+return _compare_object{lhs.pointer(), lhs.tag()} <=> 
_compare_object{rhs.pointer(), rhs.tag()};
+  }
+  [[clang::always_inline]] friend constexpr bool operator==(tagged_ptr lhs, 
clean_pointer rhs) noexcept {
+return lhs.pointer() == rhs;
+  }
+  [[clang::always_inline]] friend constexpr auto operator<=>(tagged_ptr lhs, 
clean_pointer rhs) noexcept {
+return lhs.pointer() <=> rhs;
+  }
+  [[clang::always_inline]] friend constexpr bool operator==(tagged_ptr lhs, 
nullptr_t) noexcept {
+return lhs.pointer() == nullptr;
+  }
+};
+
+// to_address specialization
+template  static constexpr auto 
to_address(tagged_ptr<_T, _Tag, _Schema> p) noexcept -> tagged_ptr<_T, _Tag, 
_Schema>::element_type * {
+  return p.pointer();
+}
+
+// iterator traits
+template 
+struct _LIBCPP_TEMPLATE_VIS iterator_traits> {
+  using _tagged_ptr = tagged_ptr<_T, _Tag, _Schema>;
+  
+  using iterator_category = std::random_access_iterator_tag;
+  using iterator_concept = std::contiguous_iterator_tag;
+  
+  using value_type = _tagged_ptr::value_type;
+  using reference = value_type &;
+  using pointer = _tagged_ptr::clean_pointer;
+  using difference_type = _tagged_ptr::difference_type;
+};
+
+// pointer traits
+template 
+struct _LIBCPP_TEMPLATE_VIS pointer_traits> {
+  using _tagged_ptr = tagged_ptr<_T, _Tag, _Schema>;
+  using pointer = _tagged_ptr::clean_pointer;
+  using element_type = _tagged_ptr::value_type;
+  using difference_type = _tagged_ptr::difference_type;
+  
+  // what to do with this?
+  template  using rebind = typename _tagged_ptr::template 
rebind<_Up>;
+
+public:
+  _LIBCPP_HIDE_FROM_ABI constexpr static pointer pointer_to(pointer ptr) 
_NOEXCEPT {
+return _tagged_ptr{ptr};
+  }
+};
+
+// we are defaulting always to low_bits schema
+template  tagged_ptr(_T *) -> tagged_ptr<_T>;
+template  tagged_ptr(_T *, _Tag) -> tagged_ptr<_T, 
_Tag>;
+
+// support for tuple protocol so we can split tagged pointer to structured 
bindings:
+// auto [ptr, tag] = tagged_ptr
+template 
+struct tuple_size>: 
std::integral_constant {};
+
+template 
+struct tuple_element> {
+  using _pair_type = tagged_ptr<_T, _Tag, _Schema>;
+  using type = std::conditional_t;
+};
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP_STD_VER >= 26
+
+#endif // _LIBCPP___TAGGED_PTR_H
diff --git a/libcxx/include/memory b/libcxx/include/memory
index db3386cca48009..db491c0c92e1e3 100644
--- a/libcxx/include/memory
+++ b/libcxx/include/memory
@@ -969,6 +969,10 @@ template
 #  include <__memory/allocate_at_least.h>
 #endif
 
+#if _LIBCPP_STD_VER >= 26
+#  include <__memory/tagged_ptr.h>
+#endif
+
 #include 
 
 // [memory.syn]
diff --git a/libcxx/include/module.modulemap b/libcxx/include/module.modulemap
index 3ea91274a9cc9a..a52431653392ec 100644
--- a/libcxx/include/module.modulemap
+++ b/libcxx/include/module.modulemap
@@ -1514,6 +1514,7 @@ module std [system] {
 module raw_storage_iterator   { header 
"__memory/raw_storage_iterator.h" }
 module shared_ptr { header "__memory/shared_ptr.h" 
}
 module swap_allocator { header 
"__memory/swap_allocator.h" }
+module tagged_ptr { header "__memory/tagged_ptr.h" 
}
 module temp_value { header "__memory/temp_value.h" 
}
 module temporary_buffer   {
   header "__memory/temporary_buffer.h"

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-10-10 Thread Greg Roth via cfe-commits


@@ -0,0 +1,80 @@
+; RUN: opt -S -dxil-finalize-linkage 
-mtriple=dxil-unknown-shadermodel6.5-compute %s | FileCheck %s
+; RUN: llc %s --filetype=asm -o - | FileCheck %s
+
+target triple = "dxilv1.5-pc-shadermodel6.5-compute"
+
+; Confirm that DXILFinalizeLinkage will remove functions that have compatible
+; linkage and are not called from anywhere. This should be any function that
+; is not explicitly marked noinline or export and is not an entry point.
+
+; Not called nor marked with any linking or inlining attributes.
+; CHECK-NOT: define {{.*}}doNothingNothing
+define void @"?doNothingNothing@@YAXXZ"() #0 {
+entry:
+  ret void
+}
+
+; Marked internal, this should be removed.
+; CHECK-NOT: define {{.*}}doNothingInternally
+define internal void @"?doNothingInternally@@YAXXZ"() #0 {
+entry:
+  ret void
+}
+
+; Marked external, which should become internal and be removed.
+; CHECK-NOT: define {{.*}}doNothingExternally
+define external void @"?doNothingExternally@@YAXXZ"() #0 {
+entry:
+  ret void
+}
+
+; Not called nor marked with any linking or inlining attributes.
+; CHECK: define internal void @"?doSomethingSomething@@YAXXZ"() #0
+define void @"?doSomethingSomething@@YAXXZ"() #0 {
+entry:
+  ret void
+}
+
+; Marked internal, this should be removed.
+; CHECK: define internal void @"?doSomethingInternally@@YAXXZ"() #0
+define internal void @"?doSomethingInternally@@YAXXZ"() #0 {
+entry:
+  ret void
+}
+
+; Marked external, which should become internal and be removed.
+; CHECK: define internal void @"?doSomethingExternally@@YAXXZ"() #0
+define external void @"?doSomethingExternally@@YAXXZ"() #0 {
+entry:
+  ret void
+}
+
+; Lacks alwaysinline attribute. Should remain.
+; CHECK: define internal void @"?doNothingDefault@@YAXXZ"() #1
+define void @"?doNothingDefault@@YAXXZ"() #1 {
+entry:
+  ret void
+}
+
+; Has noinline attribute. Should remain.
+; CHECK: define {{.*}}doNothingNoinline
+define void @"?doNothingNoinline@@YAXXZ"() #2 {
+entry:

pow2clk wrote:

I've pretty dramatically changed this test in the most recent commit. I hope 
the comments are more understandable now. 

https://github.com/llvm/llvm-project/pull/106146
_______
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Reland "[HIP] Use original file path for CUID" (#108771) (PR #111885)

2024-10-10 Thread Artem Belevich via cfe-commits


@@ -1,13 +1,15 @@
 // Check CUID generated by hash.
 // The same CUID is generated for the same file with the same options.
 
+// RUN: cd %S
+
 // RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu 
--no-offload-new-driver \
 // RUN:   --offload-arch=gfx906 -c -nogpuinc -nogpulib -fuse-cuid=hash \
-// RUN:   %S/Inputs/hip_multiple_inputs/a.cu >%t.out 2>&1

Artem-B wrote:

That will likely break tests done outside of the source tree.

With the tests using `-cuid=[[CUID:[0-9a-f]+]]` the cuild matching itself would 
work fine.

What we need to do is verify that a host-only compilation produces the same 
hash value. Previously we've hardcoded that value, which is IIUIC, what broken 
things on mac.

One way to handle it is to run two clang commands in the same RUN statement, 
one for complete compilation, and one for the host only, and then verify that 
all cc1 compilations have the same CUID. We may also thrown in a device-only 
compilation for completeness sake.

e.g.
```
RUN: ( clang - ###; clang -### --cuda-host-only) | FileCheck
```

Not sure if process grouping would be portable, though. Another way to do it 
may be to just dump compiler output into a temp file, and then run filecheck on 
it.

```
RUN: clang -### > %t
RUN: clang -### --cuda-host-only >> %t
RUN: cat %t | FileCheck %s 
```


https://github.com/llvm/llvm-project/pull/111885
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #99736)

2024-10-10 Thread Robert O'Callahan via lldb-commits

rocallahan wrote:

> @rocallahan Let me know if you need me to merge this on your behalf.

Please do! Thanks!

https://github.com/llvm/llvm-project/pull/99736
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-10-10 Thread Greg Roth via cfe-commits


@@ -0,0 +1,47 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -S -o - %s | 
FileCheck %s
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -S -o - %s | 
FileCheck %s
+
+// Verify that internal linkage unused functions are removed
+
+RWBuffer buf;
+
+// Never called functions should be removed.
+// CHECK-NOT: define{{.*}}uncalledFor
+void uncalledFor() {
+ buf[1] = 1;
+}
+
+// Never called but exported functions should remain.
+// CHECK: define void @"?exported@@YAXXZ"()
+export void exported() {
+ buf[1] = 1;
+}
+
+// Never called but noinlined functions should remain.
+// CHECK: define internal void @"?noinlined@@YAXXZ"()
+__attribute__((noinline)) void noinlined() {
+ buf[1] = 1;
+}
+
+// Called functions marked noinline should remain.
+// CHECK: define internal void @"?calledAndNoinlined@@YAXXZ"()
+__attribute__((noinline)) void calledAndNoinlined() {
+ buf[1] = 1;
+}
+
+// Called functions that get inlined by default should be removed.
+// CHECK-NOT: define{{.*}}calledAndInlined
+void calledAndInlined() {
+ buf[1] = 1;
+}
+
+
+// Entry point functions should remain.
+// CHECK: define{{.*}}main
+[numthreads(1,1,1)]
+[shader("compute")]
+void main() {
+ calledAndInlined();
+ calledAndNoinlined();
+ buf[0] = 0;
+}

pow2clk wrote:

Fixed

https://github.com/llvm/llvm-project/pull/106146
___________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-10-10 Thread Greg Roth via cfe-commits


@@ -19,20 +19,20 @@
 using namespace llvm;
 
 static bool finalizeLinkage(Module &M) {
-  SmallPtrSet EntriesAndExports;
+  SmallPtrSet Funcs;
 
   // Find all entry points and export functions
   for (Function &EF : M.functions()) {
-if (!EF.hasFnAttribute("hlsl.shader") && !EF.hasFnAttribute("hlsl.export"))
+if (EF.hasFnAttribute("hlsl.shader") || EF.hasFnAttribute("hlsl.export"))
   continue;
-EntriesAndExports.insert(&EF);
+Funcs.insert(&EF);
   }
 
-  for (Function &F : M.functions()) {
-if (F.getLinkage() == GlobalValue::ExternalLinkage &&
-!EntriesAndExports.contains(&F)) {
-  F.setLinkage(GlobalValue::InternalLinkage);
-}
+  for (Function *F : Funcs) {
+if (F->getLinkage() == GlobalValue::ExternalLinkage)
+  F->setLinkage(GlobalValue::InternalLinkage);
+if (F->hasFnAttribute(Attribute::AlwaysInline) && F->isDefTriviallyDead())

pow2clk wrote:

Done!

https://github.com/llvm/llvm-project/pull/106146
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[Lldb-commits] [lldb] [lldb] Return an llvm::Error from GetFrameBaseValue (PR #111882)

2024-10-10 Thread Adrian Prantl via lldb-commits

https://github.com/adrian-prantl approved this pull request.

Thanks!

https://github.com/llvm/llvm-project/pull/111882
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[clang] [ItaniumCXXABI] Mark RTTI type name as global unnamed_addr (PR #111343)

2024-10-10 Thread Eli Friedman via cfe-commits

efriedma-quic wrote:

unnamed_addr doesn't allow cloning; there's no way to make it work in a 
reasonable way even if we wanted it.  See, for example, 
https://github.com/llvm/llvm-project/issues/32127 .

https://github.com/llvm/llvm-project/pull/111343
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [-Wunsafe-buffer-usage] Add user documentation. (PR #111624)

2024-10-10 Thread Artem Dergachev via cfe-commits
some of the trickier unsafe operations.
 
 Fix-It Hints for ``-Wunsafe-buffer-usage``
--
+--
 
 A code transformation tool is in development that can semi-automatically
 transform large bodies of code to follow the C++ Safe Buffers programming 
model.

>From f66ed432933e0f4b72306fa5ca39f61a61a9514e Mon Sep 17 00:00:00 2001
From: Artem Dergachev 
Date: Thu, 10 Oct 2024 12:00:22 -0700
Subject: [PATCH 3/3] Fix typo.

---
 clang/docs/SafeBuffers.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/docs/SafeBuffers.rst b/clang/docs/SafeBuffers.rst
index 5b8708d20430f9..144c3a76a5832f 100644
--- a/clang/docs/SafeBuffers.rst
+++ b/clang/docs/SafeBuffers.rst
@@ -357,7 +357,7 @@ There are a few natural reasons to use this pragma:
   never be converted to C++) or with the code that simply haven't been 
converted
   yet.
 
-Interoperation with unsafe code code may require a lot of suppressions.
+Interoperation with unsafe code may require a lot of suppressions.
 You are encouraged to introduce "unsafe wrapper functions" for various unsafe
 operations that you need to perform regularly.
 

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [HLSL] Implement the `degrees` intrinsic (PR #111209)

2024-10-10 Thread Finn Plummer via cfe-commits
ll float @llvm.dx.degrees.f32(float %a)
@@ -29,20 +29,20 @@ entry:
 define noundef <4 x float> @degrees_float4(<4 x float> noundef %a) #0 {
 ; CHECK-LABEL: define noundef <4 x float> @degrees_float4(
 ; CHECK-SAME: <4 x float> noundef [[A:%.*]]) {
-; CHECK-NEXT:  [[ENTRY:.*:]]
-; CHECK-NEXT:[[A_I0:%.*]] = extractelement <4 x float> [[A]], i64 0
-; CHECK-NEXT:[[DOTI04:%.*]] = fmul float [[A_I0]], 0x404CA5DC2000
-; CHECK-NEXT:[[A_I1:%.*]] = extractelement <4 x float> [[A]], i64 1
-; CHECK-NEXT:[[DOTI13:%.*]] = fmul float [[A_I1]], 0x404CA5DC2000
-; CHECK-NEXT:[[A_I2:%.*]] = extractelement <4 x float> [[A]], i64 2
-; CHECK-NEXT:[[DOTI22:%.*]] = fmul float [[A_I2]], 0x404CA5DC2000
-; CHECK-NEXT:[[A_I3:%.*]] = extractelement <4 x float> [[A]], i64 3
-; CHECK-NEXT:[[DOTI31:%.*]] = fmul float [[A_I3]], 0x404CA5DC2000
-; CHECK-NEXT:[[DOTUPTO0:%.*]] = insertelement <4 x float> poison, float 
[[DOTI04]], i64 0
-; CHECK-NEXT:[[DOTUPTO1:%.*]] = insertelement <4 x float> [[DOTUPTO0]], 
float [[DOTI13]], i64 1
-; CHECK-NEXT:[[DOTUPTO2:%.*]] = insertelement <4 x float> [[DOTUPTO1]], 
float [[DOTI22]], i64 2
-; CHECK-NEXT:[[TMP0:%.*]] = insertelement <4 x float> [[DOTUPTO2]], float 
[[DOTI31]], i64 3
-; CHECK-NEXT:ret <4 x float> [[TMP0]]
+; CHECK-NEXT:  entry:
+; CHECK-NEXT:[[A0:%.*]] = extractelement <4 x float> [[A]], i64 0
+; CHECK-NEXT:[[DEGREES_A0:%.*]] = fmul float [[A0]], 0x404CA5DC2000
+; CHECK-NEXT:[[A1:%.*]] = extractelement <4 x float> [[A]], i64 1
+; CHECK-NEXT:[[DEGREES_A1:%.*]] = fmul float [[A1]], 0x404CA5DC2000
+; CHECK-NEXT:[[A2:%.*]] = extractelement <4 x float> [[A]], i64 2
+; CHECK-NEXT:[[DEGREES_A2:%.*]] = fmul float [[A2]], 0x404CA5DC2000
+; CHECK-NEXT:[[A3:%.*]] = extractelement <4 x float> [[A]], i64 3
+; CHECK-NEXT:[[DEGREES_A3:%.*]] = fmul float [[A3]], 0x404CA5DC2000
+; CHECK-NEXT:[[INSERT_0:%.*]] = insertelement <4 x float> poison, float 
[[DEGREES_A0]], i64 0
+; CHECK-NEXT:[[INSERT_1:%.*]] = insertelement <4 x float> [[INSERT_0]], 
float [[DEGREES_A1]], i64 1
+; CHECK-NEXT:[[INSERT_2:%.*]] = insertelement <4 x float> [[INSERT_1]], 
float [[DEGREES_A2]], i64 2
+; CHECK-NEXT:[[RES:%.*]] = insertelement <4 x float> [[INSERT_2]], float 
[[DEGREES_A3]], i64 3
+; CHECK-NEXT:ret <4 x float> [[RES]]
 ;
 entry:
   %2 = call <4 x float> @llvm.dx.degrees.v4f32(<4 x float> %a)
diff --git a/llvm/test/CodeGen/SPIRV/hlsl-intrinsics/degrees.ll 
b/llvm/test/CodeGen/SPIRV/hlsl-intrinsics/degrees.ll
index ce648e0e51ba2c..58383b72757eb9 100644
--- a/llvm/test/CodeGen/SPIRV/hlsl-intrinsics/degrees.ll
+++ b/llvm/test/CodeGen/SPIRV/hlsl-intrinsics/degrees.ll
@@ -11,6 +11,7 @@
 ; CHECK-DAG: %[[#vec4_float_16:]] = OpTypeVector %[[#float_16]] 4
 ; CHECK-DAG: %[[#vec4_float_64:]] = OpTypeVector %[[#float_64]] 4
 
+; CHECK-LABEL: Begin function degrees_float
 define noundef float @degrees_float(float noundef %a) {
 entry:
 ; CHECK: %[[#float_32_arg:]] = OpFunctionParameter %[[#float_32]]
@@ -19,6 +20,7 @@ entry:
   ret float %elt.degrees
 }
 
+; CHECK-LABEL: Begin function degrees_half
 define noundef half @degrees_half(half noundef %a) {
 entry:
 ; CHECK: %[[#float_16_arg:]] = OpFunctionParameter %[[#float_16]]
@@ -27,6 +29,7 @@ entry:
   ret half %elt.degrees
 }
 
+; CHECK-LABEL: Begin function degrees_double
 define noundef double @degrees_double(double noundef %a) {
 entry:
 ; CHECK: %[[#float_64_arg:]] = OpFunctionParameter %[[#float_64]]
@@ -35,6 +38,7 @@ entry:
   ret double %elt.degrees
 }
 
+; CHECK-LABEL: Begin function degrees_float_vector
 define noundef <4 x float> @degrees_float_vector(<4 x float> noundef %a) {
 entry:
 ; CHECK: %[[#vec4_float_32_arg:]] = OpFunctionParameter %[[#vec4_float_32]]
@@ -43,6 +47,7 @@ entry:
   ret <4 x float> %elt.degrees
 }
 
+; CHECK-LABEL: Begin function degrees_half_vector
 define noundef <4 x half> @degrees_half_vector(<4 x half> noundef %a) {
 entry:
 ; CHECK: %[[#vec4_float_16_arg:]] = OpFunctionParameter %[[#vec4_float_16]]
@@ -51,6 +56,7 @@ entry:
   ret <4 x half> %elt.degrees
 }
 
+; CHECK-LABEL: Begin function degrees_double_vector
 define noundef <4 x double> @degrees_double_vector(<4 x double> noundef %a) {
 entry:
 ; CHECK: %[[#vec4_float_64_arg:]] = OpFunctionParameter %[[#vec4_float_64]]

>From b7a20c9a217400d44d5b84df771a4d47d5f89bba Mon Sep 17 00:00:00 2001
From: Finn Plummer 
Date: Thu, 10 Oct 2024 11:56:58 -0700
Subject: [PATCH 3/3] clang format

---
 clang/lib/CodeGen/CGBuiltin.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 23ea78337d6651..ff678ee04f9c2a 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -18759,11 +18759,10 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned 
BuiltinID,
 Value *X = EmitScalarExpr(E->getArg(0));
 
 assert(E->getArg(0)->getType()->hasFloatingRepresentation() &&
-"degree operand must have a float representation");
+   "degree operand must have a float representation");
 
 return Builder.CreateIntrinsic(
-/*ReturnType=*/X->getType(),
-CGM.getHLSLRuntime().getDegreesIntrinsic(),
+/*ReturnType=*/X->getType(), 
CGM.getHLSLRuntime().getDegreesIntrinsic(),
 ArrayRef{X}, nullptr, "hlsl.degrees");
   }
   case Builtin::BI__builtin_hlsl_elementwise_frac: {

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Switch DirectX Target to use the Itanium ABI (PR #111632)

2024-10-10 Thread Greg Roth via cfe-commits

https://github.com/pow2clk closed 
https://github.com/llvm/llvm-project/pull/111632
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang] Remove the deprecated flag `-frelaxed-template-template-args`. (PR #111894)

2024-10-10 Thread Erich Keane via cfe-commits

erichkeane wrote:

I THINK I'd still prefer to keep this flag for 1 more release. Our mitigations 
/P3310 haven't been in a release cycle yet, so I'd prefer we wait until after 
the 20 release to flip this switch.

https://github.com/llvm/llvm-project/pull/111894
_______
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang] Remove the deprecated flag `-frelaxed-template-template-args`. (PR #111894)

2024-10-10 Thread via cfe-commits
emplate/cwg2398.cpp
index 3825239de4a285..fb4df2edb51a01 100644
--- a/clang/test/SemaTemplate/cwg2398.cpp
+++ b/clang/test/SemaTemplate/cwg2398.cpp
@@ -1,14 +1,12 @@
-// RUN: %clang_cc1 %s -fsyntax-only -std=c++23 
-verify=expected,new
-// RUN: %clang_cc1 %s -fsyntax-only -std=c++23 
-fno-relaxed-template-template-args -verify=expected,old
+// RUN: %clang_cc1 %s -fsyntax-only -std=c++23 -verify
 
 namespace issue1 {
   template class B {};
   template class P, class T> void f(P);
-  // new-note@-1 {{deduced type 'B<[...], (default) int>' of 1st parameter 
does not match adjusted type 'B<[...], float>' of argument [with P = B, T = 
int]}}
-  // old-note@-2 2{{template template argument has different template 
parameters}}
+  // expected-note@-1 {{deduced type 'B<[...], (default) int>' of 1st 
parameter does not match adjusted type 'B<[...], float>' of argument [with P = 
B, T = int]}}
 
   void g() {
-f(B()); // old-error {{no matching function for call}}
+f(B());
 f(B()); // expected-error {{no matching function for call}}
   }
 } // namespace issue1
@@ -116,41 +114,32 @@ namespace gcc_issue {
   template struct A;
 
   template class TT1, class T2> struct A, typename 
TT1::type>;
-  // new-note@-1 {{partial specialization matches}}
+  // expected-note@-1 {{partial specialization matches}}
 
   template class TT2, class T5, class T6>
   struct A, typename TT2::type>;
-  // new-note@-1 {{partial specialization matches}}
-  // old-note@-2 {{template is declared here}}
+  // expected-note@-1 {{partial specialization matches}}
 
   template  struct B { using type = int; };
 
   template struct A, int>;
-  // new-error@-1 {{ambiguous partial specializations}}
-  // old-error@-2 {{explicit instantiation of undefined template}}
+  // expected-error@-1 {{ambiguous partial specializations}}
 } // namespace gcc_issue
 
 namespace ttp_defaults {
   template  class TT1> struct A {};
-  // old-note@-1 2{{previous template template parameter}}
 
   template  class TT2> void f(A);
-  // new-note@-1 {{explicit instantiation candidate}}
-  // old-note@-2 {{invalid explicitly-specified argument for template 
parameter 'TT2'}}
+  // expected-note@-1 {{explicit instantiation candidate}}
 
   // FIXME: The default arguments on the TTP are not available during partial 
ordering.
   template  class TT3> void f(A) 
{};...
[truncated]

``




https://github.com/llvm/llvm-project/pull/111894
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[MariaDB commits] [PATCH] MDEV-35019 Provide a way to enable "rollback XA on disconnect" behavior we had before 10.5.2

2024-10-10 Thread Kristian Nielsen via commits
in_subquery_conversion_threshold;
   ulong optimizer_max_sel_arg_weight;
   ulonglong max_rowid_filter_size;
+  my_bool legacy_xa_rollback_at_disconnect;
 
   vers_asof_timestamp_t vers_asof_timestamp;
   ulong vers_alter_history;
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index 9a4180ae000..18374544126 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -6761,3 +6761,13 @@ static Sys_var_ulonglong Sys_max_rowid_filter_size(
SESSION_VAR(max_rowid_filter_size), CMD_LINE(REQUIRED_ARG),
VALID_RANGE(1024, (ulonglong)~(intptr)0), DEFAULT(128*1024),
BLOCK_SIZE(1));
+
+static Sys_var_mybool Sys_legacy_xa_rollback_at_disconnect(
+   "legacy_xa_rollback_at_disconnect",
+   "If a user session disconnects after putting a transaction into the XA "
+   "PREPAREd state, roll back the transaction. Can be used for backwards "
+   "compatibility to enable this pre-10.5 behavior for applications that "
+   "expect it. Note that this violates the XA specification and should not 
"
+   "be used for new code",
+   SESSION_VAR(legacy_xa_rollback_at_disconnect), CMD_LINE(OPT_ARG),
+   DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG);
diff --git a/sql/xa.h b/sql/xa.h
index 0b2d0696642..4260033d0fb 100644
--- a/sql/xa.h
+++ b/sql/xa.h
@@ -45,6 +45,7 @@ bool xid_cache_insert(XID *xid);
 bool xid_cache_insert(THD *thd, XID_STATE *xid_state, XID *xid);
 void xid_cache_delete(THD *thd, XID_STATE *xid_state);
 
+bool xa_trans_force_rollback(THD *thd);
 bool trans_xa_start(THD *thd);
 bool trans_xa_end(THD *thd);
 bool trans_xa_prepare(THD *thd);
-- 
2.39.2

___
commits mailing list -- commits@lists.mariadb.org
To unsubscribe send an email to commits-le...@lists.mariadb.org


<    8   9   10   11   12   13   14   15   16   17   >