File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -1489,6 +1489,9 @@ Expr ScriptParser::readPrimary() {
14891489 Expr e = readPrimary ();
14901490 return [=] { return -e ().getValue (); };
14911491 }
1492+ if (consume (" +" )) {
1493+ return readPrimary ();
1494+ }
14921495
14931496 StringRef tok = next ();
14941497 std::string location = getCurrentLocation ();
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ SECTIONS {
7373 log2ceil100000000 = LOG2CEIL(0x100000000);
7474 log2ceil100000001 = LOG2CEIL(0x100000001);
7575 log2ceilmax = LOG2CEIL(0xffffffffffffffff);
76+ unaryadd = +3 + ++5;
7677}
7778
7879# CHECK: 0000000000000002 A unary
@@ -126,6 +127,7 @@ SECTIONS {
126127# CHECK-NEXT: 0000000000000020 A log2ceil100000000
127128# CHECK-NEXT: 0000000000000021 A log2ceil100000001
128129# CHECK-NEXT: 0000000000000040 A log2ceilmax
130+ # CHECK-NEXT: 0000000000000008 A unaryadd
129131
130132## Mailformed number error.
131133# RUN: echo "SECTIONS { . = 0x12Q41; }" > %t.script
You can’t perform that action at this time.
0 commit comments