maximum ceiling joist to beam span without joist hangers
There are two considerations, 1) vertical loads (including uplift), and 2) lateral loads. 

1) 2x4’s at 24” o.c. are plenty strong enough to support a roof load of say 30 lbs. per square foot LIVE LOAD (snow load) plus a DEAD LOAD (framing, insulation, etc.) of 10-12 lbs psf for an 18.5” span. However, the connections at each end will be in the 140lbs. Range. So, 2-16d are required (each 16d will support about 80 lbs. each for toe-nailing,) but make sure you don’t split the joists. 

If the 2x4’s extend over an exterior top plate, you’ll need to fasten them down by toe-nailing them to be he top plate, (if you don’t want to use clips).

2) Lateral loading (earthquake and high wind resistance) is different. Here you want adequate transfer from roof sheathing to supports. Unless you live on an extreme earthquake zone or high wind area, 2x4 roof supports at 24” o.c. Will be fine.