This is the former second part of https://reviews.llvm.org/D67740 that was split out (and rewritten).
Error out when the callable_when, set_typestate and test_typestate attributes are applied to a constructor or static method; previously Clang would ignore them or crash, depending on the attribute.