[cfe-dev] clang_parseTranslationUnit_Impl() problem

don hinton don.hinton at gmx.com
Sun Aug 19 15:24:57 PDT 2012


On Aug 19, 2012, at 16:59, Michael Lehn <michael.lehn at uni-ulm.de> wrote:

> Am 19.08.2012 um 23:11 schrieb don hinton:
> 
>> On Aug 19, 2012, at 15:21, don hinton <don.hinton at gmx.com> wrote:
>> 
>>> On Aug 19, 2012, at 15:00, don hinton <don.hinton at gmx.com> wrote:
>>> 
>>>> Hi:
>>>> 
>>>> clang_parseTranslationUnit_Impl() passes the results of CIndexer::getClangResourcesPath() to ASTUnit::LoadFromCommandLine(), causing it to override HeaderSearchOpts::ResourceDir which means it can no longer find things like <string>.
>>>> 
>>>> Anyone else experiencing this?
>>> 
>>> That doesn't seem to be the problem, but it still can't find includes like <string>.  btw, I'm passing the arguments from Compile.CXX in the make system.
>> 
>> Turns out it's only a problem when processing .h files.  So, when using libclang, how can I force it to use c++ instead of c?
> 
> You can pass the option '-x c++' to the compiler.

Thanks.  Found that after I sent message...  Too bad it doesn't respect the emacs mode statement.  

I'm trying to write up my doc tool in the llvm/clang make system, so I guess I can hard code it for now and add a flag later.

thanks again...
don

> 
> Michael
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list