The 40mm is right in the middle of your 30mm vs. 50mm options, but with a slower (still semi-fast) aperture. It doesn't matter how sharp the 40mm is, if it doesn't take the shots you want. What was making your lean towards the 30mm?

For low-light or thin depth of field, the Sigma has a two-stop advantage there. A chunk of the DOF advantage is eaten up by it being a wider lens. At wider focal lengths it's hard to get significant background blur to isolate your subject. The f/1.4 compensates for the wider view, and the wider view allows you to optionally come in closer, and regain a thinner DOF. So that's 1 for the Sigma.

Since you opted to look at the 30 or 40mm lenses, we can assume you're not interested in the single subject portraits shots (for which the 85mm was suggested), or that you're concerned about usability in tight indoor spaces. For tight-spaces and group shots the 30mm would be advantageous. So that's 2 for the Sigma.

Perhaps you liked the idea of a lens that looks like a classic 50mm field of view on a fullframe. Again, that goes to the Sigma. Some people consider the 50mm classic view boring, and would consider this 1 against the Sigma.

The 40mm seems like a nice lens if you need STM for movies on a T4i, or if you're budget limited to $200.

Search the flickr pools for both lenses, and see which one grabs you more.
(Sigma 30mm or Canon 40mm)