Bug introduced in 8.0.4 or earlier and persisting through 12.0 or later
Check this example:
Attributes[Unevaluated]
(*{HoldAllComplete, Protected}*)
FullForm[Unevaluated[{{5 + 6}, {7 + 8}}]]
(*Unevaluated[List[List[Plus[5, 6]], List[Plus[7, 8]]]]*)
now:
TreeForm[Unevaluated[{{5 + 6}, {7 + 8}}]]

expr = Unevaluated[{{5 + 6}, {7 + 8}}]
(*{{11}, {15}}*)
Note here the result is like Unevaluated is not applied at all.
It looks like (according to the documentation also) that Unevaluated uses its Attributes ONLY once.
When compared with HoldComplete, which has same Attributes, the results are different and as expected.
in the case of HoldComplete:
FullForm[HoldComplete[{{5 + 6}, {7 + 8}}]]
(*HoldComplete[List[List[Plus[5, 6]], List[Plus[7, 8]]]]*)
TreeForm[HoldComplete[{{5 + 6}, {7 + 8}}]]

It is clear that the TreeForm does not represent the FullForm when using Unevaluated and works perfectly in the case of HoldComplete.
How does that happen with Unevaluated?




TreeForm[Unevaluated[4^5]]evaluate the4^5?" – Alexey Popkov Nov 28 '14 at 21:07Unevaluatedis underdocumented. But I do not see a bug here. Internals of function implementations are allowed to stripUnevaluatedand presumablyTreeFormis doing just that. – Daniel Lichtblau Mar 06 '17 at 15:22Unevaluated" - Isn't this called evaluation leak? – Alexey Popkov Aug 22 '19 at 05:12Unevaluatedis sufficiently well documented for such a basic use cases: apart fromref/Unevaluatedthere is alsotutorial/Evaluationwhich adds significant information. The example onref/UnevaluatedLength[Unevaluated[5 + 6 + 7 + 8]]correctly gives4what demonstrates the expected behavior ofUnevaluated. IfLength's internals would be allowed to evaluate the expression, theUnevaluatedwould be just pointless. – Alexey Popkov Aug 22 '19 at 06:14Unevaluatedshould be stripped by the evaluator which must temporarily set theHoldAllCompleteattribute toTreeForm. Then the unevaluated expression should be processed byTreeForm's internals without evaluating it. – Alexey Popkov Aug 22 '19 at 06:18