I believe that, in your example, X cannot attack B.
I agree that it's not super clear from the rules. However, I'm basing my conclusion on page 10 of the Revised Core Rulebook.
It says there "If a unit is adjacent to impassable terrain, it cannot target a unit who is also adjacent to impassable terrain when the units receive corner cover from different sides."
Squares A & C in your example both count as impassable terrain. Since corner cover is provided by both squares, there is no line of sight between X & C. Thus, no attack is possible.
For secondary evidence, look at page 9 of the Revised Core Rulebook. The example there shows how a unit cannot MOVE at a diagonal between two impassable terrain squares. I believe that the same logic applies to line of sight and attacks.