<div dir="ltr">Hi, I hope that i'm sending this to the right place, if not please forgive me.<div><br><div>I'm following the documentation page "Tutorial for building tools using LibTooling and LibASTMatchers" (<a href="http://clang.llvm.org/docs/LibASTMatchersTutorial.html" target="_blank">http://clang.llvm.org/docs/LibASTMatchersTutorial.html</a>) and working on a virtual machine with ubuntu 14.10 on it.</div><div><br></div><div>I've one question and one observation:</div><div><br></div><div>Question: </div><div>After I first build ( following exactly the instructions in the documentation ) the source running 'ninja clang-test' i get: </div><div> Expected Passes : 1232</div><div> Expected Failure : 14</div><div>Unsupported Tests: 10</div><div>Unexpected Failures: 6573 </div><div>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? </div><div>Before building it on Ubuntu 14.10 I also tried to build it on osx 10.10 and i was getting the same output.</div><div><br></div><div>Observation:</div><div>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 :</div><div><br></div><div><div>[6/2243] Building C object lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTF.c.o</div><div>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</div><div>cc: error: unrecognized command line option ‘-fcolor-diagnostics’</div><div>[6/2243] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/DataStream.cpp.o</div><div>ninja: build stopped: subcommand failed.</div></div><div><br></div><div>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?</div><div><br></div><div>Thank you.</div><div><br></div><div><br></div><div><br></div></div></div>