File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 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) {
22682268void ThreadSafetyAnalyzer::checkMismatchedFunctionAttrs ( const NamedDecl *ND) {
22692269
22702270 auto collectCapabilities = [&](const Decl *D) {
2271- llvm::SmallVector<CapabilityExpr> Args ;
2271+ CapExprSet Caps ;
22722272 for (const auto *A : D->specific_attrs <RequiresCapabilityAttr>()) {
22732273 for (const Expr *E : A->args ())
2274- Args. push_back (SxBuilder.translateAttrExpr (E, nullptr ));
2274+ Caps. push_back_nodup (SxBuilder.translateAttrExpr (E, nullptr ));
22752275 }
2276- return Args ;
2276+ return Caps ;
22772277 };
22782278
22792279 auto NDArgs = collectCapabilities (ND);
@@ -2282,9 +2282,9 @@ void ThreadSafetyAnalyzer::checkMismatchedFunctionAttrs( const NamedDecl *ND) {
22822282 auto DArgs = collectCapabilities (D);
22832283
22842284 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));
22882288 }
22892289 }
22902290}
You can’t perform that action at this time.
0 commit comments