File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -2659,7 +2659,7 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) {
26592659 case CFGElement::AutomaticObjectDtor: {
26602660 CFGAutomaticObjDtor AD = BI.castAs <CFGAutomaticObjDtor>();
26612661 const auto *DD = AD.getDestructorDecl (AC.getASTContext ());
2662- if (!DD->hasAttrs ())
2662+ if (!DD || !DD ->hasAttrs ())
26632663 break ;
26642664
26652665 LocksetBuilder.handleCall (nullptr , DD,
Original file line number Diff line number Diff line change 1+ // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -Wthread-safety -Wthread-safety-pointer -Wthread-safety-beta -Wno-thread-safety-negative -fcxx-exceptions -DUSE_CAPABILITY=0 %s
2+ // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -Wthread-safety -Wthread-safety-pointer -Wthread-safety-beta -Wno-thread-safety-negative -fcxx-exceptions -DUSE_CAPABILITY=1 %s
3+ // RUN: %clang_cc1 -fsyntax-only -verify -std=c++17 -Wthread-safety -Wthread-safety-pointer -Wthread-safety-beta -Wno-thread-safety-negative -fcxx-exceptions -DUSE_CAPABILITY=0 %s
4+ // RUN: %clang_cc1 -fsyntax-only -verify -std=c++17 -Wthread-safety -Wthread-safety-pointer -Wthread-safety-beta -Wno-thread-safety-negative -fcxx-exceptions -DUSE_CAPABILITY=1 %s
5+ // expected-no-diagnostics
6+
7+ struct foo {
8+ ~foo ();
9+ };
10+ struct bar : foo {};
11+ struct baz : bar {};
12+ baz foobar (baz a) { return a; }
You can’t perform that action at this time.
0 commit comments