[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

Paul Kirth via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 17 10:08:45 PDT 2025


================
@@ -0,0 +1,342 @@
+// RUN: rm -rf %t && mkdir -p %t/docs %t/build
----------------
ilovepi wrote:

Instead of an entirely new test, I'd prefer to see the differences in the existing test. Ideally expressed in a way that makes it clear what's different between the two.

So something like this, where 90% of the test can stay the same. we only need to add/changes
```
RUN: clang-doc  | FileCheck %s -check-prefixes=COMMON,DEFAULT-PREFIX
RUN: clang-doc --repository-line-prefix=L | FileCheck %s -check-prefixes=COMMON,LINE-PREFIX
//...

COMMON: A line that doesn't differ between the two
LINE-PREFIX: /some/file#L22
DEFAULT-PREFIX: /some/file#22
```

That may mean we can't use `-NEXT` as aggressively, but that's probably a worth while trade-off.

https://github.com/llvm/llvm-project/pull/131280


More information about the cfe-commits mailing list