[cfe-users] Question about ASTContext::getParents(): How to avoid empty list return?

2016-12-10 Thread Klaus Leppkes via cfe-users
Hi, my problem is that in some cases ASTContext::getParents() returns an empty list, reproducible with release_38 and 39, so I think it's not a bug and I missed an important point. a) To understand the problem: In which cases does getParents() return an empty list and in which is doesn't? b) Is

[cfe-users] How can clang-format don't put if statements into one line?

2016-12-10 Thread fly2never via cfe-users
Just like the code below, I use clang-format to automatic format my codes if(detectBeats[*beatsCont-2] > detectBeats[*beatsCont-1] || fabs(detectBeats[*beatsCont-2] > detectBeats[*beatsCont-1]) < 1.0){ *beatsCont -=1;} Whatever I set the .clang-formt file, it always formatted like this: i