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 @@ -2820,7 +2820,7 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) {
28202820 case CFGElement::AutomaticObjectDtor: {
28212821 CFGAutomaticObjDtor AD = BI.castAs <CFGAutomaticObjDtor>();
28222822 const auto *DD = AD.getDestructorDecl (AC.getASTContext ());
2823- if (!DD->hasAttrs ())
2823+ if (!DD || !DD ->hasAttrs ())
28242824 break ;
28252825
28262826 LocksetBuilder.handleCall (
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