================
@@ -83,7 +88,28 @@ namespace {
       return "";
     }
     bool filterMatches(Decl *D) {
-      return getName(D).find(FilterString) != std::string::npos;
+      if (!FilterString.empty() &&
+          getName(D).find(FilterString) == std::string::npos)
+        return false;
+
+      if (!FilterPath.empty()) {
+        const SourceManager &SM = D->getASTContext().getSourceManager();
+
+        SourceLocation Loc = SM.getSpellingLoc(D->getLocation());
+        if (Loc.isInvalid())
+          return false;
+
+        auto Pattern = llvm::GlobPattern::create(FilterPath);
----------------
AaronBallman wrote:

Please spell out the type (it's not obvious what it is from the initializer).

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

Reply via email to