diff options
author | DeLesley Hutchins <delesley@google.com> | 2015-02-03 18:17:48 +0000 |
---|---|---|
committer | DeLesley Hutchins <delesley@google.com> | 2015-02-03 18:17:48 +0000 |
commit | 4980df623f1532ccf3781afbcc3c916f2599c422 (patch) | |
tree | 03094b7a09a9f59cfa36c5f4782a33d31280a613 /clang/lib/Sema/Sema.cpp | |
parent | 57775cd66f60bbb53c35b4cb5ec296744a76080c (diff) | |
download | bcm5719-llvm-4980df623f1532ccf3781afbcc3c916f2599c422.tar.gz bcm5719-llvm-4980df623f1532ccf3781afbcc3c916f2599c422.zip |
Thread Safety Analysis: add support for before/after annotations on mutexes.
These checks detect potential deadlocks caused by inconsistent lock
ordering. The checks are implemented under the -Wthread-safety-beta flag.
llvm-svn: 227997
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r-- | clang/lib/Sema/Sema.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index ded6c303af8..f23d89e3b79 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -102,7 +102,7 @@ Sema::Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer, AccessCheckingSFINAE(false), InNonInstantiationSFINAEContext(false), NonInstantiationEntries(0), ArgumentPackSubstitutionIndex(-1), CurrentInstantiationScope(nullptr), DisableTypoCorrection(false), - TyposCorrected(0), AnalysisWarnings(*this), + TyposCorrected(0), AnalysisWarnings(*this), ThreadSafetyDeclCache(nullptr), VarDataSharingAttributesStack(nullptr), CurScope(nullptr), Ident_super(nullptr), Ident___float128(nullptr) { @@ -243,6 +243,8 @@ Sema::~Sema() { if (isMultiplexExternalSource) delete ExternalSource; + threadSafety::threadSafetyCleanup(ThreadSafetyDeclCache); + // Destroys data sharing attributes stack for OpenMP DestroyDataSharingAttributesStack(); |