Correct Clang feature detection

Clang's __GNUC__ and __GNUC_MINOR__ definitions are not reliable and may
not be defined at all when targeting the MSVC ABI. Use feature-checking
macros when possible or check for __clang__.

[guillem@hadrons.org: Update for __ protected keyword change. ]

Signed-off-by: Guillem Jover <guillem@hadrons.org>
1 job from master in 1 minute and 31 seconds
latest
Status Job ID Name Coverage
  Test
passed #3629
test

00:01:31