Smaller clang diagnostic scope.

Limit the diagnostic scope, in case case handling changes in future versions.

This is probably unnecessary, as these particular cases won't get more complicated. But I'd hate to see this larger-scoped pattern repeated elsewhere.