File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -2082,6 +2082,11 @@ func (u *Unary) print(ps *printState) {
20822082 ps .writeByte ('(' )
20832083 ps .print (expr )
20842084 ps .writeByte (')' )
2085+ } else if op , ok := u .Op .(* Operator ); ok && op .Name == "__alignof__" {
2086+ // Always use parentheses for __alignof__ argument.
2087+ ps .writeByte ('(' )
2088+ ps .print (expr )
2089+ ps .writeByte (')' )
20852090 } else {
20862091 parenthesize (ps , expr )
20872092 }
Original file line number Diff line number Diff line change @@ -1469,3 +1469,22 @@ f(A<X{.a.b[3 ... 4]=(1)}>)
14691469# PR 96143
14701470_Z2F2IZ1FvEUlvE_EN1AIT_E1XES2_
14711471A<F()::{lambda()#1}>::X F2<F()::{lambda()#1}>(F()::{lambda()#1})
1472+
1473+ # PR 88115
1474+ _Z1fIiEvDTv111__alignof__T_E
1475+ void f<int>(decltype (__alignof__(int)))
1476+
1477+ _Z1fIiEvDTv111__alignof__tlT_EE
1478+ void f<int>(decltype (__alignof__(int{})))
1479+
1480+ _Z1gI1AEv1SIXadsrT_oncviEE
1481+ void g<A>(S<&A::operator int>)
1482+
1483+ _Z1jI1AEDTcldtfp_oncvPT_EES1_
1484+ decltype (({parm#1}.(operator A*))()) j<A>(A)
1485+
1486+ _Z1fI1AEDtdtfp_srT_1xES1_
1487+ decltype ({parm#1}.A::x) f<A>(A)
1488+
1489+ _Z2f6IP1AEDtptfp_gssr1A1BE1xET_
1490+ decltype ({parm#1}->(::A::B::x)) f6<A*>(A*)
You can’t perform that action at this time.
0 commit comments