[PATCH] D80126: Add documentation URL records to the .dia format and expose them via libclang

Jan Korous via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 21 10:48:15 PDT 2020


jkorous added a comment.

Hi Owen,
Do you plan to land the functionality for emitting documentation URLs in clang too?



================
Comment at: clang/lib/Frontend/SerializedDiagnosticReader.cpp:323
+      // A documentation URL has an ID and path size.
+      if (Record.size() != 2)
+        return SDError::MalformedDiagnosticRecord;
----------------
I am just wondering what happens with the ID. Shouldn't we pass it too?


================
Comment at: clang/test/Misc/serialized-diags-doumentation.c:4
+// CHECK: hello.swift:1:1: error: non-nominal type '(Int, Int)' cannot be extended [] []
+// CHECK: [Documentation URL: /Users/owenvoorhees/Documents/Development/swift-source/build/Ninja-ReleaseAssert/swift-macosx-x86_64/share/doc/swift/diagnostics/nominal-types.md]
----------------
Tip - you can use regexes in CHECKs.
https://llvm.org/docs/CommandGuide/FileCheck.html#filecheck-regex-matching-syntax

I think we should change this to something like:
```
// CHECK: [Documentation URL: {{.*}}/doc/swift/diagnostics/nominal-types.md]
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80126/new/

https://reviews.llvm.org/D80126





More information about the cfe-commits mailing list