Driver: support detecting driver mode when clang has a version suffix without dash (PR21094)

Clang would previously not get into C++ mode when invoked as 'clang++3.6'
(though clang++-3.6 would work).

I found the previous loop logic in this function confusing; hopefully this
makes it a little clearer.

Differential Revision: http://reviews.llvm.org/D5833

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220052 91177308-0d34-0410-b5e6-96231b3b80d8
Sema: address post-commit review comment

Hoist the IgnoreParens so that we ignore it around attributes as well in order
to future-proof the code.  Addresses Richard's comments for SVN r219974.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220053 91177308-0d34-0410-b5e6-96231b3b80d8