On Oct 10, 2012, at 8:19 AM, Erik Verbruggen <[email protected]> wrote:

> 
> On 10 okt. 2012, at 04:12, Argyrios Kyrtzidis <[email protected]> wrote:
> 
>> Author: akirtzidis
>> Date: Tue Oct  9 21:12:50 2012
>> New Revision: 165593
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=165593&view=rev
>> Log:
>> Disable the preprocessing record when indexing a source file
>> and modules are not enabled.
> 
> Is it (still?) possible to index macro definitions/usages? 

Yes, this can be done via the preprocessor callbacks.

-Argyrios

> 
> -- Erik
> 
> 
>> Modified:
>>   cfe/trunk/tools/libclang/Indexing.cpp
>> 
>> Modified: cfe/trunk/tools/libclang/Indexing.cpp
>> URL: 
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/Indexing.cpp?rev=165593&r1=165592&r2=165593&view=diff
>> ==============================================================================
>> --- cfe/trunk/tools/libclang/Indexing.cpp (original)
>> +++ cfe/trunk/tools/libclang/Indexing.cpp Tue Oct  9 21:12:50 2012
>> @@ -398,6 +398,9 @@
>>    PPOpts.DetailedRecord = true;
>>  }
>> 
>> +  if (!requestedToGetTU && !CInvok->getLangOpts()->Modules)
>> +    PPOpts.DetailedRecord = false;
>> +
>>  DiagnosticErrorTrap DiagTrap(*Diags);
>>  bool Success = ASTUnit::LoadFromCompilerInvocationAction(CInvok.getPtr(), 
>> Diags,
>>                                                       IndexAction.get(),
>> 
>> 
>> _______________________________________________
>> cfe-commits mailing list
>> [email protected]
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to