Sorry for the title, I'm not 100% sure that's even correct here.
This call to ProhibitAttributes() is dead code in the case of GNU-style attributes. They are needed in e.g. clang/test/Parser/objcbridge-related-attribute.m.
However, adding a && !getLangOpts().ObjC to the if statement just before is also not sufficient since clang expects to parse GNU-style attributes at this place without diagnosing them as well, for example in clang/test/Sema/struct-decl.c:71. This ends up diagnosing the wrongly-placed noreturn attribute at a later stage.
Once ProhibitAttributes() works with GNU-style attributes the cases mentioned above (and tons of other cases) are being diagnosed as incorrect.
This change depends on https://reviews.llvm.org/D97362 landing first.
clang-tidy: error: too many arguments to function call, expected 2, have 3 [clang-diagnostic-error]
not useful