[clang] [NFC][Clang] Use StringRef instead of string in ClangDiagnosticEmitter (PR #115959)

2024-11-13 Thread Rahul Joshi via cfe-commits
@@ -117,15 +118,15 @@ namespace { return CategoryIDs[CategoryString]; } -typedef std::vector::const_iterator const_iterator; +typedef std::vector::const_iterator const_iterator; const_iterator begin() const { return CategoryStrings.begin(); } const_

[clang] [NFC][Clang] Use StringRef and range for loops in SA/Syntax Emitters (PR #115972)

2024-11-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/115972 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Use StringRef instead of string in ClangDiagnosticEmitter (PR #115959)

2024-11-13 Thread Rahul Joshi via cfe-commits
@@ -145,7 +146,7 @@ static bool diagGroupBeforeByName(const Record *LHS, const Record *RHS) { RHS->getValueAsString("GroupName"); } -using DiagsInGroupTy = std::map>; +using DiagsInGroupTy = std::map>; jurahul wrote: Done. https://github.com/llvm/l

[clang] [NFC][Clang] Use StringRef instead of string in ClangDiagnosticEmitter (PR #115959)

2024-11-13 Thread Rahul Joshi via cfe-commits
@@ -158,21 +159,19 @@ static void groupDiagnostics(ArrayRef Diags, continue; assert(R->getValueAsDef("Class")->getName() != "CLASS_NOTE" && "Note can't be in a DiagGroup"); -std::string GroupName = -std::string(DI->getDef()->getValueAsString("G

[clang] [NFC][Clang] Use StringRef instead of string in ClangDiagnosticEmitter (PR #115959)

2024-11-13 Thread Rahul Joshi via cfe-commits
@@ -145,7 +146,7 @@ static bool diagGroupBeforeByName(const Record *LHS, const Record *RHS) { RHS->getValueAsString("GroupName"); } -using DiagsInGroupTy = std::map>; +using DiagsInGroupTy = std::map>; jurahul wrote: Will do, I see that you added th

[clang] [NFC][Clang] Use StringRef instead of string in ClangDiagnosticEmitter (PR #115959)

2024-11-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/115959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Remove references to deleted `ClangFormattedStatus` file (PR #114331)

2024-10-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/114331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Remove references to deleted `ClangFormattedStatus` file (PR #114331)

2024-10-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/114331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Remove referenced to deleted `ClangFormattedStatus` file (PR #114331)

2024-10-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/114331 None >From 466b99a4d2f53daeecb4d0cfeb3ed5a05c2af03e Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 30 Oct 2024 16:51:36 -0700 Subject: [PATCH] [NFC] Remove referenced to deleted `ClangFormattedStatus` f

[clang] [NFC] Delete unused clang-formatted-file.txt/ClangFormattedStatus.rst files (PR #109220)

2024-10-29 Thread Rahul Joshi via cfe-commits
jurahul wrote: @AaronBallman go ahead with the merge since @owenca has approved? https://github.com/llvm/llvm-project/pull/109220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Refactor ClangDiagnosticEmitter to use more StringRef (PR #115212)

2024-11-08 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/115212 >From 381cb66fbf539bb122a9970efca85fdce75f1b36 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 6 Nov 2024 11:22:55 -0800 Subject: [PATCH] [Clang] Refactor ClangDiagnosticEmitter to use more StringRef Refa

[clang] [NFC][Clang] Use range for loops in ClangDiagnosticsEmitter (PR #115573)

2024-11-12 Thread Rahul Joshi via cfe-commits
@@ -185,10 +174,8 @@ static void groupDiagnostics(ArrayRef Diags, } // Assign unique ID numbers to the groups. - unsigned IDNo = 0; - for (std::map::iterator - I = DiagsInGroup.begin(), E = DiagsInGroup.end(); I != E; ++I, ++IDNo) -I->second.IDNo = IDNo; + fo

[clang] [NFC][Clang] Use range for loops in ClangDiagnosticsEmitter (PR #115573)

2024-11-12 Thread Rahul Joshi via cfe-commits
@@ -468,11 +442,9 @@ static StringRef getModifierName(ModifierType MT) { return "objcclass"; case MT_ObjCInstance: return "objcinstance"; - case MT_Unknown: + default: jurahul wrote: Thanks. I'll revert this back. https://github.com/llvm/llvm-proj

[clang] [NFC][Clang] Use range for loops in ClangDiagnosticsEmitter (PR #115573)

2024-11-12 Thread Rahul Joshi via cfe-commits
@@ -970,10 +942,11 @@ struct DiagTextPrinter : DiagTextVisitor { void VisitPlural(PluralPiece *P) { Result += "%plural{"; assert(P->Options.size() == P->OptionPrefixes.size()); -for (unsigned I = 0, End = P->Options.size(); I < End; ++I) { - if (P->OptionPre

[clang] [NFC][Clang] Use range for loops in ClangDiagnosticsEmitter (PR #115573)

2024-11-12 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/115573 >From 635b24a4e057d85de6c2935ed817b93b34916ed3 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Fri, 8 Nov 2024 16:04:53 -0800 Subject: [PATCH] [NFC][Clang] Use range for loops in ClangDiagnosticsEmitter Use ra

[clang] [NFC][Clang] Use range for loops in ClangDiagnosticsEmitter (PR #115573)

2024-11-12 Thread Rahul Joshi via cfe-commits
@@ -468,11 +442,9 @@ static StringRef getModifierName(ModifierType MT) { return "objcclass"; case MT_ObjCInstance: return "objcinstance"; - case MT_Unknown: + default: jurahul wrote: Done now. https://github.com/llvm/llvm-project/pull/115573 _

[clang] [NFC][Clang] Use range for loops in ClangDiagnosticsEmitter (PR #115573)

2024-11-12 Thread Rahul Joshi via cfe-commits
@@ -1553,15 +1526,13 @@ static void emitDiagSubGroups(std::map &DiagsInGroup, RecordVec &GroupsInPedantic, raw_ostream &OS) { OS << "static const int16_t DiagSubGroups[] = {\n" << " /* Empty */ -1,\n"; - for (auto const &I : DiagsInGroup)

[clang] [NFC][Clang] Use range for loops in ClangDiagnosticsEmitter (PR #115573)

2024-11-12 Thread Rahul Joshi via cfe-commits
@@ -1553,15 +1526,13 @@ static void emitDiagSubGroups(std::map &DiagsInGroup, RecordVec &GroupsInPedantic, raw_ostream &OS) { OS << "static const int16_t DiagSubGroups[] = {\n" << " /* Empty */ -1,\n"; - for (auto const &I : DiagsInGroup)

[clang] [NFC][Clang] Use range for loops in ClangDiagnosticsEmitter (PR #115573)

2024-11-12 Thread Rahul Joshi via cfe-commits
@@ -970,10 +942,11 @@ struct DiagTextPrinter : DiagTextVisitor { void VisitPlural(PluralPiece *P) { Result += "%plural{"; assert(P->Options.size() == P->OptionPrefixes.size()); -for (unsigned I = 0, End = P->Options.size(); I < End; ++I) { - if (P->OptionPre

[clang] [NFC][Clang] Use range for loops in ClangDiagnosticsEmitter (PR #115573)

2024-11-12 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/115573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Use range for loops in ClangDiagnosticsEmitter (PR #115573)

2024-11-12 Thread Rahul Joshi via cfe-commits
@@ -1553,15 +1526,13 @@ static void emitDiagSubGroups(std::map &DiagsInGroup, RecordVec &GroupsInPedantic, raw_ostream &OS) { OS << "static const int16_t DiagSubGroups[] = {\n" << " /* Empty */ -1,\n"; - for (auto const &I : DiagsInGroup)

[clang] [NFC] Delete unused clang-formatted-files.txt file (PR #109220)

2024-09-18 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/109220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Delete unused clang-formatted-files.txt file (PR #109220)

2024-09-18 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/109220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Support] Add scaling support in `indent` (PR #109478)

2024-09-20 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/109478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Support] Add scaling support in `indent` (PR #109478)

2024-09-23 Thread Rahul Joshi via cfe-commits
@@ -774,18 +774,27 @@ class buffer_unique_ostream : public raw_svector_ostream { // you can use // OS << indent(6) << "more stuff"; // which has better ergonomics (and clang-formats better as well). +// +// If indentation is always in increments of a fixed value, you can use Sc

[clang] [NFC] Delete unused clang-formatted-files.txt file (PR #109220)

2024-09-23 Thread Rahul Joshi via cfe-commits
jurahul wrote: @AaronBallman WDTY? The motivation of the change is that I see most of the changes in this file are a result of folks adding or deleting files, so its one less thing to take care of when doing so. Also the current list of files in this file is incomplete, further proving that th

[clang] [llvm] [mlir] [LLVM][TableGen] Change SeachableTableEmitter to use const RecordKeeper (PR #110032)

2024-09-25 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/110032 >From 934b0bd5934327429d0b878a9ece8a0c61e89400 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 25 Sep 2024 09:53:45 -0700 Subject: [PATCH] [LLVM][TableGen] Change SeachableTableEmitter to use const Record

[clang] [llvm] [mlir] [LLVM][TableGen] Change SeachableTableEmitter to use const RecordKeeper (PR #110032)

2024-09-25 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/110032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Support] Add scaling support in `indent` (PR #109478)

2024-09-20 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/109478 >From 31194fd2fc1dbc2918fe60e4de7198517ff821a3 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Fri, 20 Sep 2024 14:04:25 -0700 Subject: [PATCH] [Support] Add scaling support in `indent` Scaled indent is useful

[clang] [llvm] [mlir] [LLVM][TableGen] Change SeachableTableEmitter to use const RecordKeeper (PR #110032)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/110032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [LLVM][TableGen] Change SeachableTableEmitter to use const RecordKeeper (PR #110032)

2024-09-30 Thread Rahul Joshi via cfe-commits
@@ -1556,7 +1557,7 @@ class RecordVal { bool IsUsed = false; /// Reference locations to this record value. - SmallVector ReferenceLocs; + mutable SmallVector ReferenceLocs; jurahul wrote: This was needed because the Record * pointers in `RecordRecTy::ge

[clang] [llvm] [mlir] [LLVM][TableGen] Change SeachableTableEmitter to use const RecordKeeper (PR #110032)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/110032 >From 3997e8872197ac0b296ef2f22b6e6e928baa9fca Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 25 Sep 2024 09:53:45 -0700 Subject: [PATCH] [LLVM][TableGen] Change SeachableTableEmitter to use const Record

[clang] [llvm] [mlir] [LLVM][TableGen] Change SeachableTableEmitter to use const RecordKeeper (PR #110032)

2024-09-30 Thread Rahul Joshi via cfe-commits
@@ -1556,7 +1557,7 @@ class RecordVal { bool IsUsed = false; /// Reference locations to this record value. - SmallVector ReferenceLocs; + mutable SmallVector ReferenceLocs; jurahul wrote: Done. PTAL https://github.com/llvm/llvm-project/pull/110032

[clang] [llvm] [mlir] [LLVM][TableGen] Change SeachableTableEmitter to use const RecordKeeper (PR #110032)

2024-09-30 Thread Rahul Joshi via cfe-commits
jurahul wrote: I have the fix for LIBC build failure in flight. Will commit once its approved (or when checks complete). Pre-commit builds do not seem to build this target. https://github.com/llvm/llvm-project/pull/110032 ___ cfe-commits mailing list

[clang] [Clang][TableGen] Change ClangAttrEmitter to use const Record * (PR #110584)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/110584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] [mlir] [TableGen] Change TableGenMain to use const RecordKeeper (PR #110578)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/110578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Change ClangAttrEmitter to use const Record * (PR #110584)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/110584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] [mlir] [TableGen] Change TableGenMain to use const RecordKeeper (PR #110578)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/110578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Change ClangDiagnosticEmitter to use const Record * (PR #110585)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/110585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Change ClangDiagnosticEmitter to use const Record * (PR #110585)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/110585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Change ClangDiagnosticEmitter to use const Record * (PR #110585)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/110585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Change Opcodes Emitter to use const Record * (PR #110588)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/110588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Change NeonEmitter to use const Record * (PR #110597)

2024-10-01 Thread Rahul Joshi via cfe-commits
@@ -1161,11 +1161,9 @@ void SVEEmitter::createIntrinsic( uint64_t Merge = R->getValueAsInt("Merge"); StringRef MergeSuffix = R->getValueAsString("MergeSuffix"); uint64_t MemEltType = R->getValueAsInt("MemEltType"); - std::vector FlagsList = R->getValueAsListOfDefs("Flags

[clang] [Clang][TableGen] Change NeonEmitter to use const Record * (PR #110597)

2024-10-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/110597 >From 7d9e44f13483c4a801ec7895aa231e4b7e11e223 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Mon, 30 Sep 2024 15:55:03 -0700 Subject: [PATCH] [Clang][TableGen] Change NeonEmitter to use const Record * --- c

[clang] [clang-tools-extra] [flang] [lld] [lldb] [llvm] [NFC] Rename Option parsing related files from OptXYZ -> OptionXYZ (PR #110692)

2024-10-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/110692 Rename option parsing related files from OptXYZ -> OptionXYZ, since Opt could be confused with optimization and Opt as a short hand for Option is not really that smaller to warrant its use. >From 7ee776230f113

[clang] [Clang][TableGen] Change OptionDoc Emitter to use const Record * (PR #110592)

2024-10-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/110592 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Change NeonEmitter to use const Record * (PR #110597)

2024-10-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/110597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Change SACheckersEmitter to use const Record * (PR #110596)

2024-10-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/110596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Change SACheckersEmitter to use const Record * (PR #110596)

2024-10-01 Thread Rahul Joshi via cfe-commits
jurahul wrote: @kazutakahirata would appreciate if you can look at this smaller one as well. https://github.com/llvm/llvm-project/pull/110596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [libc] [llvm] [mlir] [TableGen] Change TableGenMain to use const RecordKeeper (PR #110578)

2024-10-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/110578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] [mlir] [TableGen] Change `getValueAsListOfDefs` return const pointer vector (PR #110713)

2024-10-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/110713 Change `getValueAsListOfDefs` to return a vector of const Record pointer, and remove `getValueAsListOfConstDefs` that was added as a transition aid. >From a2025446594a0029033e2950d7bbd027f3860865 Mon Sep 17 00:

[clang] [libc] [llvm] [mlir] [TableGen] Change TableGenMain to use const RecordKeeper (PR #110578)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/110578 Change TableGenMain's `MainFn` argument to be a function that accepts a const reference to RecordKeeper. >From 40ad0205938492a163b6c261b7c46a78b7e65e32 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Mon, 30

[clang] [Clang][TableGen] Change NeonEmitter to use const Record * (PR #110597)

2024-10-01 Thread Rahul Joshi via cfe-commits
@@ -1195,10 +1193,10 @@ void SVEEmitter::createIntrinsic( for (auto TS : TypeSpecs) { // Collate a list of range/option checks for the immediates. SmallVector ImmChecks; -for (auto *R : ImmCheckList) { - int64_t ArgIdx = R->getValueAsInt("ImmArgIdx"); -

[clang] [Clang][TableGen] Change Opcodes Emitter to use const Record * (PR #110588)

2024-10-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/110588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Change NeonEmitter to use const Record * (PR #110597)

2024-10-01 Thread Rahul Joshi via cfe-commits
@@ -1161,11 +1161,9 @@ void SVEEmitter::createIntrinsic( uint64_t Merge = R->getValueAsInt("Merge"); StringRef MergeSuffix = R->getValueAsString("MergeSuffix"); uint64_t MemEltType = R->getValueAsInt("MemEltType"); - std::vector FlagsList = R->getValueAsListOfDefs("Flags

[clang] [Clang][TableGen] Change NeonEmitter to use const Record * (PR #110597)

2024-10-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/110597 >From 8887de9f0cd4fda51c4e1945fa40a4c1fc5775af Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Mon, 30 Sep 2024 15:55:03 -0700 Subject: [PATCH] [Clang][TableGen] Change NeonEmitter to use const Record * --- c

[clang] [Clang][TableGen] Change NeonEmitter to use const Record * (PR #110597)

2024-10-01 Thread Rahul Joshi via cfe-commits
jurahul wrote: Thanks! https://github.com/llvm/llvm-project/pull/110597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Change OptionDoc Emitter to use const Record * (PR #110592)

2024-10-01 Thread Rahul Joshi via cfe-commits
jurahul wrote: @kazutakahirata would appreciate if you can look at this smaller one as well. https://github.com/llvm/llvm-project/pull/110592 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [Clang][TableGen] Change ClangDiagnosticEmitter to use const Record * (PR #110585)

2024-10-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/110585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Change ClangAttrEmitter to use const Record * (PR #110584)

2024-10-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/110584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Change ClangAttrEmitter to use const Record * (PR #110584)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/110584 None >From 26576dbe94bbe9885b01ca66c97f9ccbc87ec471 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Mon, 30 Sep 2024 15:04:17 -0700 Subject: [PATCH] [Clang][TableGen] Change ClangAttrEmitter to use const Recor

[clang] [Clang][TableGen] Change ClangDiagnosticEmutter to use const Record * (PR #110585)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/110585 None >From a4aac38b8ce3f8e6a4f16790bc5d231a4e1635a0 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Mon, 30 Sep 2024 15:15:06 -0700 Subject: [PATCH] [Clang][TableGen] Change ClangDiagnosticEmutter to use const

[clang] [Clang][TableGen] Change Opcodes Emitter to use const Record * (PR #110588)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/110588 None >From 46ab6ac668a50ebe46cb2a69ead5d3808250e26e Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Mon, 30 Sep 2024 15:23:11 -0700 Subject: [PATCH] [Clang][TableGen] Change Opcodes Emitter to use const Record

[clang] [Clang][LLVM] Change OpenCL Emitter to use const Record * (PR #110590)

2024-10-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/110590 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [flang] [lld] [lldb] [llvm] [NFC] Rename Option parsing related files from OptXYZ -> OptionXYZ (PR #110692)

2024-10-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/110692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] [mlir] [TableGen] Change `getValueAsListOfDefs` return const pointer vector (PR #110713)

2024-10-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/110713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] [mlir] [TableGen] Change `getValueAsListOfDefs` to return const pointer vector (PR #110713)

2024-10-01 Thread Rahul Joshi via cfe-commits
jurahul wrote: Thanks @River707 https://github.com/llvm/llvm-project/pull/110713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] [mlir] [TableGen] Change `getValueAsListOfDefs` to return const pointer vector (PR #110713)

2024-10-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/110713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] [mlir] [TableGen] Change `getValueAsListOfDefs` to return const pointer vector (PR #110713)

2024-10-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/110713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] [mlir] [TableGen] Change `getValueAsListOfDefs` return const pointer vector (PR #110713)

2024-10-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/110713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [TableGen] Change `DefInit::Def` to a const Record pointer (PR #110747)

2024-10-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/110747 None >From 81a1ee1b8d09f22a4700b8e5dd59278759f59f8f Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Tue, 1 Oct 2024 12:05:15 -0700 Subject: [PATCH] [TableGen] Change `DefInit::Def` to a const Record pointer -

[clang] [llvm] [mlir] [TableGen] Change `DefInit::Def` to a const Record pointer (PR #110747)

2024-10-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/110747 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Delete unused clang-formatted-files.txt file (PR #109220)

2024-09-19 Thread Rahul Joshi via cfe-commits
jurahul wrote: May be. Even in that PR, the only reference to this file is: ``` CLEAN_FILE = os.path.join(CLANG_DIR, 'docs/tools/clang-formatted-files.txt') cleanfiles = open(CLEAN_FILE, "wb") ``` So its overwritten. But yeah, let @mydeveloperday confirm. https://github.com/llvm/llvm-project/

[clang] [llvm] [mlir] [TableGen] Change `DefInit::Def` to a const Record pointer (PR #110747)

2024-10-02 Thread Rahul Joshi via cfe-commits
@@ -1660,7 +1660,7 @@ class Record { // this record. SmallVector Locs; SmallVector ForwardDeclarationLocs; - SmallVector ReferenceLocs; + mutable SmallVector ReferenceLocs; jurahul wrote: This was needed in `ParseIDValue`: ``` if (Init *I = Records.

[clang] [llvm] [mlir] [TableGen] Change `DefInit::Def` to a const Record pointer (PR #110747)

2024-10-02 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/110747 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [TableGen] Change `DefInit::Def` to a const Record pointer (PR #110747)

2024-10-02 Thread Rahul Joshi via cfe-commits
@@ -1660,7 +1660,7 @@ class Record { // this record. SmallVector Locs; SmallVector ForwardDeclarationLocs; - SmallVector ReferenceLocs; + mutable SmallVector ReferenceLocs; jurahul wrote: No, this is for another case. Essentially, `appendReferenceLoc`

[clang] [llvm] [mlir] [TableGen] Change `DefInit::Def` to a const Record pointer (PR #110747)

2024-10-02 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/110747 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [NFC][TableGen] Change `Record::getSuperClasses` to use const Record* (PR #110845)

2024-10-02 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/110845 >From fe014ebcc74ca32fc5dddea31589473126b5c766 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 2 Oct 2024 07:01:40 -0700 Subject: [PATCH] [NFC][TableGen] Change `Record::getSuperClasses` to use const Reco

[clang] [llvm] [mlir] [TableGen] Change `DefInit::Def` to a const Record pointer (PR #110747)

2024-10-02 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/110747 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [NFC][TableGen] Change `Record::getSuperClasses` to use const Record* (PR #110845)

2024-10-02 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/110845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [NFC][TableGen] Change `Record::getSuperClasses` to use const Record* (PR #110845)

2024-10-02 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/110845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [TableGen] Change `DefInit::Def` to a const Record pointer (PR #110747)

2024-10-02 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/110747 >From 4983aef1a62d9f3611e4ae8ed2feeb77d8729d98 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Tue, 1 Oct 2024 12:05:15 -0700 Subject: [PATCH] [TableGen] Change `DefInit::Def` to a const Record pointer --- ..

[clang] [llvm] [NFC][TableGen] Change `Record::getSuperClasses` to use const Record* (PR #110845)

2024-10-02 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/110845 Change `Record::getSuperClasses` to return a const pointer to the superclass records. >From 0581a81640aa832ae5bb0a8b001e1690b5ea295c Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 2 Oct 2024 07:01:40 -0

[clang] [NFC][Clang] Refactor ClangDiagnosticEmitter to use more StringRef (PR #115212)

2024-11-06 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/115212 Refactor ClangDiagnosticEmitter to use more StringRefs. Also use more range for loops. Verified that .inc files generated by clang build are identical with and without the change. >From b6c2a0777313c3f378c4bc

[clang] [NFC][Clang] Refactor ClangDiagnosticEmitter to use more StringRef (PR #115212)

2024-11-07 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/115212 >From c3df877042c59ca9c9303de0f1707359cd91e9bd Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 6 Nov 2024 11:22:55 -0800 Subject: [PATCH] [Clang] Refactor ClangDiagnosticEmitter to use more StringRef Refa

[clang] [Clang][TableGen] Use StringRef::str() instead of std::string() cast (PR #113645)

2024-10-25 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/113645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Use const pointers for various Init objects in Diagnostic Emitter (PR #112318)

2024-10-15 Thread Rahul Joshi via cfe-commits
@@ -83,7 +83,7 @@ getCategoryFromDiagGroup(const Record *Group, static std::string getDiagnosticCategory(const Record *R, DiagGroupParentMap &DiagGroupParents) { // If the diagnostic is in a group, and that group has a category, use i

[clang] [Clang][TableGen] Use const pointers for various Init objects in MveEmitter (PR #112320)

2024-10-15 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/112320 >From 2e73179e5e936eb9ea4099f5d71fe7d859a95306 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Mon, 14 Oct 2024 23:09:33 -0700 Subject: [PATCH] [Clang][TableGen] MveEmitter --- clang/utils/TableGen/MveEmitter

[clang] [Clang][TableGen] Use const pointers for various `Init *` pointers in SA checker emitter (PR #112321)

2024-10-15 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/112321 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Use const pointers for various Init objects in Diagnostic Emitter (PR #112318)

2024-10-15 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/112318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Use const pointers for various `Init *` pointers in SA checker emitter (PR #112321)

2024-10-15 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/112321 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Use const pointers for various Init objects in NeonEmitter (PR #112317)

2024-10-15 Thread Rahul Joshi via cfe-commits
@@ -1438,9 +1439,9 @@ void Intrinsic::emitReturn() { emitNewLine(); } -std::pair Intrinsic::DagEmitter::emitDag(DagInit *DI) { +std::pair Intrinsic::DagEmitter::emitDag(const DagInit *DI) { // At this point we should only be seeing a def. - DefInit *DefI = cast(DI->getO

[clang] [Clang][TableGen] Use const pointers for various Init objects in Diagnostic Emitter (PR #112318)

2024-10-15 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/112318 >From 1629f6eacc566139a3f38100014586fa5dbba152 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Mon, 14 Oct 2024 22:56:07 -0700 Subject: [PATCH] [Clang][TableGen] Use const pointer for various `Init` pointers.

[clang] [llvm] [mlir] [LLVM][TableGen] Change all `Init` pointers to const (PR #112705)

2024-10-17 Thread Rahul Joshi via cfe-commits
jurahul wrote: > Do Init objects have any methods that can modify them? `const` was explicitly > removed from some uses a long time ago > [af8ee2c](https://github.com/llvm/llvm-project/commit/af8ee2cdeeb2ed35fdf0db8f7c06254c5d333ac4). > > Here's a very old thread about removing `const` from IR

[clang] [llvm] [mlir] [LLVM][TableGen] Change all `Init` pointers to const (PR #112705)

2024-10-17 Thread Rahul Joshi via cfe-commits
jurahul wrote: Also, this enabled removing one const_cast<> in https://github.com/llvm/llvm-project/pull/112261 (which I think is going to be the final change for the time being to make more pointers const in TableGen backends). https://github.com/llvm/llvm-project/pull/112705 ___

[clang] [llvm] [mlir] [LLVM][TableGen] Change all `Init` pointers to const (PR #112705)

2024-10-17 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/112705 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [LLVM][TableGen] Change all `Init` pointers to const (PR #112705)

2024-10-17 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/112705 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Use const pointers for various Init objects in NeonEmitter (PR #112317)

2024-10-15 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/112317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Use const pointers for various Init objects in NeonEmitter (PR #112317)

2024-10-15 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/112317 >From b5547a162a41cedae36dc533c825a87d5a3b0b6b Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Mon, 14 Oct 2024 23:12:24 -0700 Subject: [PATCH] [Clang][TableGen] NeonEmitter --- clang/utils/TableGen/NeonEmitt

[clang] [Clang][TableGen] Use const pointers for various Init objects in Diagnostic Emitter (PR #112318)

2024-10-15 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/112318 >From ba4f37ff4b46146b9796ecbaf4f423bd62d1b418 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Mon, 14 Oct 2024 22:56:07 -0700 Subject: [PATCH] [Clang][TableGen] Use const pointer for various `Init` pointers.

<    1   2   3   4   5   >