================
@@ -462,6 +469,18 @@ def main():
         [make_absolute(entry["file"], entry["directory"]) for entry in 
database]
     )
 
+    # Filter source files from compilation database.
+    if args.source_filter:
+        try:
+            source_filter_re = re.compile(args.source_filter)
+        except:
+            print(
+                "Error: unable to compile regex from arg -source-filter.",
+                file=sys.stderr,
+            )
+            sys.exit(1)
----------------
PiotrZSL wrote:

Print exception message, so user could know what's wrong with argument.

https://github.com/llvm/llvm-project/pull/82416
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to