xref: /llvm-project/clang/test/Analysis/Checkers/WebKit/assignment-to-refptr.cpp (revision 85507f17cfc42e29f956de6b3e0924c3cf7b4469)
1 // RUN: %clang_analyze_cc1 -analyzer-checker=alpha.webkit.UncountedCallArgsChecker -verify %s
2 // expected-no-diagnostics
3 
4 #include "mock-types.h"
5 
6 class Node {
7 public:
8     Node* nextSibling() const;
9 
10     void ref() const;
11     void deref() const;
12 };
13 
removeDetachedChildren(Node * firstChild)14 static void removeDetachedChildren(Node* firstChild)
15 {
16     for (RefPtr child = firstChild; child; child = child->nextSibling());
17 }
18