Thread safety analysis: Run more tests with capability attributes [NFC]

Summary:
We run the tests for -Wthread-safety-{negative,verbose} with the new
attributes as well as the old ones. Also put the macros in a header so
that we don't have to copy them all around.

The warn-thread-safety-parsing.cpp test checks for warnings depending on
the actual attribute name, so it can't undergo the same treatment.

Together with D49275 this should fix PR33754.

Reviewers: aaron.ballman, delesley, grooverdan

Reviewed By: aaron.ballman

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D52141

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