aaron.ballman added inline comments.

================
Comment at: unittests/Lex/PPCallbacksTest.cpp:155-160
+    std::unique_ptr<Preprocessor> PP = llvm::make_unique<Preprocessor>(
+        std::make_shared<PreprocessorOptions>(), Diags, LangOpts, SourceMgr,
+        PCMCache, HeaderInfo, ModLoader,
+        /*IILookup =*/nullptr,
+        /*OwnsHeaderSearch =*/false);
+    return InclusionDirectiveCallback(PP.get())->FilenameRange;
----------------
I'm likely just missing something, but why is the `unique_ptr` required at all? 
The `Preprocessor` object will be destroyed on exit from this function, so it 
seems like it could be an automatic variable that's passed by reference to 
`InclusionDirectiveCallback()`, and same below.


https://reviews.llvm.org/D46614



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

Reply via email to