@@ -0,0 +1,29 @@
+/// Invalid output path (%t is a file, not a directory).
+// RUN: rm -rf %t && touch %t
+// RUN: not clang-doc %s -output=%t/subdir 2>&1 | FileCheck %s
+// CHECK: clang-doc error:
+// CHECK: {{(Not a directory|no such file or directory)}}
+
+/// Invalid format op
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/141699
>From f0b3184f2d4342eb0aacf3a77671556ac2e57650 Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Tue, 27 May 2025 21:32:41 -0400
Subject: [PATCH 01/14] [clang-doc] Refactor error handling to use ExitOnError
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/141699
>From f0b3184f2d4342eb0aacf3a77671556ac2e57650 Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Tue, 27 May 2025 21:32:41 -0400
Subject: [PATCH 01/17] [clang-doc] Refactor error handling to use ExitOnError
snarang181 wrote:
Thanks again @ilovepi for the handholding, appreciate it.
BTW -- do you know what's going on with the Linux CI?
https://github.com/llvm/llvm-project/pull/141699
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.
snarang181 wrote:
@ilovepi, requesting your review here.
https://github.com/llvm/llvm-project/pull/141699
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
snarang181 wrote:
I made the requested changes, can the CI workflows be triggered? I do not have
access.
https://github.com/llvm/llvm-project/pull/141699
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/li
https://github.com/snarang181 edited
https://github.com/llvm/llvm-project/pull/141699
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/141699
>From b2dc4f8a50d86ecdc5fd27fedd7efde5c6882df5 Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Tue, 27 May 2025 21:32:41 -0400
Subject: [PATCH 1/2] [clang-doc] Refactor error handling to use ExitOnError
@@ -373,20 +370,16 @@ Example usage for a project using a compile commands
database:
// Ensure the root output directory exists.
if (std::error_code Err = llvm::sys::fs::create_directories(OutDirectory);
Err != std::error_code()) {
-llvm::errs() << "Failed to cre
@@ -0,0 +1,4 @@
+// RUN: not clang-doc %S/Inputs/basic-project/src/Circle.cpp
-output=/root/docs 2>&1 | FileCheck %s
snarang181 wrote:
Sorry, I might be misunderstanding but won't
`llvm::sys::fs::create_directories()` create a valid directory path?
Giving the
https://github.com/snarang181 edited
https://github.com/llvm/llvm-project/pull/141699
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
snarang181 wrote:
@ilovepi, wrapped the creation of the `Executor` in the error handler, created
a helper like you suggested, and added a test case for the creation of the
`Executor` failing.
https://github.com/llvm/llvm-project/pull/141699
___
cfe-
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/141699
>From 1cddd0889b2aa322e1d1fce1225d6da0f5e8cc20 Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Tue, 27 May 2025 21:32:41 -0400
Subject: [PATCH 01/12] [clang-doc] Refactor error handling to use ExitOnError
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/141699
>From f0b3184f2d4342eb0aacf3a77671556ac2e57650 Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Tue, 27 May 2025 21:32:41 -0400
Subject: [PATCH 01/15] [clang-doc] Refactor error handling to use ExitOnError
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/141699
>From f0b3184f2d4342eb0aacf3a77671556ac2e57650 Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Tue, 27 May 2025 21:32:41 -0400
Subject: [PATCH 01/16] [clang-doc] Refactor error handling to use ExitOnError
https://github.com/snarang181 edited
https://github.com/llvm/llvm-project/pull/142273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/snarang181 converted_to_draft
https://github.com/llvm/llvm-project/pull/142273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/snarang181 ready_for_review
https://github.com/llvm/llvm-project/pull/142273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/142273
>From 725dd21adcd2f776b2e6adc648e3038812059bf3 Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Sat, 31 May 2025 10:05:52 -0400
Subject: [PATCH 1/6] [clang-doc] Refactor CommentInfo.Kind to use CommentKind
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/142273
>From cd99fbe06a384db3775d1fc8c923275df07d4db3 Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Sat, 31 May 2025 10:05:52 -0400
Subject: [PATCH 1/7] [clang-doc] Refactor CommentInfo.Kind to use CommentKind
https://github.com/snarang181 created
https://github.com/llvm/llvm-project/pull/142273
None
>From 725dd21adcd2f776b2e6adc648e3038812059bf3 Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Sat, 31 May 2025 10:05:52 -0400
Subject: [PATCH 1/2] [clang-doc] Refactor CommentInfo.Kind to use Comme
https://github.com/snarang181 edited
https://github.com/llvm/llvm-project/pull/142273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
snarang181 wrote:
@ilovepi, thanks for the patience and taking out the time to give detailed
reviews. I will work on addresing your comments. One word on the tests: I was
trying to test some of the other fail conditions but seems like a lot of the
error conditions are caught by the parsing ear
@@ -284,10 +284,7 @@ Example usage for a project using a compile commands
database:
{UserStylesheets.begin(), UserStylesheets.end()}};
if (Format == "html") {
-if (auto Err = getHtmlAssetFiles(argv[0], CDCtx)) {
- llvm::errs() << toString(std::move(Err)) << "
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/141699
>From b2dc4f8a50d86ecdc5fd27fedd7efde5c6882df5 Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Tue, 27 May 2025 21:32:41 -0400
Subject: [PATCH 1/7] [clang-doc] Refactor error handling to use ExitOnError
@@ -300,7 +297,7 @@ Example usage for a project using a compile commands
database:
"these files and continue:\n"
<< toString(std::move(Err)) << "\n";
else {
- llvm::errs() << toString(std::move(Err)) << "\n";
s
snarang181 wrote:
Also, from the CI test run, I see the Linux build failing. This seems
unrelated, right? Does it warrant a rerun?
```
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/math/smoke/HypotTest.h:31:
FAILURE
Failed to match aNaN against LIBC_NAMESPACE::testing:
@@ -0,0 +1,12 @@
+// Test: Invalid output path (%t is a file, not a directory)
snarang181 wrote:
Thanks for the pointer.
https://github.com/llvm/llvm-project/pull/141699
___
cfe-commits mailing list
cfe-commits@lists.
@@ -0,0 +1,12 @@
+// Test: Invalid output path (%t is a file, not a directory)
+// RUN: rm -rf %t && echo "not a dir" > %t
+// RUN: not clang-doc %s -output=%t/subdir 2>&1 | FileCheck
--check-prefix=BAD-OUTPUT %s
+
+// BAD-OUTPUT: clang-doc error:
+// BAD-OUTPUT: {{(Not a directo
@@ -371,22 +368,15 @@ Example usage for a project using a compile commands
database:
sortUsrToInfo(USRToInfo);
// Ensure the root output directory exists.
- if (std::error_code Err = llvm::sys::fs::create_directories(OutDirectory);
- Err != std::error_code()) {
-
https://github.com/snarang181 edited
https://github.com/llvm/llvm-project/pull/141699
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,12 @@
+// Test: Invalid output path (%t is a file, not a directory)
+// RUN: rm -rf %t && echo "not a dir" > %t
+// RUN: not clang-doc %s -output=%t/subdir 2>&1 | FileCheck
--check-prefix=BAD-OUTPUT %s
+
+// BAD-OUTPUT: clang-doc error:
+// BAD-OUTPUT: {{(Not a directo
@@ -373,20 +370,16 @@ Example usage for a project using a compile commands
database:
// Ensure the root output directory exists.
if (std::error_code Err = llvm::sys::fs::create_directories(OutDirectory);
Err != std::error_code()) {
-llvm::errs() << "Failed to cre
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/141699
>From b2dc4f8a50d86ecdc5fd27fedd7efde5c6882df5 Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Tue, 27 May 2025 21:32:41 -0400
Subject: [PATCH 1/6] [clang-doc] Refactor error handling to use ExitOnError
snarang181 wrote:
@ilovepi -- In the updated version, I have used the `createFileError()` API and
checked that the output is reliable. Also, I have renamed the lit test file; in
the tests, I create a temporary file using `%t` and then obviously, it cannot
create a directory there. Hopefully th
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/142273
>From 725dd21adcd2f776b2e6adc648e3038812059bf3 Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Sat, 31 May 2025 10:05:52 -0400
Subject: [PATCH 1/4] [clang-doc] Refactor CommentInfo.Kind to use CommentKind
https://github.com/snarang181 ready_for_review
https://github.com/llvm/llvm-project/pull/142273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
snarang181 wrote:
@ilovepi, would be great to get your review here.
https://github.com/llvm/llvm-project/pull/142273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/142273
>From 725dd21adcd2f776b2e6adc648e3038812059bf3 Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Sat, 31 May 2025 10:05:52 -0400
Subject: [PATCH 1/5] [clang-doc] Refactor CommentInfo.Kind to use CommentKind
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/142273
>From cd99fbe06a384db3775d1fc8c923275df07d4db3 Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Sat, 31 May 2025 10:05:52 -0400
Subject: [PATCH 1/8] [clang-doc] Refactor CommentInfo.Kind to use CommentKind
@@ -26,6 +26,66 @@
namespace clang {
namespace doc {
+CommentKind stringToCommentKind(llvm::StringRef KindStr) {
+ if (KindStr == "FullComment")
+return CommentKind::CK_FullComment;
snarang181 wrote:
Updated the function to do a `StringMap` lookup.
htt
https://github.com/snarang181 commented:
Looks fine. But I see your point regarding portability, I'll think how we can
modify this.
https://github.com/llvm/llvm-project/pull/142373
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/142273
>From 51adbab1511e92c44925d20661ed86d2ab28dca0 Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Sat, 31 May 2025 10:05:52 -0400
Subject: [PATCH 1/9] [clang-doc] Refactor CommentInfo.Kind to use CommentKind
snarang181 wrote:
Left a reply to this
[comment](https://github.com/llvm/llvm-project/pull/142273/files#r2125020120)
@ilovepi. Addressed some other comments.
https://github.com/llvm/llvm-project/pull/142273
___
cfe-commits mailing list
cfe-commits@l
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/142273
>From 51adbab1511e92c44925d20661ed86d2ab28dca0 Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Sat, 31 May 2025 10:05:52 -0400
Subject: [PATCH 01/10] [clang-doc] Refactor CommentInfo.Kind to use
CommentK
snarang181 wrote:
@ilovepi, for this check, should we just be looking for "clang doc error: " and
remove the directory substring matching entirely?
https://github.com/llvm/llvm-project/pull/142373
___
cfe-commits mailing list
cfe-commits@lists.llvm.
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/142273
>From 6610faa1775c290fa44b0c498ac19ef26ad599ac Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Sat, 31 May 2025 10:05:52 -0400
Subject: [PATCH 01/13] [clang-doc] Refactor CommentInfo.Kind to use
CommentK
snarang181 wrote:
> LGTM once the last few nits are addressed.
@ilovepi, for the last few nits,
- Removed the `default` case in the switch, and manually returning `nullptr`
for all the unhandled cases.
- Removed the braces in the `case` of the `switch` and shifted the variable
decl. inside o
snarang181 wrote:
> LGTM. Thanks for the patch
Awesome, feel free to merge when you see fit. I don't think I can do so myself.
https://github.com/llvm/llvm-project/pull/142273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm
snarang181 wrote:
@ilovepi, this failure is probably related to the merged PR, right?
https://github.com/llvm/llvm-project/pull/142273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/snarang181 created
https://github.com/llvm/llvm-project/pull/143275
None
>From dc4e3c9afbef406ae1acbd572dfe9edd9d5efea3 Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Sat, 7 Jun 2025 12:21:17 -0400
Subject: [PATCH] Replace loop with llvm:any_of
---
clang/include/clang
https://github.com/snarang181 edited
https://github.com/llvm/llvm-project/pull/143275
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/snarang181 edited
https://github.com/llvm/llvm-project/pull/143275
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/snarang181 edited
https://github.com/llvm/llvm-project/pull/143275
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/snarang181 ready_for_review
https://github.com/llvm/llvm-project/pull/143275
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
snarang181 wrote:
@ChuanqiXu9, requesting your review here.
https://github.com/llvm/llvm-project/pull/143275
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/142273
>From 5bc81ef0cd42194bfe4f8aef9bc98a17ada2d297 Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Sat, 31 May 2025 10:05:52 -0400
Subject: [PATCH 01/11] [clang-doc] Refactor CommentInfo.Kind to use
CommentK
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/142273
>From f75d81cacf455477fe9bc6cb498fb2f76bebcfe2 Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Sat, 31 May 2025 10:05:52 -0400
Subject: [PATCH 01/12] [clang-doc] Refactor CommentInfo.Kind to use
CommentK
https://github.com/snarang181 edited
https://github.com/llvm/llvm-project/pull/142273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
snarang181 wrote:
> Oh, lets updated the PR description with a more complete description of the
> change. It can also be marked as `Fixes #NNN` since this basically implements
> everything outlined in the issues, unless I'm forgetting something.
Done.
https://github.com/llvm/llvm-project/pull
snarang181 wrote:
Sounds good, @ilovepi. I also raised an issue to get commit access and you
might have gotten a notification. It'd be great if you can take a look at that
too :)
https://github.com/llvm/llvm-project/pull/142273
___
cfe-commits mailin
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/143275
>From c18c91f7f8f4332696dd309a5164c568f32c137b Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Sat, 7 Jun 2025 12:21:17 -0400
Subject: [PATCH 1/2] Replace loop with llvm:any_of
---
clang/include/clang/A
snarang181 wrote:
> IIUC the `FIXME` comment means that the time complexity of this part of code
> is not good enough and we can make it faster.
OK. In any case, the usage of `llvm_any_of` seemed better than using an
explicit `for-loop`.
https://github.com/llvm/llvm-project/pull/143275
_
@@ -176,14 +176,10 @@ class StoredDeclsList {
DeclListNode::Decls *Tail = erase_if([Decls](NamedDecl *ND) {
if (ND->isFromASTFile())
return true;
- // FIXME: Can we get rid of this loop completely?
- for (NamedDecl *D : Decls)
-// Only replac
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/143275
>From c18c91f7f8f4332696dd309a5164c568f32c137b Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Sat, 7 Jun 2025 12:21:17 -0400
Subject: [PATCH 1/2] Replace loop with llvm:any_of
---
clang/include/clang/A
@@ -177,13 +177,10 @@ class StoredDeclsList {
if (ND->isFromASTFile())
return true;
// FIXME: Can we get rid of this loop completely?
- for (NamedDecl *D : Decls)
-// Only replace the local declaration if the external declaration has
-//
@@ -177,13 +177,10 @@ class StoredDeclsList {
if (ND->isFromASTFile())
return true;
// FIXME: Can we get rid of this loop completely?
- for (NamedDecl *D : Decls)
-// Only replace the local declaration if the external declaration has
-//
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/143275
>From c18c91f7f8f4332696dd309a5164c568f32c137b Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Sat, 7 Jun 2025 12:21:17 -0400
Subject: [PATCH 1/2] Replace loop with llvm:any_of
---
clang/include/clang/A
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/143275
>From c18c91f7f8f4332696dd309a5164c568f32c137b Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Sat, 7 Jun 2025 12:21:17 -0400
Subject: [PATCH 1/2] Replace loop with llvm:any_of
---
clang/include/clang/A
https://github.com/snarang181 updated
https://github.com/llvm/llvm-project/pull/143275
>From c18c91f7f8f4332696dd309a5164c568f32c137b Mon Sep 17 00:00:00 2001
From: Samarth Narang
Date: Sat, 7 Jun 2025 12:21:17 -0400
Subject: [PATCH 1/2] Replace loop with llvm:any_of
---
clang/include/clang/A
70 matches
Mail list logo