Compilation issues Ubuntu 14.10

Hi, I hope that i’m sending this to the right place, if not please forgive me.

I’m following the documentation page “Tutorial for building tools using LibTooling and LibASTMatchers” ( and working on a virtual machine with ubuntu 14.10 on it.

I’ve one question and one observation:

After I first build ( following exactly the instructions in the documentation ) the source running ‘ninja clang-test’ i get:
Expected Passes : 1232
Expected Failure : 14
Unsupported Tests: 10
Unexpected Failures: 6573
Should I conclude that the built compiler is not going to work properly? If yes, is there an alternative way of building it that can fix this?
Before building it on Ubuntu 14.10 I also tried to build it on osx 10.10 and i was getting the same output.

When I set clang as its own compiler, following the same documentation page, and i change the CMAKE_CXX_COMPILER flag putting the path to the newly builded compiler, I get the following error :

[6/2243] Building C object lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTF.c.o
FAILED: /usr/bin/cc -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wno-comment -fcolor-diagnostics -Ilib/Support -I/opt/llvm/llvm/lib/Support -Iinclude -I/opt/llvm/llvm/include -MMD -MT lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTF.c.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTF.c.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTF.c.o -c /opt/llvm/llvm/lib/Support/ConvertUTF.c
[6/2243] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/DataStream.cpp.o
ninja: build stopped: subcommand failed.

I thought it was because the old compiler was still used instead of clang to compile the c files and wasn’t recognizing the flag -fcolor-diagnostics. So I changed also CMAKE_C_COMPILER with the path to the builded clang and now it seems to compile. If this is right, maybe this should be added to the documentation?

Thank you.