libclang: Syntactic or Semantic analysis?

Hello Clang experts,

I am currently working on upgrading a tool for static code analysis based on libclang. It uses a RecursiveASTVisitor to traverse the syntax tree and extract some information relevant to us. To support a bunch of new features, I had to upgrade Clang from Version 3.1 as used before to 3.4.2 (I am stuck on Visual Studio 2010, so no up-to-date Clang, unfortunately). To verify that the new Clang behaves as expected, I have inherited a number of testcases from another project, based the clang test suite. Among other things, these testcases check whether extra parentheses are detected (example: ‘if ((x == 2)) {’) or whether a static analysis shows that an array access out of bounds is found in the code (example: ‘int array[2]; array[5] = 7;’). However, my tool does not output the respective warnings. If I run clang.exe on the respective source files, I get all the expected warnings.

After brooding on this problem for a while, I realized that detecting array access out of bounds is actually a semantic analysis, not a syntactic one. However, when using a RecursiveASTVisitor, I am only doing a syntactic analysis. Thus, I can actually expect not to see any of these warnings. Are these assumptions correct, or does Clang always perform a semantic analysis and it is in fact my code that eats the warning messages?

Thank you in advance for any input!

Best regards