[cfe-dev] question about -ccl option

Matt Funk matze999 at gmail.com
Mon Apr 15 01:53:00 PDT 2013

i am very new to clang so if there is documentation i overlooked please
point me to it. My question relates to the 'ccl' option as i am trying to
print the Abstract Syntax Tree

I build from source:
clang version 3.3 (trunk 179161)
Target: x86_64-unknown-linux-gnu
Thread model: posix

For a regular 'Hello World' program:
#include <iostream>
int main() {
    std::cout << "Heloo World!";
  return 0;

I can do: ~/clang/svn/build/Debug+Asserts/bin/clang++ -c HelloWorld.cpp
without any problems

When i do:
~/clang/svn/build/Debug+Asserts/bin/clang++ -cc1 -ast-dump-xml
it throws an error:
HelloWorld.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>

I guess i am trying to understand why that is? I figure it knows the
include paths since 1) works?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130415/9c097c03/attachment.html>

More information about the cfe-dev mailing list