[clang] [clang-format] Add null-terminated path option (#123921) (PR #123926)

2025-01-26 Thread Owen Pan via cfe-commits
@@ -869,5 +876,12 @@ def convert_string(bytes_input): return str(bytes_input) +def print_filename(filename, null=False): +if null: +print(filename + "\0", end="") +else: +print("%s" % filename) owenca wrote: ```suggestion

[clang] [clang-format] Add null-terminated path option (#123921) (PR #123926)

2025-01-26 Thread Owen Pan via cfe-commits
@@ -261,14 +267,14 @@ def main(): "ignored by clang-format):" ) for filename in ignored_files: -print("%s" % filename) +print_filename(filename, opts.null) owenca wrote: ```suggestion

[clang] [clang-format] Add null-terminated path option (#123921) (PR #123926)

2025-01-26 Thread Owen Pan via cfe-commits
@@ -869,5 +875,12 @@ def convert_string(bytes_input): return str(bytes_input) +def print_filename(filename, null=False): +if null: +print(filename + "\0", end="") owenca wrote: > Shouldn't you copy the the indentation of the printed files

[clang] [clang-format] Add null-terminated path option (#123921) (PR #123926)

2025-01-26 Thread Owen Pan via cfe-commits
@@ -205,6 +205,12 @@ def main(): "commits" ), ) +p.add_argument( +"-0", +"--null", owenca wrote: Please move it (and `--diff_from_common_commit` above) up to keep the options sorted. I would use `--print0` (without

[clang] [clang-format] Add null-terminated path option (#123921) (PR #123926)

2025-01-26 Thread Owen Pan via cfe-commits
@@ -205,6 +205,12 @@ def main(): "commits" ), ) +p.add_argument( +"-0", +"--null", +action="store_true", +help="print the affected paths with null-terminated characters", owenca wrote: ```suggestion

[clang] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124447)

2025-01-26 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/124447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124446)

2025-01-26 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/124446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis edited https://github.com/llvm/llvm-project/pull/120900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis requested changes to this pull request. Phew, first round in. Please don't take the number of suggestions as a negative, the basic structure looks good there's just many small tweaks to be made :). https://github.com/llvm/llvm-project/pull/120900 ___

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [Clang] Correctly determine constexprness of dependent lambdas. (PR #124468)

2025-01-26 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. Makes sense. After thinking about this for a bit, I don’t think there is a reason why we’d ever need to care about the parent context at all for the purpose of determining `constexpr`ness, is there? https://github.com/llvm/llvm-project/pu

[clang] [Clang] Correctly determine constexprness of dependent lambdas. (PR #124468)

2025-01-26 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/124468 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correctly determine constexprness of dependent lambdas. (PR #124468)

2025-01-26 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/124468 We skipped checking if a lambda is constexpr if the parent context was dependent, even if the lambda itself wasn't (and there is no other opportunity to establish constexprness) >From bf293df31802bdfd6b5fdbdf

[clang] [Clang] Correctly determine constexprness of dependent lambdas. (PR #124468)

2025-01-26 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/124468 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correctly determine constexprness of dependent lambdas. (PR #124468)

2025-01-26 Thread via cfe-commits
@@ -2239,18 +2239,18 @@ ExprResult Sema::BuildLambdaExpr(SourceLocation StartLoc, SourceLocation EndLoc, Cleanup.mergeFrom(LambdaCleanup); - LambdaExpr *Lambda = LambdaExpr::Create(Context, Class, IntroducerRange, - CaptureDefault,

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [Clang] Correctly determine constexprness of dependent lambdas. (PR #124468)

2025-01-26 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/124468 >From bf293df31802bdfd6b5fdbdf87b142318a3ce567 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sun, 26 Jan 2025 15:22:19 +0100 Subject: [PATCH 1/2] [Clang] Correctly determine constexprness of dependent la

[clang] [Clang] Correctly determine constexprness of dependent lambdas. (PR #124468)

2025-01-26 Thread via cfe-commits
@@ -991,6 +991,7 @@ Bug Fixes to C++ Support - Fixed assertions or false compiler diagnostics in the case of C++ modules for lambda functions or inline friend functions defined inside templates (#GH122493). - Clang now rejects declaring an alias template with the same name a

[clang] [Clang] Add GCC's __builtin_stack_address() to Clang. (PR #121332)

2025-01-26 Thread via cfe-commits
aalhwc wrote: Ping https://github.com/llvm/llvm-project/pull/121332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correctly determine constexprness of dependent lambdas. (PR #124468)

2025-01-26 Thread via cfe-commits
@@ -2239,18 +2239,18 @@ ExprResult Sema::BuildLambdaExpr(SourceLocation StartLoc, SourceLocation EndLoc, Cleanup.mergeFrom(LambdaCleanup); - LambdaExpr *Lambda = LambdaExpr::Create(Context, Class, IntroducerRange, - CaptureDefault,

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely via cfe-commits
Maetveis wrote: > Hi @Maetveis . This is ready for review. > > There are a few things that I came across while making the script that I > should highlight : > > 1. clang -cc1 test directory > > > [test/Driver/lit.local.cfg](https://github.com/llvm/llvm-project/blob/e10d551aa482ee185a8021

[clang] [Clang] Correctly determine constexprness of dependent lambdas. (PR #124468)

2025-01-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Thanks https://github.com/llvm/llvm-project/pull/124468 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] only inherit the parent eval context inside of lambdas (PR #124426)

2025-01-26 Thread Timm Baeder via cfe-commits
@@ -35,6 +36,12 @@ inline bool isLambdaCallOperator(const DeclContext *DC) { return isLambdaCallOperator(cast(DC)); } +inline bool isLambdaMethod(const DeclContext *DC) { + if (auto *MD = dyn_cast_or_null(DC); MD) tbaederr wrote: ```suggestion if (const

[clang] e451429 - [Clang] Correctly determine constexprness of dependent lambdas. (#124468)

2025-01-26 Thread via cfe-commits
Author: cor3ntin Date: 2025-01-26T16:17:21+01:00 New Revision: e4514293f99962b47d881d5b40722c6b56a1f425 URL: https://github.com/llvm/llvm-project/commit/e4514293f99962b47d881d5b40722c6b56a1f425 DIFF: https://github.com/llvm/llvm-project/commit/e4514293f99962b47d881d5b40722c6b56a1f425.diff LOG:

[clang] [clang] Add dump() support for lvalue APValues (PR #124476)

2025-01-26 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/124476 >From 89b0e78879578fb740948badca141cf6acb21357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 26 Jan 2025 19:17:28 +0100 Subject: [PAT

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2025-01-26 Thread Michael Jabbour via cfe-commits
https://github.com/michael-jabbour-sonarsource updated https://github.com/llvm/llvm-project/pull/114240 >From cc3cf25da67c9f8b9edabb318c6011cad9bd2f58 Mon Sep 17 00:00:00 2001 From: Michael Jabbour Date: Tue, 29 Oct 2024 11:16:09 +0100 Subject: [PATCH 1/8] [NFC] Factor out RetireNodesFromMerged

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2025-01-26 Thread Michael Jabbour via cfe-commits
michael-jabbour-sonarsource wrote: @vsapsai Thanks again for the feedback :pray: > I've realized that the test doesn't have to be Objective-C, the failure is > reproducible in C. Curiously, we aren't hitting the assertion in > C++/Objective-C++ but I don't know why. I dug a bit into this tod

[clang] [StaticAnalyzer] Fix state update in VisitObjCForCollectionStmt (PR #124477)

2025-01-26 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 unassigned https://github.com/llvm/llvm-project/pull/124477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix createConstexprUnknownAPValues to use zero offset when ceating APValue (PR #124478)

2025-01-26 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-dylib` running on `linaro-flang-aarch64-dylib` while building `clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/50/builds/9430 Here is the relevant

[clang] [Clang] Fix createConstexprUnknownAPValues to use zero offset when ceating APValue (PR #124478)

2025-01-26 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik closed https://github.com/llvm/llvm-project/pull/124478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c9637af - [Clang] Fix createConstexprUnknownAPValues to use zero offset when ceating APValue (#124478)

2025-01-26 Thread via cfe-commits
Author: Shafik Yaghmour Date: 2025-01-26T15:06:26-08:00 New Revision: c9637afec7ed72904c74c2fc71e990d378f3d7a6 URL: https://github.com/llvm/llvm-project/commit/c9637afec7ed72904c74c2fc71e990d378f3d7a6 DIFF: https://github.com/llvm/llvm-project/commit/c9637afec7ed72904c74c2fc71e990d378f3d7a6.dif

[clang] [Clang] Fix createConstexprUnknownAPValues to use zero offset when ceating APValue (PR #124478)

2025-01-26 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `clang` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/12455 Here is the r

[clang] [Clang] Fix createConstexprUnknownAPValues to use zero offset when ceating APValue (PR #124478)

2025-01-26 Thread Shafik Yaghmour via cfe-commits
shafik wrote: First failure looks like a flaky build issue: https://github.com/llvm/llvm-project/issues/124485 https://github.com/llvm/llvm-project/pull/124478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-26 Thread Vlad Serebrennikov via cfe-commits
@@ -649,15 +649,15 @@ namespace cwg241 { // cwg241: 9 A::g<3>(b); C::f<3>(b); // expected-error@-1 {{no matching function for call to 'f'}} -// expected-note@#cwg241-C-f {{candidate template ignored: invalid explicitly-specified argument for template paramete

[clang] [llvm] [ubsan] Plumb through -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124211)

2025-01-26 Thread Vitaly Buka via cfe-commits
@@ -828,11 +828,34 @@ parseLowerAllowCheckPassOptions(StringRef Params) { StringRef ParamName; std::tie(ParamName, Params) = Params.split(';'); -return make_error( -formatv("invalid LowerAllowCheck pass parameter '{0}' ", ParamName) -.str(), -

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/122754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ubsan] Plumb through -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124211)

2025-01-26 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/124211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ubsan] Plumb through -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124211)

2025-01-26 Thread Vitaly Buka via cfe-commits
@@ -71,7 +72,8 @@ static void emitRemark(IntrinsicInst *II, OptimizationRemarkEmitter &ORE, static bool removeUbsanTraps(Function &F, const BlockFrequencyInfo &BFI, const ProfileSummaryInfo *PSI, - OptimizationRemarkEmi

[clang] [llvm] [ubsan] Plumb through -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124211)

2025-01-26 Thread Vitaly Buka via cfe-commits
@@ -108,14 +108,17 @@ static Value *getBoundsCheckCond(Value *Ptr, Value *InstVal, return Or; } -static CallInst *InsertTrap(BuilderTy &IRB, bool DebugTrapBB) { +static CallInst *InsertTrap(BuilderTy &IRB, bool DebugTrapBB, vitalybuka wrote: Changes in thi

[clang] [llvm] [ubsan] Plumb through -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124211)

2025-01-26 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/124211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ubsan] Plumb through -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124211)

2025-01-26 Thread Vitaly Buka via cfe-commits
@@ -81,21 +83,20 @@ static bool removeUbsanTraps(Function &F, const BlockFrequencyInfo &BFI, return *Rng; }; - auto ShouldRemoveHot = [&](const BasicBlock &BB) { -return HotPercentileCutoff.getNumOccurrences() && PSI && - PSI->isHotCountNthPercentile( -

[clang] [llvm] [ubsan] Plumb through -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124211)

2025-01-26 Thread Vitaly Buka via cfe-commits
@@ -81,21 +83,20 @@ static bool removeUbsanTraps(Function &F, const BlockFrequencyInfo &BFI, return *Rng; }; - auto ShouldRemoveHot = [&](const BasicBlock &BB) { -return HotPercentileCutoff.getNumOccurrences() && PSI && - PSI->isHotCountNthPercentile( -

[clang] [libcxxabi] [llvm] [Clang] Mangling of pack indexing type and expression for itanium (PR #123513)

2025-01-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 commented: Hmm, I'm unfamiliar with the libcxx/LLVM demangler part, but it does look like we're duplicating something. Can anyone explain why we have to do that? https://github.com/llvm/llvm-project/pull/123513 ___ cfe-commi

[clang] [libcxxabi] [llvm] [Clang] Mangling of pack indexing type and expression for itanium (PR #123513)

2025-01-26 Thread Younan Zhang via cfe-commits
@@ -1003,6 +1003,7 @@ Bug Fixes to C++ Support lambda functions or inline friend functions defined inside templates (#GH122493). - Clang now rejects declaring an alias template with the same name as its template parameter. (#GH123423) - Correctly determine the implicit cons

[clang] [libcxxabi] [llvm] [Clang] Mangling of pack indexing type and expression for itanium (PR #123513)

2025-01-26 Thread Younan Zhang via cfe-commits
@@ -4787,6 +4788,7 @@ void CXXNameMangler::mangleRequirement(SourceLocation RequiresExprLoc, void CXXNameMangler::mangleExpression(const Expr *E, unsigned Arity, bool AsTemplateArg) { + // clang-format off zyn0217 wrote:

[clang] [libcxxabi] [llvm] [Clang] Mangling of pack indexing type and expression for itanium (PR #123513)

2025-01-26 Thread Younan Zhang via cfe-commits
@@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-linux-gnu -std=c++2a | FileCheck %s + +namespace spaceship { + struct X {}; + struct Y {}; + int operator<=>(X, Y); + + // CHECK-LABEL: define {{.*}} @_ZN9spaceship1fIiEEvDTcmltcvNS_1YE_EcvNS_1XE_EcvT__EE

[clang] [libcxxabi] [llvm] [Clang] Mangling of pack indexing type and expression for itanium (PR #123513)

2025-01-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/123513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Treat uppercase identifiers after struct as macros (PR #124397)

2025-01-26 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/124397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-01-26 Thread Owen Pan via cfe-commits
owenca wrote: Please fix the warning: ``` clang/lib/Format/UnwrappedLineFormatter.cpp:681:31: warning: comparison of integers of different signs: 'typename iterator_traits::difference_type' (aka 'long') and 'const size_t' (aka 'const unsigned long') [-Wsign-compare] 681 | if (std::dista

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-01-26 Thread Owen Pan via cfe-commits
@@ -628,28 +632,36 @@ class LineJoiner { unsigned tryMergeNamespace(ArrayRef::const_iterator I, ArrayRef::const_iterator E, - unsigned Limit) { + unsigned Limit, bool OpenBraceWrapped) {

[clang] [experimental] Detect return-stack-addr using CFG (PR #124133)

2025-01-26 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/124133 >From 22990789b61e9f9d22e88a6b008eb3166fd1cb56 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Thu, 23 Jan 2025 15:47:39 + Subject: [PATCH 1/3] [experimental] Detect return-stack-addr using CFG --- .../A

[clang] [libcxxabi] [llvm] [Clang] Mangling of pack indexing type and expression for itanium (PR #123513)

2025-01-26 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/123513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxxabi] [llvm] [WIP][Clang] Mangling of pack indexing type and expression for itanium (PR #123513)

2025-01-26 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/123513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxxabi] [llvm] [Clang] Mangling of pack indexing type and expression for itanium (PR #123513)

2025-01-26 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/123513 >From 021dd65bb55249f49b80a005096a9baf08d64031 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sun, 19 Jan 2025 15:08:52 +0100 Subject: [PATCH] [Clang] Mangling of pack indexing type and expression for ita

[clang] [experimental] Detect return-stack-addr using CFG (PR #124133)

2025-01-26 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/124133 >From 22990789b61e9f9d22e88a6b008eb3166fd1cb56 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Thu, 23 Jan 2025 15:47:39 + Subject: [PATCH 1/3] [experimental] Detect return-stack-addr using CFG --- .../A

[clang] [libcxxabi] [llvm] [Clang] Mangling of pack indexing type and expression for itanium (PR #123513)

2025-01-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes See https://github.com/itanium-cxx-abi/cxx-abi/pull/198 and #112003 --- Full diff: https://github.com/llvm/llvm-project/pull/123513.diff 8 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+1) - (m

[clang] [libcxxabi] [llvm] [Clang] Mangling of pack indexing type and expression for itanium (PR #123513)

2025-01-26 Thread via cfe-commits
https://github.com/cor3ntin ready_for_review https://github.com/llvm/llvm-project/pull/123513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-26 Thread Vlad Serebrennikov via cfe-commits
@@ -649,15 +649,15 @@ namespace cwg241 { // cwg241: 9 A::g<3>(b); C::f<3>(b); // expected-error@-1 {{no matching function for call to 'f'}} -// expected-note@#cwg241-C-f {{candidate template ignored: invalid explicitly-specified argument for template paramete

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: The way you applied changes to C++ DR tests is good, but I think the diagnostic message would benefit from further wordsmithing. https://github.com/llvm/llvm-project/pull/122754 ___ cfe-commits mailing list cfe-co

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/122754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/122754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ubsan] Plumb through -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124211)

2025-01-26 Thread Thurston Dang via cfe-commits
@@ -828,11 +828,34 @@ parseLowerAllowCheckPassOptions(StringRef Params) { StringRef ParamName; std::tie(ParamName, Params) = Params.split(';'); -return make_error( -formatv("invalid LowerAllowCheck pass parameter '{0}' ", ParamName) -.str(), -

[clang] [llvm] [ubsan] Plumb through -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124211)

2025-01-26 Thread Vitaly Buka via cfe-commits
@@ -107,7 +108,18 @@ static bool removeUbsanTraps(Function &F, const BlockFrequencyInfo &BFI, case Intrinsic::allow_runtime_check: { ++NumChecksTotal; -bool ToRemove = ShouldRemove(BB); +bool ToRemove = ShouldRemoveRandom(); + +unsigned i

[clang] [llvm] [ubsan] Plumb through -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124211)

2025-01-26 Thread Vitaly Buka via cfe-commits
@@ -107,7 +108,18 @@ static bool removeUbsanTraps(Function &F, const BlockFrequencyInfo &BFI, case Intrinsic::allow_runtime_check: { ++NumChecksTotal; -bool ToRemove = ShouldRemove(BB); +bool ToRemove = ShouldRemoveRandom(); + +unsigned i

[clang] [llvm] [ubsan] Plumb through -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124211)

2025-01-26 Thread Vitaly Buka via cfe-commits
@@ -2,6 +2,14 @@ ; RUN: opt < %s -passes='function(lower-allow-check)' -S | FileCheck %s --check-prefixes=NOPROFILE ; RUN: opt < %s -passes='function(lower-allow-check)' -lower-allow-check-random-rate=0 -S | FileCheck %s --check-prefixes=NONE ; RUN: opt < %s -passes='function

[clang] [llvm] [ubsan] Plumb through -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124211)

2025-01-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/124211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Fix __array_rank queried type at template instantiation (PR #124491)

2025-01-26 Thread Robert Dazi via cfe-commits
https://github.com/v01dXYZ created https://github.com/llvm/llvm-project/pull/124491 The type being queried was left as a template type parameter, making the whole expression as dependent and thus not eligible to static_assert. Fixes #123498 >From 8283e34bb0144604e52196e0a69a56355eb51e43 Mon

[clang] [llvm] [ubsan] Plumb through -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124211)

2025-01-26 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka requested changes to this pull request. Lets move clang part into a new PR? https://github.com/llvm/llvm-project/pull/124211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [llvm] [ubsan] Plumb through -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124211)

2025-01-26 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/124211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Fix __array_rank queried type at template instantiation (PR #124491)

2025-01-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Robert Dazi (v01dXYZ) Changes The type being queried was left as a template type parameter, making the whole expression as dependent and thus not eligible to static_assert. Fixes #123498 --- Full diff: https://github.com/llvm/llvm-proje

[clang] [llvm] [ubsan] Plumb through -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124211)

2025-01-26 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/124211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

2025-01-26 Thread Jason Rice via cfe-commits
@@ -1523,9 +1570,25 @@ void Sema::CheckCompleteDecompositionDeclaration(DecompositionDecl *DD) { // If the type of the decomposition is dependent, then so is the type of // each binding. if (DecompType->isDependentType()) { -for (auto *B : DD->bindings()) - B->s

[clang] [clang][Sema] Unwrap reference types in HeuristicResolverImpl::resolveTypeToRecordDecl() (PR #124451)

2025-01-26 Thread Younan Zhang via cfe-commits
@@ -133,8 +133,8 @@ TemplateName getReferencedTemplateName(const Type *T) { CXXRecordDecl *HeuristicResolverImpl::resolveTypeToRecordDecl(const Type *T) { assert(T); - // Unwrap type sugar such as type aliases. - T = T->getCanonicalTypeInternal().getTypePtr(); + // Unwrap

[clang] [TableGen] Avoid repeated map lookups (NFC) (PR #124448)

2025-01-26 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/124448 >From 2273e9e518fa5625a40298a970dfd3ad1c3f27db Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 25 Jan 2025 16:07:33 -0800 Subject: [PATCH 1/3] [TableGen] Avoid repeated map lookups (NFC) This patch

[clang] [TableGen] Avoid repeated map lookups (NFC) (PR #124448)

2025-01-26 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: > Can't this use DenseSet? It looks like the names here live for the lifetime > of the set. Good idea! Revised. https://github.com/llvm/llvm-project/pull/124448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [TableGen] Avoid repeated map lookups (NFC) (PR #124448)

2025-01-26 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/124448 >From 2273e9e518fa5625a40298a970dfd3ad1c3f27db Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 25 Jan 2025 16:07:33 -0800 Subject: [PATCH 1/2] [TableGen] Avoid repeated map lookups (NFC) This patch

[clang] [TableGen] Avoid repeated map lookups (NFC) (PR #124448)

2025-01-26 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata edited https://github.com/llvm/llvm-project/pull/124448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add null-terminated path option (#123921) (PR #123926)

2025-01-26 Thread Nikolaos Chatzikonstantinou via cfe-commits
https://github.com/createyourpersonalaccount updated https://github.com/llvm/llvm-project/pull/123926 >From 9dfbb9a3cc7f6bc557bc1ccf25cc727a02c4274c Mon Sep 17 00:00:00 2001 From: Nikolaos Chatzikonstantinou Date: Wed, 22 Jan 2025 05:43:02 -0500 Subject: [PATCH 1/4] [clang-format] Add null-term

[clang] [AArch64] Enable vscale_range with +sme (PR #124466)

2025-01-26 Thread David Green via cfe-commits
https://github.com/davemgreen created https://github.com/llvm/llvm-project/pull/124466 If we have +sme but not +sve, we would not set vscale_range on functions. It should be valid to apply it with the same range with just +sme, which can help improve the performance of generated code. >From 7

[clang] [AArch64] Enable vscale_range with +sme (PR #124466)

2025-01-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: David Green (davemgreen) Changes If we have +sme but not +sve, we would not set vscale_range on functions. It should be valid to apply it with the same range with just +sme, which can help improve the performance of generated co

[clang] [cindex] Add API to query the class methods of a type (PR #123539)

2025-01-26 Thread Trevor Laughlin via cfe-commits
https://github.com/trelau updated https://github.com/llvm/llvm-project/pull/123539 >From bb0542e8f2ad50892ee9d2c1f76ec1def85c3e56 Mon Sep 17 00:00:00 2001 From: Trevor Laughlin Date: Sun, 19 Jan 2025 19:21:10 -0500 Subject: [PATCH] [cindex] Add API to query the class methods of a type --- cla

[clang] [AArch64] Enable vscale_range with +sme (PR #124466)

2025-01-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: David Green (davemgreen) Changes If we have +sme but not +sve, we would not set vscale_range on functions. It should be valid to apply it with the same range with just +sme, which can help improve the performance of generated code. --- F

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-26 Thread Carlo Cabrera via cfe-commits
@@ -1886,6 +1886,11 @@ def fprofile_update_EQ : Joined<["-"], "fprofile-update=">, Values<"atomic,prefer-atomic,single">, MetaVarName<"">, HelpText<"Set update method of profile counters">, MarshallingInfoFlag>; +def fprofile_continuous : Flag<["-"], "fprofile-cont

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

  1   2   3   >