File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -2268,12 +2268,12 @@ static bool neverReturns(const CFGBlock *B) {
2268
2268
void ThreadSafetyAnalyzer::checkMismatchedFunctionAttrs ( const NamedDecl *ND) {
2269
2269
2270
2270
auto collectCapabilities = [&](const Decl *D) {
2271
- llvm::SmallVector<CapabilityExpr> Args ;
2271
+ CapExprSet Caps ;
2272
2272
for (const auto *A : D->specific_attrs <RequiresCapabilityAttr>()) {
2273
2273
for (const Expr *E : A->args ())
2274
- Args. push_back (SxBuilder.translateAttrExpr (E, nullptr ));
2274
+ Caps. push_back_nodup (SxBuilder.translateAttrExpr (E, nullptr ));
2275
2275
}
2276
- return Args ;
2276
+ return Caps ;
2277
2277
};
2278
2278
2279
2279
auto NDArgs = collectCapabilities (ND);
@@ -2282,9 +2282,9 @@ void ThreadSafetyAnalyzer::checkMismatchedFunctionAttrs( const NamedDecl *ND) {
2282
2282
auto DArgs = collectCapabilities (D);
2283
2283
2284
2284
for (const auto &[A, B] : zip_longest (NDArgs, DArgs)) {
2285
- if (!A || !B || !(*A).equals (*B)) {
2286
- Handler.handleAttributeMismatch (cast<NamedDecl>(ND), cast<NamedDecl>(D));
2287
- }
2285
+ if (!A || !B || !(*A).equals (*B))
2286
+ Handler.handleAttributeMismatch (cast<NamedDecl>(ND),
2287
+ cast<NamedDecl>(D));
2288
2288
}
2289
2289
}
2290
2290
}
You can’t perform that action at this time.
0 commit comments