================
@@ -3297,18 +3297,21 @@ BugReporter::generateDiagnosticForConsumerMap(
 
 static PathDiagnosticCallPiece *
 getFirstStackedCallToHeaderFile(PathDiagnosticCallPiece *CP,
-                                const SourceManager &SMgr) {
+                                const SourceManager &SMgr,
+                                ArrayRef<StringRef> UnityBuildFileExtensions) {
   SourceLocation CallLoc = CP->callEnter.asLocation();
 
   // If the call is within a macro, don't do anything (for now).
   if (CallLoc.isMacroID())
     return nullptr;
 
-  assert(AnalysisManager::isInCodeFile(CallLoc, SMgr) &&
-         "The call piece should not be in a header file.");
+  assert(
+      AnalysisManager::isInCodeFile(CallLoc, SMgr, UnityBuildFileExtensions) &&
+      "The call piece should not be in a header file.");
 
   // Check if CP represents a path through a function outside of the main file.
-  if (!AnalysisManager::isInCodeFile(CP->callEnterWithin.asLocation(), SMgr))
+  if (!AnalysisManager::isInCodeFile(CP->callEnterWithin.asLocation(), SMgr,
----------------
necto wrote:

I changed my mind after @balazske feedback. Given both Balázs' find it more 
ergonomic to not expose the `UnityBuildFileExtensions`, so be it:

e7ae092fc7c4 [NFC] Hide UnityBuildFileExtensions field, remove isInCodeFile 
overload

https://github.com/llvm/llvm-project/pull/242339
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to