This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] ClangSA should tablegen doc urls refering to the main doc page
ClosedPublic

Authored by steakhal on Mar 10 2022, 9:28 AM.

Details

Summary

AFAIK we should prefer
https://clang.llvm.org/docs/analyzer/checkers.html to https://clang-analyzer.llvm.org/{available_checks,alpha_checks}.html

This patch will ensure that the doc urls produced by tablegen for the
ClangSA, will use the new url. Nothing else will be changed.

Diff Detail

Event Timeline

steakhal created this revision.Mar 10 2022, 9:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 10 2022, 9:28 AM
steakhal requested review of this revision.Mar 10 2022, 9:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 10 2022, 9:28 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
Szelethus accepted this revision.Mar 11 2022, 2:29 AM

Nice!

clang/utils/TableGen/ClangSACheckersEmitter.cpp
27

Do you foresee a change in the default separator? I think an eventual shift away from packages is more likely (see https://discourse.llvm.org/t/analyzer-refactoring-analyzeroptions/50160/5).

I this an unnecessary complexity, but its not a hill I will die on.

edit: I just realized that you need this for the url, so never mind. I grave dug a 3 yr old topic on discourse because of it :^) Oops.

This revision is now accepted and ready to land.Mar 11 2022, 2:29 AM
steakhal updated this revision to Diff 415747.Mar 16 2022, 2:51 AM

Fix the single case when the Sep was not forwarded.

I'd like to reach a wider consensus regarding this patch. @aaron.ballman @NoQ

martong added inline comments.Mar 21 2022, 7:59 AM
clang/utils/TableGen/ClangSACheckersEmitter.cpp
89–90

This patch will ensure that the doc urls produced by tablegen for the ClangSA, will use the new url. Nothing else will be changed.

If that was the case then we'd need only this hunk of change plus the test file. Perhaps it would make sense to either split this to more patches

  • Adding Sep
  • Handling missing documentation
  • new url

Or please change the description of the patch about these changes.

steakhal updated this revision to Diff 417344.Mar 22 2022, 11:09 AM
steakhal marked an inline comment as done.

Now it should be much smaller.
Sorry for not doing this in the first place.

clang/utils/TableGen/ClangSACheckersEmitter.cpp
89–90

Thanks, done.

martong accepted this revision.Mar 26 2022, 6:14 AM

(Side note: you should avoid the list-expansion syntax in URLs because browsers do not understand them and result in links that are not leading anywhere.)

I like this. We should continue getting to the point where the documentation is having a uniform layout.

ASDenysPetrov accepted this revision.Apr 12 2022, 9:41 AM

Thanks! LGTM.

clang/utils/TableGen/ClangSACheckersEmitter.cpp
87–90

IMO it's a bit messy here.