[PATCH] D46614: [clang] Adding CharacteristicKind to PPCallbacks::InclusionDirective

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 10 04:28:24 PDT 2018


aaron.ballman added inline comments.


================
Comment at: unittests/Lex/PPCallbacksTest.cpp:140
 
+  std::unique_ptr<Preprocessor> getPreprocessor(const char *SourceText,
+                                                const char *HeaderPath,
----------------
This function appears to be unused?


================
Comment at: unittests/Lex/PPCallbacksTest.cpp:179
 
-    Preprocessor PP(std::make_shared<PreprocessorOptions>(), Diags, LangOpts,
-                    SourceMgr, PCMCache, HeaderInfo, ModLoader,
-                    /*IILookup =*/nullptr,
-                    /*OwnsHeaderSearch =*/false);
-    PP.Initialize(*Target);
-    InclusionDirectiveCallbacks* Callbacks = new InclusionDirectiveCallbacks;
-    PP.addPPCallbacks(std::unique_ptr<PPCallbacks>(Callbacks));
+    std::unique_ptr<Preprocessor> PP = llvm::make_unique<Preprocessor>(
+        std::make_shared<PreprocessorOptions>(), Diags, LangOpts, SourceMgr,
----------------
Did you intend to make use of it here?


================
Comment at: unittests/Lex/PPCallbacksTest.cpp:200
+
+    std::unique_ptr<Preprocessor> PP = llvm::make_unique<Preprocessor>(
+        std::make_shared<PreprocessorOptions>(), Diags, LangOpts, SourceMgr,
----------------
and here?


https://reviews.llvm.org/D46614





More information about the cfe-commits mailing list