[clang-tools-extra] [clang-doc] Add another test project to clang-doc (PR #97518)

2024-07-12 Thread Paul Kirth via cfe-commits
ilovepi wrote: Closing wasn’t necessary. The changes here could have just been made the the basic project instead of as new files. https://github.com/llvm/llvm-project/pull/97518 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang-tools-extra] [clang-doc] modify basic-project test (PR #97684)

2024-07-12 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. LGTM, but let’s update the pr title and description to match the current patch. Also, a title like modify tests isn’t very informative. Something like “Support markdown and simplify checks” seems more appropriate. Additionally, those two

[clang-tools-extra] [clang-doc] add nested namespace test case (PR #97681)

2024-07-12 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi commented: I think this mostly looks good, but I am concerned with the line number matching. It appears that whenever you’ve up’s the file you’ve had to update all the line numbers. Is it feasible to rewrite some of the checks to use the @LINE directive? Perhaps i

[clang-tools-extra] [clang-doc] add nested namespace test case (PR #97681)

2024-07-12 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/97681 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] add nested namespace test case (PR #97681)

2024-07-12 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/97681 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] add nested namespace test case (PR #97681)

2024-07-12 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/97681 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] add enum test (PR #97679)

2024-07-12 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,38 @@ +// RUN: clang-doc --format=html --doxygen --output=%t/docs --executor=standalone %s +// RUN: clang-doc --format=md --doxygen --output=%t/docs --executor=standalone %s +// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/index.html -check-prefix=HTML-INDEX

[clang-tools-extra] [clang-doc] add ftime profiling (PR #97644)

2024-07-12 Thread Paul Kirth via cfe-commits
@@ -13,12 +13,17 @@ #include "clang/Index/USRGeneration.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/Error.h" +#include "llvm/Support/TimeProfiler.h" namespace clang { namespace doc { void MapASTVisitor::HandleTranslationUnit(ASTContext &Context) { + if

[clang-tools-extra] [clang-doc] add ftime profiling (PR #97644)

2024-07-12 Thread Paul Kirth via cfe-commits
@@ -681,6 +683,7 @@ llvm::Error ClangDocBitcodeReader::readRecord(unsigned ID, Reference *I) { // Read a block of records into a single info. template llvm::Error ClangDocBitcodeReader::readBlock(unsigned ID, T I) { + llvm::TimeTraceScope("readBlock", "ClangDocBitcodeReader"

[clang-tools-extra] [clang-doc] add enum test (PR #97679)

2024-07-15 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,121 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --format=html --doxygen --output=%t --executor=standalone %s +// RUN: clang-doc --format=md --doxygen --output=%t --executor=standalone %s +// RUN: FileCheck %s < %t/GlobalNamespace/index.html -check-prefix=HTM

[clang-tools-extra] [clang-doc] add enum test (PR #97679)

2024-07-15 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,121 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --format=html --doxygen --output=%t --executor=standalone %s +// RUN: clang-doc --format=md --doxygen --output=%t --executor=standalone %s +// RUN: FileCheck %s < %t/GlobalNamespace/index.html -check-prefix=HTM

[clang-tools-extra] [clang-doc] add enum test (PR #97679)

2024-07-15 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,121 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --format=html --doxygen --output=%t --executor=standalone %s +// RUN: clang-doc --format=md --doxygen --output=%t --executor=standalone %s +// RUN: FileCheck %s < %t/GlobalNamespace/index.html -check-prefix=HTM

[clang-tools-extra] [clang-doc] add nested namespace test case (PR #97681)

2024-07-15 Thread Paul Kirth via cfe-commits
ilovepi wrote: > I don't think this possible since the line directive matches the line of the > html or md file you pipe into FileCheck, which is different from the line > that's define in the source code. I've opted for just matching any number to > make the test case less brittle I’m not s

[clang-tools-extra] [clang-doc] add nested namespace test case (PR #97681)

2024-07-15 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,270 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --format=html --output=%t --executor=standalone %s +// RUN: clang-doc --format=md --output=%t --executor=standalone %s +// RUN: FileCheck %s < %t/index_json.js -check-prefix=JSON-INDEX +// RUN: FileCheck %s < %

[clang-tools-extra] [clang-doc] add nested namespace test case (PR #97681)

2024-07-15 Thread Paul Kirth via cfe-commits
ilovepi wrote: To clarify my earlier comment, FileCheck is just matching text on the input based on the check lines. So in this cases the LINE directive should just affect what text will be accepted when doin matching. It won’t try to match the lines to the position in the file being checked.

[clang] [llvm] [CodeGen] Assign SHT_LLVM_LTO to .llvm.lto section (PR #92856)

2024-05-21 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. LGTM. I had thought I added you in https://github.com/llvm/llvm-project/pull/92820, but you're still listed as "request". I saw your avatar and just assumed you were a reviewer. Also, I guess I missed the clang test, when I was checking lo

[clang-tools-extra] [llvm] [clang-tidy] Restructure JSON profile structure to be parsable (PR #86821)

2024-05-23 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/86821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Clang doc async (PR #93276)

2024-05-24 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/93276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Clang doc async (PR #93276)

2024-05-24 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi requested changes to this pull request. I've noted several items that need to be addressed in line before this lands. Both the commit title and description need to be updated. Please add a tag `[clang-doc]` to the commit title, and include the full details of the pro

[clang-tools-extra] Clang doc async (PR #93276)

2024-05-24 Thread Paul Kirth via cfe-commits
@@ -1049,31 +1047,33 @@ static llvm::Error CopyFile(StringRef FilePath, StringRef OutDirectory) { std::error_code FileErr = llvm::sys::fs::copy_file(PathRead, PathWrite); if (FileErr != OK) { return llvm::createStringError(llvm::inconvertibleErrorCode(), -

[clang-tools-extra] Clang doc async (PR #93276)

2024-05-24 Thread Paul Kirth via cfe-commits
@@ -1049,31 +1047,33 @@ static llvm::Error CopyFile(StringRef FilePath, StringRef OutDirectory) { std::error_code FileErr = llvm::sys::fs::copy_file(PathRead, PathWrite); if (FileErr != OK) { return llvm::createStringError(llvm::inconvertibleErrorCode(), -

[clang-tools-extra] Clang doc async (PR #93276)

2024-05-24 Thread Paul Kirth via cfe-commits
@@ -155,6 +155,10 @@ Example usage for a project using a compile commands database: return 1; } + // add option to customize url fragment + // such as + // https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/clang-doc/ClangDocMain.cpp#L1 + -

[clang-tools-extra] Clang doc async (PR #93276)

2024-05-24 Thread Paul Kirth via cfe-commits
@@ -491,6 +491,7 @@ struct ClangDocContext { std::string SourceRoot; // Directory where processed files are stored. Links // to definition locations will only be generated if // the file is in this dir. + ---

[clang-tools-extra] Clang doc async (PR #93276)

2024-05-24 Thread Paul Kirth via cfe-commits
@@ -179,7 +183,7 @@ Example usage for a project using a compile commands database: SourceRoot, RepositoryUrl, {UserStylesheets.begin(), UserStylesheets.end()}, - {"index.js", "index_json.js"}}; + {"index.js"}}; ilovepi wrote: I ass

[clang-tools-extra] Clang doc async (PR #93276)

2024-05-24 Thread Paul Kirth via cfe-commits
@@ -82,6 +82,7 @@ function createIndex(Index) { document.addEventListener("DOMContentLoaded", function() { // JsonIndex is a variable from another file that contains the index // in JSON format - var Index = JSON.parse(JsonIndex); - createIndex(Index); + fetch("/index.js

[clang-tools-extra] Clang doc async (PR #93276)

2024-05-24 Thread Paul Kirth via cfe-commits
@@ -1049,31 +1047,33 @@ static llvm::Error CopyFile(StringRef FilePath, StringRef OutDirectory) { std::error_code FileErr = llvm::sys::fs::copy_file(PathRead, PathWrite); if (FileErr != OK) { return llvm::createStringError(llvm::inconvertibleErrorCode(), -

[clang-tools-extra] clang-doc switched from using relative to absolute paths (PR #93281)

2024-05-24 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/93281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] clang-doc switched from using relative to absolute paths (PR #93281)

2024-05-24 Thread Paul Kirth via cfe-commits
@@ -1,48 +1,22 @@ -// Append using posix-style a file name or directory to Base -function append(Base, New) { - if (!New) -return Base; - if (Base) -Base += "/"; - Base += New; - return Base; -} - -// Get relative path to access FilePath from CurrentDirectory -function

[clang-tools-extra] clang-doc switched from using relative to absolute paths (PR #93281)

2024-05-24 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi requested changes to this pull request. I'm not completely sure we want to use absolute paths, but since this mostly seems related to URLs and not file system paths, its probably fine. Please add some tests for this. It's preferable if we can pre-commit tests with th

[clang-tools-extra] clang-doc switched from using relative to absolute paths (PR #93281)

2024-05-24 Thread Paul Kirth via cfe-commits
@@ -1,48 +1,22 @@ -// Append using posix-style a file name or directory to Base -function append(Base, New) { - if (!New) -return Base; - if (Base) -Base += "/"; - Base += New; - return Base; -} - -// Get relative path to access FilePath from CurrentDirectory -function

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-07-31 Thread Paul Kirth via cfe-commits
ilovepi wrote: This isn't fixing anything. Its re-enabling it. I'd also suggest adding people from that bug as reviewers to help you get this re-enabled. https://github.com/llvm/llvm-project/pull/101387 ___ cfe-commits mailing list cfe-commits@lists.l

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -384,5 +384,12 @@ ClangDocContext::ClangDocContext(tooling::ExecutionContext *ECtx, } } +void ScopeChildren::sort() { + std::sort(Namespaces.begin(), Namespaces.end()); ilovepi wrote: Prefer llvm::sort. https://llvm.org/docs/CodingStandards.html#bewar

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -104,6 +104,9 @@ struct Reference { bool mergeable(const Reference &Other); void merge(Reference &&I); + bool operator<(const Reference &Other) const { ilovepi wrote: How stable are usrs? Perhaps we should be sorting on another property? https://gith

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -104,6 +104,9 @@ struct Reference { bool mergeable(const Reference &Other); void merge(Reference &&I); + bool operator<(const Reference &Other) const { ilovepi wrote: My concern here is that we probably want clang-doc to output to be ordered consiste

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
ilovepi wrote: In the description, its probably better to use the `#` notation than linkify `PR`. Most of us will only see the raw text in the commit message, and while a full link is appreciated, it would be good to know the PR number at a glance. https://github.com/llvm/llvm-project/pull/10

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -312,6 +317,16 @@ struct SymbolInfo : public Info { std::optional DefLoc; // Location where this decl is defined. llvm::SmallVector Loc; // Locations where this decl is declared. + + bool operator<(const SymbolInfo &Other) const { +if (DefLoc && Other.DefLoc) {

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -270,10 +273,12 @@ struct Info { virtual ~Info() = default; + Info &operator=(Info &&Other) = default; + SymbolID USR = SymbolID(); // Unique identifier for the decl described by this Info. - const InfoType IT = InfoType::IT_default; // InfoType of this parti

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -312,6 +317,16 @@ struct SymbolInfo : public Info { std::optional DefLoc; // Location where this decl is defined. llvm::SmallVector Loc; // Locations where this decl is declared. + + bool operator<(const SymbolInfo &Other) const { +if (DefLoc && Other.DefLoc) {

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -312,6 +317,16 @@ struct SymbolInfo : public Info { std::optional DefLoc; // Location where this decl is defined. llvm::SmallVector Loc; // Locations where this decl is declared. + + bool operator<(const SymbolInfo &Other) const { +if (DefLoc && Other.DefLoc) {

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -312,6 +317,16 @@ struct SymbolInfo : public Info { std::optional DefLoc; // Location where this decl is defined. llvm::SmallVector Loc; // Locations where this decl is declared. + + bool operator<(const SymbolInfo &Other) const { +if (DefLoc && Other.DefLoc) {

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -205,6 +205,22 @@ llvm::Error getHtmlAssetFiles(const char *Argv0, return getDefaultAssetFiles(Argv0, CDCtx); } +/// Make the output of clang-doc deterministic by sorting the children of +/// namespaces and records. +void sortUsrToInfo(llvm::StringMap> &USRToInfo) { + fo

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -312,6 +317,16 @@ struct SymbolInfo : public Info { std::optional DefLoc; // Location where this decl is defined. llvm::SmallVector Loc; // Locations where this decl is declared. + + bool operator<(const SymbolInfo &Other) const { +if (DefLoc && Other.DefLoc) {

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -205,6 +205,22 @@ llvm::Error getHtmlAssetFiles(const char *Argv0, return getDefaultAssetFiles(Argv0, CDCtx); } +/// Make the output of clang-doc deterministic by sorting the children of +/// namespaces and records. +void sortUsrToInfo(llvm::StringMap> &USRToInfo) { + fo

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -312,6 +317,16 @@ struct SymbolInfo : public Info { std::optional DefLoc; // Location where this decl is defined. llvm::SmallVector Loc; // Locations where this decl is declared. + + bool operator<(const SymbolInfo &Other) const { +if (DefLoc && Other.DefLoc) {

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-02 Thread Paul Kirth via cfe-commits
@@ -312,6 +322,20 @@ struct SymbolInfo : public Info { std::optional DefLoc; // Location where this decl is defined. llvm::SmallVector Loc; // Locations where this decl is declared. + + bool operator<(const SymbolInfo &Other) const { +// Sort by declaration locati

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-02 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. LGTM, but test locally w/ LLVM_ENABLE_EXPENSIVE_CHECKS=On https://llvm.org/docs/CMake.html. If that passes, then go ahead and land this, since I think the nondeterminism in output order will be accounted for. https://github.com/llvm/llvm-p

[clang] [Clang] [Sema] Error on reference types inside a union with msvc 1900+ (PR #102851)

2024-08-16 Thread Paul Kirth via cfe-commits
ilovepi wrote: Hi, I think we're seeing a libc++ test fail after this patch in our Windows CI. I'm working on getting access to a windows machine to verify, but would you mind taking a look? From the blame, and because this references MSVC behavior I'm pretty sure its related, but like I said

[clang] [Clang] [Test] Use lit Syntax for Environment Variables in Clang subproject (PR #102647)

2024-08-21 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/102647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [clang][compiler-rt][test] Removed dirname command substitutions from tests (PR #105754)

2024-08-23 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. https://github.com/llvm/llvm-project/pull/105754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [clang][compiler-rt][test] Removed dirname command substitutions from tests (PR #105754)

2024-08-23 Thread Paul Kirth via cfe-commits
@@ -3,63 +3,64 @@ // REQUIRES: amdgpu-registered-target // UNSUPPORTED: system-windows -// RUN: %clang -cc1 %s -triple x86_64-unknown-linux-gnu -emit-obj -o %t.elf.o +// RUN: rm -rf %t && mkdir -p %t +// RUN: %clang -cc1 %s -triple x86_64-unknown-linux-gnu -emit-obj -o %t/elf.

[clang] [clang][test] Rewrote test to work with lit internal shell syntax (PR #105902)

2024-08-23 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,22 @@ +import argparse ilovepi wrote: does this require a license/copyright header? I see a `#!/usr/bin/env python` in https://github.com/llvm/llvm-project/blob/cdd11d694a406a98a16d6265168ee2fbe1b6a87c/llvm/utils/lit/tests/Inputs/shtest-env/print_e

[clang] [clang][test] Rewrote test to work with lit internal shell syntax (PR #105902)

2024-08-23 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,22 @@ +import argparse +import os + +def get_file_size(file_path): +try: +return os.path.getsize(file_path) +except: +print(f"Unable to get file size of {file_path}") +return None + +def main(): ilovepi wrote: Please add

[clang] [clang][test] Rewrote test to work with lit internal shell syntax (PR #105902)

2024-08-23 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,22 @@ +import argparse +import os + +def get_file_size(file_path): +try: +return os.path.getsize(file_path) +except: +print(f"Unable to get file size of {file_path}") +return None ilovepi wrote: Is the `try/except` bette

[clang] [clang][test] Rewrote test to work with lit internal shell syntax (PR #105902)

2024-08-23 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,22 @@ +import argparse ilovepi wrote: @pogo59 You mentioned in the [RFC](https://discourse.llvm.org/t/rfc-enabling-the-lit-internal-shell-by-default/80179/29) that when there isn't another good option that a python script may be an OK substitute in

[clang-tools-extra] Revert "[clang-doc] Add --asset option to clang-doc" (PR #96354)

2024-06-21 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/96354 Reverts llvm/llvm-project#94717 This breaks on some buildbots: http://45.33.8.238/linux/141118/step_7.txt >From d9075144100406eed753f1b7ca3df933a596bb3a Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Fri, 21 J

[clang-tools-extra] Revert "[clang-doc] Add --asset option to clang-doc" (PR #96354)

2024-06-21 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi ready_for_review https://github.com/llvm/llvm-project/pull/96354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Revert "[clang-doc] Add --asset option to clang-doc" (PR #96354)

2024-06-21 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/96354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-21 Thread Paul Kirth via cfe-commits
ilovepi wrote: > Looks Like this might break tests: http://45.33.8.238/linux/141118/step_7.txt > > Please take a look and revert for now if it takes a while to fix. Sorry for the late revert @nico. I'll have @PeterChou1 investigate before relanding. https://github.com/llvm/llvm-project/pull/9

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-21 Thread Paul Kirth via cfe-commits
ilovepi wrote: @nico Actually, I probably shouldn't have reverted. It seems like your GN build is incorrect, and isn't copying the asset files into the right place. The patch that updated that landed in https://github.com/llvm/llvm-project/pull/95187. @PeterChou1 is going to add you as a revie

[clang-tools-extra] reapply [clang-doc] Add --asset option to clang-doc" (#96354)" (PR #96358)

2024-06-21 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi commented: LGTM, but wait for Nico to chime in please. https://github.com/llvm/llvm-project/pull/96358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][misexpect] Update MisExpect to use provenance tracking metadata (PR #86610)

2024-06-24 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/86610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][ProfDataUtils] provide getNumBranchWeights API (PR #90146)

2024-06-24 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/90146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][misexpect] Update MisExpect to use provenance tracking metadata (PR #86610)

2024-06-24 Thread Paul Kirth via cfe-commits
ilovepi wrote: Ping. Now that the metadata patches have landed, I think we can start discussing using that in MisExpect. https://github.com/llvm/llvm-project/pull/86610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang-tools-extra] reapply [clang-doc] Add --asset option to clang-doc (PR #96358)

2024-06-24 Thread Paul Kirth via cfe-commits
@@ -25,7 +25,7 @@ set(assets ) set(asset_dir "${CMAKE_CURRENT_SOURCE_DIR}/../assets") -set(resource_dir "${CMAKE_BINARY_DIR}/share/clang") ilovepi wrote: Can we do this updating in a standalone patch? Same for the other places where you've updated the path.

[clang-tools-extra] reapply [clang-doc] Add --asset option to clang-doc (PR #96358)

2024-06-24 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: rm -rf %t && mkdir -p %t/docs %t/build ilovepi wrote: do you need `%t/build`? if not, then you can probably just use `%t` instead of `%t/docs`. https://github.com/llvm/llvm-project/pull/96358 ___

[clang-tools-extra] reapply [clang-doc] Add --asset option to clang-doc (PR #96358)

2024-06-24 Thread Paul Kirth via cfe-commits
@@ -25,7 +25,7 @@ set(assets ) set(asset_dir "${CMAKE_CURRENT_SOURCE_DIR}/../assets") -set(resource_dir "${CMAKE_BINARY_DIR}/share/clang") ilovepi wrote: Oh, it also fails to update the install target paths, which will be installed in `share/clang`. So even

[clang] [llvm] [RISCV] Remove experimental from Ztso. (PR #96465)

2024-06-24 Thread Paul Kirth via cfe-commits
ilovepi wrote: > CC: @ilovepi who was missing with Atomic ABI attributes in #90266 I'll try to get that out today, and then at least this won't be blocked on anything. That said, the story on Linker support isn't clear to me about what expectations we should have. I imagine a lot of that will

[clang-tools-extra] [clang-doc] Remove stdexecpt from clang-doc test (PR #96552)

2024-06-24 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/96552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] reapply [clang-doc] Add --asset option to clang-doc (PR #96358)

2024-06-24 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: rm -rf %t && mkdir %t +// RUN: clang-doc --format=html --output=%t --asset=%S/Inputs/test-assets --executor=standalone %s --output=%t/docs +// RUN: FileCheck %s -input-file=%t/docs/index.html -check-prefix=INDEX +// RUN: FileCheck %s -input-file=%t/docs/

[clang-tools-extra] reapply [clang-doc] Add --asset option to clang-doc (PR #96358)

2024-06-24 Thread Paul Kirth via cfe-commits
@@ -1,5 +1,4 @@ #include "Calculator.h" -#include ilovepi wrote: can we leave the changes in #96552 out of this patch? https://github.com/llvm/llvm-project/pull/96358 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] [llvm] [llvm][ProfDataUtils] provide getNumBranchWeights API (PR #90146)

2024-06-24 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/90146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] reapply [clang-doc] Add --asset option to clang-doc (PR #96358)

2024-06-24 Thread Paul Kirth via cfe-commits
ilovepi wrote: Can you update the commit message to describe why this can be relanded, and what this patch does? A good rule of thumb is to include the entire original commit message, followed by a short paragraph describing what's changed. https://github.com/llvm/llvm-project/pull/96358 _

[clang-tools-extra] [clang-doc] update install path to share/clang-doc instead of share/clang (PR #96555)

2024-06-25 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/96555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Remove stdexecpt from clang-doc test (PR #96552)

2024-06-25 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/96552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] reapply [clang-doc] Add --asset option to clang-doc (PR #96358)

2024-06-25 Thread Paul Kirth via cfe-commits
ilovepi wrote: The two complementary patches, making the test free standing, and fixing the default asset path to be `share/clang-doc` have landed now. Can you update your patch, and resolve conflicts. If that passes CI, then I think we're probably about ready to reland. https://github.com/ll

[clang-tools-extra] reapply [clang-doc] Add --asset option to clang-doc (PR #96358)

2024-06-25 Thread Paul Kirth via cfe-commits
ilovepi wrote: Seems like a tidy test is failing on windows ... can you try updating the branch once more? https://github.com/llvm/llvm-project/pull/96358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang-tools-extra] [clang-doc] Improve performance by adding a short circuit (PR #96809)

2024-06-26 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/96809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Improve performance by adding a short circuit (PR #96809)

2024-06-26 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi requested changes to this pull request. While this is likely a step in the right direction, I'm a bit skeptical that this patch is entirely correct. First, I think we need to understand why we only want to cache/memoize the USR strings from definitions. Second, th

[clang-tools-extra] [clang-doc] Improve performance by adding a short circuit (PR #96809)

2024-06-26 Thread Paul Kirth via cfe-commits
@@ -12,16 +12,25 @@ #include "clang/AST/Comment.h" #include "clang/Index/USRGeneration.h" #include "llvm/ADT/StringExtras.h" -#include "llvm/Support/Error.h" +#include "llvm/Support/Mutex.h" +#include namespace clang { namespace doc { + +static std::unordered_set USRVisi

[clang-tools-extra] [clang-doc] Improve performance by adding a short circuit (PR #96809)

2024-06-26 Thread Paul Kirth via cfe-commits
@@ -34,13 +43,26 @@ template bool MapASTVisitor::mapDecl(const T *D) { // If there is an error generating a USR for the decl, skip this decl. if (index::generateUSRForDecl(D, USR)) return true; + + // Prevent Visiting USR twice + { +std::lock_guard Guard(USRVisi

[clang-tools-extra] [clang-doc] Improve performance by adding a short circuit (PR #96809)

2024-06-26 Thread Paul Kirth via cfe-commits
@@ -34,13 +43,26 @@ template bool MapASTVisitor::mapDecl(const T *D) { // If there is an error generating a USR for the decl, skip this decl. if (index::generateUSRForDecl(D, USR)) return true; + + // Prevent Visiting USR twice + { +std::lock_guard Guard(USRVisi

[clang-tools-extra] [clang-doc] Improve performance by adding a short circuit (PR #96809)

2024-06-26 Thread Paul Kirth via cfe-commits
@@ -34,13 +43,26 @@ template bool MapASTVisitor::mapDecl(const T *D) { // If there is an error generating a USR for the decl, skip this decl. if (index::generateUSRForDecl(D, USR)) return true; + + // Prevent Visiting USR twice + { +std::lock_guard Guard(USRVisi

[clang-tools-extra] [clang-doc] Improve performance by adding a short circuit (PR #96809)

2024-06-26 Thread Paul Kirth via cfe-commits
@@ -12,16 +12,25 @@ #include "clang/AST/Comment.h" #include "clang/Index/USRGeneration.h" #include "llvm/ADT/StringExtras.h" -#include "llvm/Support/Error.h" +#include "llvm/Support/Mutex.h" +#include namespace clang { namespace doc { + +static std::unordered_set USRVisi

[clang-tools-extra] [clang-doc] Improve performance by adding a short circuit (PR #96809)

2024-06-26 Thread Paul Kirth via cfe-commits
@@ -34,13 +43,26 @@ template bool MapASTVisitor::mapDecl(const T *D) { // If there is an error generating a USR for the decl, skip this decl. if (index::generateUSRForDecl(D, USR)) return true; + + // Prevent Visiting USR twice + { +std::lock_guard Guard(USRVisi

[clang-tools-extra] [clang-doc] Improve performance by adding a short circuit (PR #96809)

2024-06-26 Thread Paul Kirth via cfe-commits
@@ -34,13 +43,26 @@ template bool MapASTVisitor::mapDecl(const T *D) { // If there is an error generating a USR for the decl, skip this decl. if (index::generateUSRForDecl(D, USR)) return true; + + // Prevent Visiting USR twice + { +std::lock_guard Guard(USRVisi

[clang-tools-extra] [clang-doc] Improve performance by adding a short circuit (PR #96809)

2024-06-27 Thread Paul Kirth via cfe-commits
@@ -34,13 +43,26 @@ template bool MapASTVisitor::mapDecl(const T *D) { // If there is an error generating a USR for the decl, skip this decl. if (index::generateUSRForDecl(D, USR)) return true; + + // Prevent Visiting USR twice + { +std::lock_guard Guard(USRVisi

[clang-tools-extra] [clang-doc][nfc] Avoid constructing SmallString in ToString method (PR #96921)

2024-06-27 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/96921 This patch updates the return type HTMLTag::toString from SmallString<16> to const char*, since this API only has a single use to emit the string into an output stream. As a result, there is no need to construct a

[clang-tools-extra] [clang-doc][nfc] Avoid constructing SmallString in ToString method (PR #96921)

2024-06-27 Thread Paul Kirth via cfe-commits
ilovepi wrote: @PeterChou1 please take a look and provide some feedback. https://github.com/llvm/llvm-project/pull/96921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc][nfc] Avoid constructing SmallString in ToString method (PR #96921)

2024-06-27 Thread Paul Kirth via cfe-commits
@@ -56,7 +56,7 @@ class HTMLTag { operator bool() = delete; bool IsSelfClosing() const; - llvm::SmallString<16> ToString() const; + const char* toString() const; ilovepi wrote: Maybe this should be renamed to `c_str()` or `str()`? https://github.com/ll

[clang-tools-extra] [clang-doc][NFC] Fix style guide violations in HTMLGenerator.cpp (PR #96924)

2024-06-27 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/96924 This patch addresses several code style issues that conflict with the project's style guide. Primarily the naming of functions, and `else` after `return` statements. It only addresses issues found in HTMLGenerator

[clang-tools-extra] [clang-doc][NFC] Fix style guide violations in HTMLGenerator.cpp (PR #96924)

2024-06-27 Thread Paul Kirth via cfe-commits
ilovepi wrote: @PeterChou1 please take a look at this patch, and provide some feedback. https://github.com/llvm/llvm-project/pull/96924 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] reapply [clang-doc] Add --asset option to clang-doc (PR #96358)

2024-06-27 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/96358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Improve performance by adding a short circuit (PR #96809)

2024-06-27 Thread Paul Kirth via cfe-commits
@@ -34,13 +43,26 @@ template bool MapASTVisitor::mapDecl(const T *D) { // If there is an error generating a USR for the decl, skip this decl. if (index::generateUSRForDecl(D, USR)) return true; + + // Prevent Visiting USR twice + { +std::lock_guard Guard(USRVisi

[clang-tools-extra] [clang-doc][NFC] Fix style guide violations in HTMLGenerator.cpp (PR #96924)

2024-06-27 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/96924 >From 57a0b31b9b3fed6df56c251609076a89e951ef92 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Thu, 27 Jun 2024 09:27:15 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF-8

[clang-tools-extra] [clang-doc][NFC] Fix style guide violations in HTMLGenerator.cpp (PR #96924)

2024-06-27 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/96924 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Improve performance by adding a short circuit (PR #96809)

2024-06-27 Thread Paul Kirth via cfe-commits
@@ -34,13 +43,26 @@ template bool MapASTVisitor::mapDecl(const T *D) { // If there is an error generating a USR for the decl, skip this decl. if (index::generateUSRForDecl(D, USR)) return true; + + // Prevent Visiting USR twice + { +std::lock_guard Guard(USRVisi

[clang-tools-extra] [clang-doc][nfc] Avoid constructing SmallString in ToString method (PR #96921)

2024-06-28 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/96921 >From f2251efabbc1a59e87b25285f7173161e6f63d22 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Thu, 27 Jun 2024 09:13:01 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF-8

[clang-tools-extra] [clang-doc][nfc] Avoid constructing SmallString in ToString method (PR #96921)

2024-06-28 Thread Paul Kirth via cfe-commits
@@ -56,7 +56,7 @@ class HTMLTag { operator bool() = delete; bool IsSelfClosing() const; - llvm::SmallString<16> ToString() const; + const char* toString() const; ilovepi wrote: done https://github.com/llvm/llvm-project/pull/96921 __

[clang-tools-extra] [clang-doc][nfc] Avoid constructing SmallString in ToString method (PR #96921)

2024-06-28 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/96921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc][nfc] Avoid constructing SmallString in ToString method (PR #96921)

2024-06-28 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/96921 >From f2251efabbc1a59e87b25285f7173161e6f63d22 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Thu, 27 Jun 2024 09:13:01 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF-8

<    1   2   3   4   5   6   7   8   9   10   >