malaperle added inline comments.

================
Comment at: lib/Index/IndexingAction.cpp:562
+
+  SourceManager &SM = CI.getSourceManager();
+  DiagnosticsEngine &Diag = CI.getDiagnostics();
----------------
As a first attempt, I tried to use index::createIndexDataRecordingAction in 
combination with ASTUnit::LoadFromCompilerInvocationAction but one problem is 
that right before it calls EndSourceFileAction in 
LoadFromCompilerInvocationAction, it calls transferASTDataFromCompilerInstance 
which means that the SourceManager in CompilerInstance is nulled out as it gets 
"transfered" to the AST. So this line crashes in this case. To be fair, at this 
point I don't need the ASTUnit so I can look at executing the action 
differently, but I thought I'd point it out!


https://reviews.llvm.org/D39050



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to