While loops not being traversed by the RecursiveASTVisitor

This is my first time emailing this list so I hope I’ve sent this to the correct place.
I’m busy developing a tool which uses the libtooling framework as a basis. It essentially checks whether a given C source file conforms to a particular style guide.

I’ve written a class which extends clang::RecursiveASTVisitor. I’ve also written a VisitWhileStmt method for the class. When I provide the tool with a file containing a while (true) {…} loop, the loop and its child nodes are not traversed by this function. However when this loop is modified to while (1) {…} the traversal works as expected. Note that the stdbool.h header file is included in the file being passed to the program and the while loop appears in the AST dump of the file.

What would be causing this traversal issue?

Thanks in advance,