Skip to content

Commit 80d86f6

Browse files
authored
Merge branch 'main' into inreg-call-gen-waterfall
2 parents e14c0ab + bfcd67c commit 80d86f6

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

clang/lib/Format/FormatTokenLexer.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,14 +318,21 @@ void FormatTokenLexer::tryMergePreviousTokens() {
318318
{tok::equal, tok::greater},
319319
{tok::star, tok::greater},
320320
{tok::pipeequal, tok::greater},
321-
{tok::pipe, tok::arrow},
322-
{tok::hash, tok::minus, tok::hash},
323-
{tok::hash, tok::equal, tok::hash}},
321+
{tok::pipe, tok::arrow}},
324322
TT_BinaryOperator) ||
325323
Tokens.back()->is(tok::arrow)) {
326324
Tokens.back()->ForcedPrecedence = prec::Comma;
327325
return;
328326
}
327+
if (Tokens.size() >= 3 &&
328+
Tokens[Tokens.size() - 3]->is(Keywords.kw_verilogHash) &&
329+
Tokens[Tokens.size() - 2]->isOneOf(tok::minus, tok::equal) &&
330+
Tokens[Tokens.size() - 1]->is(Keywords.kw_verilogHash) &&
331+
tryMergeTokens(3, TT_BinaryOperator)) {
332+
Tokens.back()->setFinalizedType(TT_BinaryOperator);
333+
Tokens.back()->ForcedPrecedence = prec::Comma;
334+
return;
335+
}
329336
} else if (Style.isTableGen()) {
330337
// TableGen's Multi line string starts with [{
331338
if (tryMergeTokens({tok::l_square, tok::l_brace},

clang/unittests/Format/TokenAnnotatorTest.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2686,6 +2686,7 @@ TEST_F(TokenAnnotatorTest, UnderstandsVerilogOperators) {
26862686
// precedence.
26872687
std::pair<prec::Level, std::string> JoinedBinary[] = {
26882688
{prec::Comma, "->"}, {prec::Comma, "<->"},
2689+
{prec::Comma, "#-#"}, {prec::Comma, "#=#"},
26892690
{prec::Assignment, "+="}, {prec::Assignment, "-="},
26902691
{prec::Assignment, "*="}, {prec::Assignment, "/="},
26912692
{prec::Assignment, "%="}, {prec::Assignment, "&="},

libcxx/docs/ReleaseNotes/22.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ Implemented Papers
4343
- P3044R2: sub-``string_view`` from ``string`` (`Github <https://llvm.org/PR148140>`__)
4444
- P3223R2: Making ``std::istream::ignore`` less surprising (`Github <https://llvm.org/PR148178>`__)
4545
- P3060R3: Add ``std::views::indices(n)`` (`Github <https://llvm.org/PR148175>`__)
46+
- P2641R4: Checking if a ``union`` alternative is active (``std::is_within_lifetime``)
47+
(`Github <https://llvm.org/PR105381>`__)
4648
- P2835R7: Expose ``std::atomic_ref``'s object address (`Github <https://llvm.org/PR118377>`__)
4749
- P2944R3: Comparisons for ``reference_wrapper`` (`Github <https://llvm.org/PR105424>`__)
4850
- P3168R2: Give ``std::optional`` Range Support (`Github <https://llvm.org/PR105430>`__)

libcxx/docs/Status/Cxx2cPapers.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"`P2874R2 <https://wg21.link/P2874R2>`__","P2874R2: Mandating Annex D Require No More","2023-06 (Varna)","|Complete|","12","`#105377 <https://github.com/llvm/llvm-project/issues/105377>`__",""
1919
"`P2757R3 <https://wg21.link/P2757R3>`__","Type-checking format args","2023-06 (Varna)","","","`#105378 <https://github.com/llvm/llvm-project/issues/105378>`__",""
2020
"`P2637R3 <https://wg21.link/P2637R3>`__","Member ``visit``","2023-06 (Varna)","|Complete|","19","`#105380 <https://github.com/llvm/llvm-project/issues/105380>`__","Change of ``__cpp_lib_variant`` is completed in LLVM 20. Change of ``__cpp_lib_format`` is blocked by `P2419R2 <https://wg21.link/P2419R2>`__."
21-
"`P2641R4 <https://wg21.link/P2641R4>`__","Checking if a ``union`` alternative is active","2023-06 (Varna)","","","`#105381 <https://github.com/llvm/llvm-project/issues/105381>`__",""
21+
"`P2641R4 <https://wg21.link/P2641R4>`__","Checking if a ``union`` alternative is active","2023-06 (Varna)","|Complete|","22","`#105381 <https://github.com/llvm/llvm-project/issues/105381>`__",""
2222
"`P1759R6 <https://wg21.link/P1759R6>`__","Native handles and file streams","2023-06 (Varna)","|Complete|","18","`#105382 <https://github.com/llvm/llvm-project/issues/105382>`__",""
2323
"`P2697R1 <https://wg21.link/P2697R1>`__","Interfacing ``bitset`` with ``string_view``","2023-06 (Varna)","|Complete|","18","`#105384 <https://github.com/llvm/llvm-project/issues/105384>`__",""
2424
"`P1383R2 <https://wg21.link/P1383R2>`__","More ``constexpr`` for ``<cmath>`` and ``<complex>``","2023-06 (Varna)","","","`#105385 <https://github.com/llvm/llvm-project/issues/105385>`__",""

0 commit comments

Comments
 (0)