[analyzer][NFC] Refactor AnalysisConsumer::getModeForDecl()

I just read this part of the code, and I found the nested ifs less
readable.

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D114441

GitOrigin-RevId: af37d4b6fee8990d5b029796681b59e0d0390c28
1 file changed