================
@@ -109,9 +133,41 @@ void DuplicateIncludeCallbacks::MacroUndefined(const Token 
&MacroNameTok,
   Files.back().clear();
 }
 
+bool DuplicateIncludeCallbacks::IsAllowedDuplicateInclude(StringRef FileName) {
+  // try to match with each regex
+  for (const llvm::Regex &reg : AllowedDuplicateRegex) {
+    if (reg.match(FileName))
+      return true;
+  }
+  return false;
+}
----------------
zwuis wrote:

This function is used only once. Use `llvm::any_of` so that we don't need to 
introduce a new function.

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

Reply via email to