clang 3.8, libtooling cannot visit some BinaryOperator

I added code just at the beginning of VisitBinaryOperator like:

bool VisitBinaryOperator(BinaryOperator *b){
    PrintingPolicy policy = PrintingPolicy(this->TheRewriter.getLangOpts());
    b->printPretty(llvm::errs(), NULL, policy);
    return true;
The test code includes these lines:
void setForceMethod(NbodyModel *theModel,int force_method) {
void setTreeRangeCoefficient(NbodyModel *theModel,double coefficient) {
void setIntMethod(NbodyModel *theModel,int int_method) {
expected output should include these assignments but I didn't find them in terminal.

Then I’m afraid I’m not sure. Maybe the assignments aren’t classed as a binary operator any longer?

It would be great if you can produce a COMPLETE (but minimal to show the problem) example of both the code you are working on, and the input that you are giving it, for debugging.

It definitely should match:
$ cat /tmp/
void f() {
int i;
i = 2;

$ clang-query /tmp/ –
Parsing /tmp/ 0.0015 (100.0%) 0.0015 (100.0%) 0.0018 (100.0%)
clang-query> m binaryOperator()
Match #1:
/tmp/ note: “root” binds here
i = 2;

If your code doesn’t parse correctly, or doesn’t find some headers, all bets are off, so as the post above said, more context needed.