@@ -51,11 +51,10 @@ bool isRefcountedStringsHack(const VarDecl *V) {
5151struct GuardianVisitor : public RecursiveASTVisitor <GuardianVisitor> {
5252 using Base = RecursiveASTVisitor<GuardianVisitor>;
5353
54- const VarDecl *Guardian { nullptr };
54+ const VarDecl *Guardian{ nullptr };
5555
5656public:
57- explicit GuardianVisitor (const VarDecl *Guardian)
58- : Guardian(Guardian) {
57+ explicit GuardianVisitor (const VarDecl *Guardian) : Guardian(Guardian) {
5958 assert (Guardian);
6059 }
6160
@@ -69,7 +68,7 @@ struct GuardianVisitor : public RecursiveASTVisitor<GuardianVisitor> {
6968 return true ;
7069 }
7170
72- bool VisitCXXConstructExpr (const CXXConstructExpr* CE) {
71+ bool VisitCXXConstructExpr (const CXXConstructExpr * CE) {
7372 if (auto *Ctor = CE->getConstructor ()) {
7473 if (Ctor->isMoveConstructor () && CE->getNumArgs () == 1 ) {
7574 auto *Arg = CE->getArg (0 )->IgnoreParenCasts ();
@@ -82,7 +81,7 @@ struct GuardianVisitor : public RecursiveASTVisitor<GuardianVisitor> {
8281 return true ;
8382 }
8483
85- bool VisitCXXMemberCallExpr (const CXXMemberCallExpr* MCE) {
84+ bool VisitCXXMemberCallExpr (const CXXMemberCallExpr * MCE) {
8685 auto MethodName = safeGetName (MCE->getMethodDecl ());
8786 if (MethodName == " swap" || MethodName == " leakRef" ||
8887 MethodName == " releaseNonNull" ) {
@@ -95,7 +94,7 @@ struct GuardianVisitor : public RecursiveASTVisitor<GuardianVisitor> {
9594 return true ;
9695 }
9796
98- bool VisitCXXOperatorCallExpr (const CXXOperatorCallExpr* OCE) {
97+ bool VisitCXXOperatorCallExpr (const CXXOperatorCallExpr * OCE) {
9998 if (OCE->isAssignmentOp () && OCE->getNumArgs () == 2 ) {
10099 auto *ThisArg = OCE->getArg (0 )->IgnoreParenCasts ();
101100 if (auto *VarRef = dyn_cast<DeclRefExpr>(ThisArg)) {
0 commit comments