WD-40 for a gun? Never. Absolutely not.
I use it on my Savage 30-06 after hunting with it - if it got wet, which it sometimes does. I wipe it down, then spray WD-40 in every nook and cranny, on the barrel, inside the barrel, down into the stock - I douse the heck out of it. I let it sit for a little bit, wipe it down again and apply oil.
I don't know, maybe AR-15's just aren't as robust as my Savage 110.