Fix false negative in -Wthread-safety-attributes
authorAaron Puchert <aaron.puchert@sap.com>
Wed, 24 Mar 2021 16:45:22 +0000 (17:45 +0100)
committerAaron Puchert <aaron.puchert@sap.com>
Wed, 24 Mar 2021 16:45:25 +0000 (17:45 +0100)
commita6a1c3051dbd2cc5ccc70272890cf38d11dca9c7
tree66e188ae331e75493490197555252af8972530ad
parent14b2ec934ed88642b11319704ea9b7465c4234ad
Fix false negative in -Wthread-safety-attributes

The original implementation didn't fire on non-template classes when a
base class was an instantiation of a template with a dependent base.
In that case the base of the base is dependent as seen from the base,
but not from the class we're interested in, which isn't a template.

Also it simplifies the code a lot.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D98724
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/SemaCXX/warn-thread-safety-parsing.cpp