[clang-tools-extra] [llvm] Clang doc test (PR #93928)

2024-05-31 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,25 @@ +#include +#include "Calculator.h" +#include "Circle.h" +#include "Rectangle.h" + +int main() { +// Calculator +Calculator calc; +std::cout << "Add: " << calc.add(3, 4) << std::endl; +std::cout << "Subtract: " << calc.subtract(10, 5) << std::endl;

[clang-tools-extra] [llvm] Clang doc test (PR #93928)

2024-05-31 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,370 @@ +// RUN: mkdir -p %T/clang-doc/build +// RUN: mkdir -p %T/clang-doc/include +// RUN: mkdir -p %T/clang-doc/src +// RUN: mkdir -p %T/clang-doc/docs +// RUN: sed 's|$test_dir|%/T/clang-doc|g' %S/Inputs/clang-doc-project1/database_template.json > %T/clang-doc/buil

[clang-tools-extra] [llvm] Clang doc test (PR #93928)

2024-05-31 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,370 @@ +// RUN: mkdir -p %T/clang-doc/build +// RUN: mkdir -p %T/clang-doc/include +// RUN: mkdir -p %T/clang-doc/src +// RUN: mkdir -p %T/clang-doc/docs +// RUN: sed 's|$test_dir|%/T/clang-doc|g' %S/Inputs/clang-doc-project1/database_template.json > %T/clang-doc/buil

[clang-tools-extra] [llvm] Clang doc test (PR #93928)

2024-05-31 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,22 @@ +[ +{ + "directory": "$test_dir/build", ilovepi wrote: can't this just be "."? then everything is relative to that dir? if necessary you can `cd %t` to run commands in that dir. Subsequent test files run by `lit` will start from the build dir,

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #93612)

2024-05-31 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,188 @@ +// RUN: %clang -Wno-constant-conversion -Wno-array-bounds -Wno-division-by-zero -Wno-shift-negative-value -Wno-shift-count-negative -Wno-int-to-pointer-cast -O0 -fsanitize=alignment,array-bounds,bool,float-cast-overflow,implicit-integer-sign-change,implicit-s

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

2024-07-24 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. If we can confirm that the only differences in documentation generation are due to ordering, then I think it makes sense to land this patch. https://github.com/llvm/llvm-project/pull/96809 ___ cfe

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

2024-07-24 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-07-24 Thread Paul Kirth via cfe-commits
@@ -243,6 +243,7 @@ Example usage for a project using a compile commands database: // Fail early if an invalid format was provided. std::string Format = getFormatString(); + llvm::outs() << "Unoptimized\n"; ilovepi wrote: nit: leftover from debugging?

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

2024-07-24 Thread Paul Kirth via cfe-commits
ilovepi wrote: Seems to be a formatting issue. `git clang-format` should fix it. 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-07-24 Thread Paul Kirth via cfe-commits
ilovepi wrote: Oh, can you also update the title and commit message? You're not really adding a short circuit, you're just memoizing visited items, and avoiding reprocessing them. A bit more context, and a summary of your findings on the changes to output would also be good to have in the com

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

2024-07-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-07-24 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. LGTM, but can we improve the check for RootPath somehow? I feel like there should be something we can match there. https://github.com/llvm/llvm-project/pull/93281 ___ cfe-commits mailing list cfe

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

2024-07-24 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: rm -rf %t && mkdir %t +// RUN: cp "%s" "%t/test.cpp" +// RUN: clang-doc --format=html --executor=standalone -p %s --output=%t +// RUN: FileCheck %s -input-file=%t/index_json.js -check-prefix=JSON-INDEX +// RUN: rm -rf %t + +// JSON-INDEX: var RootPath = "

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

2024-07-24 Thread Paul Kirth via cfe-commits
ilovepi wrote: Hmm, seems like tests are failing. PTAL. 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-07-24 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: rm -rf %t && mkdir %t +// RUN: cp "%s" "%t/test.cpp" ilovepi wrote: Looks like I missed this. Please don’t copy the test file around. To be blunt this pattern has been brought up in multiple PRs and even in previous incarnations of this

[clang] [CMake][Fuchsia] Include libunwind and libc++abi in baremetal build (PR #100908)

2024-07-30 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. https://github.com/llvm/llvm-project/pull/100908 ___ 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 support for block commands in clang-doc html output (PR #101108)

2024-07-30 Thread Paul Kirth via cfe-commits
@@ -418,9 +419,13 @@ genRecordMembersBlock(const llvm::SmallVector &Members, if (Access != "") Access = Access + " "; auto LIBody = std::make_unique(HTMLTag::TAG_LI); -LIBody->Children.emplace_back(std::make_unique(Access)); -LIBody->Children.emplace_back

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-07-30 Thread Paul Kirth via cfe-commits
@@ -197,7 +197,9 @@ TEST(HTMLGeneratorTest, emitRecordHTML) { Members - private int X + +private int X ilovepi wrote: Should these be `private int X`, like this or should we have separate lists for `public`, `protected` and `p

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-07-30 Thread Paul Kirth via cfe-commits
@@ -418,9 +419,13 @@ genRecordMembersBlock(const llvm::SmallVector &Members, if (Access != "") Access = Access + " "; auto LIBody = std::make_unique(HTMLTag::TAG_LI); -LIBody->Children.emplace_back(std::make_unique(Access)); -LIBody->Children.emplace_back

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-07-30 Thread Paul Kirth via cfe-commits
@@ -197,7 +197,9 @@ TEST(HTMLGeneratorTest, emitRecordHTML) { Members - private int X + +private int X ilovepi wrote: Agreed. https://github.com/llvm/llvm-project/pull/101108 ___ cfe

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-07-30 Thread Paul Kirth via cfe-commits
@@ -619,7 +620,6 @@ static std::unique_ptr genHTML(const CommentInfo &I) { } return std::move(FullComment); } - ilovepi wrote: Unrelated? https://github.com/llvm/llvm-project/pull/101108 ___ cfe-commits

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-07-30 Thread Paul Kirth via cfe-commits
@@ -631,7 +631,19 @@ static std::unique_ptr genHTML(const CommentInfo &I) { return nullptr; return std::move(ParagraphComment); } - ilovepi wrote: Why remove the new line? https://github.com/llvm/llvm-project/pull/101108 _

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-07-31 Thread Paul Kirth via cfe-commits
@@ -59,32 +59,63 @@ // HTML-SHAPE: class Shape // HTML-SHAPE: Defined at line 8 of file {{.*}}Shape.h +// HTML-SHAPE: brief +// HTML-SHAPE: Abstract base class for shapes. // HTML-SHAPE: Provides a common interface for different types of shapes. // HTML-SHAPE: Functions

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-07-31 Thread Paul Kirth via cfe-commits
@@ -632,6 +633,19 @@ static std::unique_ptr genHTML(const CommentInfo &I) { return std::move(ParagraphComment); } + if (I.Kind == "BlockCommandComment") { +auto BlockComment = std::make_unique(HTMLTag::TAG_DIV); +auto Command = std::make_unique(HTMLTag::TAG_DIV

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-07-31 Thread Paul Kirth via cfe-commits
@@ -632,6 +633,19 @@ static std::unique_ptr genHTML(const CommentInfo &I) { return std::move(ParagraphComment); } + if (I.Kind == "BlockCommandComment") { +auto BlockComment = std::make_unique(HTMLTag::TAG_DIV); +auto Command = std::make_unique(HTMLTag::TAG_DIV

[clang] [CMake][Fuchsia] Use standard spelling for Arm baremetal targets (PR #101302)

2024-07-31 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/101302 ___ 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-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
https://github.com/ilovepi approved this pull request. LGTM, modulo some nits. I do think you may want to have a separate prefix for the lines, but if you change `--check-prefix=` to `--check-prefixes=HTML-ANIMAL,HTML-ANIMAL-LINE`, you should be able to check them w/o having to rewrite everyth

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

2024-07-15 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,128 @@ +// 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
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/97679 ___ 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-15 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,128 @@ +// 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
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-15 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,274 @@ +// 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
@@ -0,0 +1,274 @@ +// 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
https://github.com/ilovepi approved this pull request. LGTM, once the LINE checks are in a more stable position w/ their own prefixes, and a couple of nits on whitespace. https://github.com/llvm/llvm-project/pull/97681 ___ cfe-commits mailing list cfe

[clang] [CMake][Fuchsia] Build libc++ on top libc for baremetal (PR #99009)

2024-07-16 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. Not a fan of this approach, but, seeing as it’s temporary and only affects our builds, I suppose it’s fine for now. https://github.com/llvm/llvm-project/pull/99009 ___ cfe-commits mailing list cf

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

2024-07-16 Thread Paul Kirth via cfe-commits
@@ -670,6 +671,7 @@ llvm::Error ClangDocBitcodeReader::readRecord(unsigned ID, T I) { template <> llvm::Error ClangDocBitcodeReader::readRecord(unsigned ID, Reference *I) { + llvm::TimeTraceScope("Reducing infos", "readRecord"); ilovepi wrote: I know this i

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

2024-07-16 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/97644 ___ 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 ftime profiling (PR #97644)

2024-07-16 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. LGTM modulo a small nit in the naming, we can always add more instrumentation if we need it, but this is a good start. https://github.com/llvm/llvm-project/pull/97644 ___ cfe-commits mailing list

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

2024-07-16 Thread Paul Kirth via cfe-commits
ilovepi wrote: > When sorted by USR, there are no differences between the index between this > patch and what's on main, I'm not sure I completely follow. are you saying that when you sort the contents of all the files you no longer have any differences? So you're sure the only differences i

[clang] [ASTContext] Add a break to nested switch in `encodeTypeForFunctionPointerAuth` (PR #99763)

2024-07-22 Thread Paul Kirth via cfe-commits
ilovepi wrote: Ah, it looks like we had another set of these. I just filed https://github.com/llvm/llvm-project/issues/99901 after a similar issue was reported in LLD. https://github.com/llvm/llvm-project/pull/99763 ___ cfe-commits mailing list cfe-c

[clang] [ASTContext] Add a break to nested switch in `encodeTypeForFunctionPointerAuth` (PR #99763)

2024-07-22 Thread Paul Kirth via cfe-commits
@@ -3363,6 +3363,7 @@ static void encodeTypeForFunctionPointerAuth(const ASTContext &Ctx, #include "clang/Basic/RISCVVTypes.def" llvm_unreachable("not yet implemented"); } +break; ilovepi wrote: won't you get an error for having a `default` case

[clang] Reapply "[Clang][Sema] placement new initializes typedef array with correct size (#83124)" (PR #89036)

2024-04-23 Thread Paul Kirth via cfe-commits
ilovepi wrote: I think we're seeing some build failures after this patch, and it isn't clear to me that this is a bug in the source, so I'd appreciate it if you could take a look. ``` FAILED: obj/src/media/audio/tools/signal_generator/signal_generator.signal_generator.cc.o ../../prebuilt/th

[clang] [clang-tools-extra] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base clas

2024-04-25 Thread Paul Kirth via cfe-commits
ilovepi wrote: we're seeing similar crashes when building Fuchsia. https://ci.chromium.org/ui/p/fuchsia/builders/ci/clang_toolchain.ci.core.arm64-host_test_only-mac/b8749648123122633169/overview A reproducer can be found here: https://storage.googleapis.com/fuchsia-artifacts/builds/87496481231

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

2024-08-26 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,22 @@ +import argparse ilovepi wrote: > Test files generally do not have license headers. Ah, right. I was thinking of them differently, since they're not par to of the test per se, but now that you spell it out, that makes sense. Thanks. https://g

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-08-26 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,109 @@ +//===--- Mustache.h -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-08-26 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,276 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-08-26 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,276 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-08-26 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,276 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-08-26 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,276 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-08-26 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,135 @@ +//===- llvm/unittest/Support/MustacheTest.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-08-26 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,276 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-08-26 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,276 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-08-26 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,135 @@ +//===- llvm/unittest/Support/MustacheTest.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

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

2024-08-29 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. https://github.com/llvm/llvm-project/pull/105902 ___ 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-07-08 Thread Paul Kirth via cfe-commits
ilovepi wrote: ping 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-tools-extra] [clang-doc][nfc] Avoid constructing SmallString in ToString method (PR #96921)

2024-07-08 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed 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] fix paths by hard coding path to share (PR #98099)

2024-07-08 Thread Paul Kirth via cfe-commits
ilovepi wrote: I'd rephrase your commit message and title in the following way. ``` [clang-doc][cmake] Fix asset directory location for other generator types This patch fixes how clang-doc copies asset files for the build to match the install location for all CMake generator types. The previous

[clang-tools-extra] [clang-doc] fix paths by hard coding path to share (PR #98099)

2024-07-08 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. LGTM, modulo my comments on the commit message and title, and premerge checks passing. https://github.com/llvm/llvm-project/pull/98099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [Clang][Sema] Handle class member access expressions with valid nested-name-specifiers that become invalid after lookup (PR #98167)

2024-07-09 Thread Paul Kirth via cfe-commits
ilovepi wrote: Thanks for running this down! https://github.com/llvm/llvm-project/pull/98167 ___ 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-07-09 Thread Paul Kirth via cfe-commits
@@ -151,15 +151,9 @@ void verifyMisExpect(Instruction &I, ArrayRef RealWeights, uint64_t TotalBranchWeight = LikelyBranchWeight + (UnlikelyBranchWeight * NumUnlikelyTargets); - // FIXME: When we've addressed sample profiling, restore the assertion - // - // We cann

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

2024-07-09 Thread Paul Kirth via cfe-commits
@@ -151,15 +151,9 @@ void verifyMisExpect(Instruction &I, ArrayRef RealWeights, uint64_t TotalBranchWeight = LikelyBranchWeight + (UnlikelyBranchWeight * NumUnlikelyTargets); - // FIXME: When we've addressed sample profiling, restore the assertion - // - // We cann

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

2024-07-09 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi requested changes to this pull request. I'm a bit confused by the "advanced project", as it largely seems to be minor extensions to the `basic project`. I would expect that an "advanced project" would use a complicated structure and be much larger. IMO if you're only

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

2024-07-09 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/97644 ___ 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 ftime profiling (PR #97644)

2024-07-09 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi requested changes to this pull request. https://github.com/llvm/llvm-project/pull/97644 ___ 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 ftime profiling (PR #97644)

2024-07-09 Thread Paul Kirth via cfe-commits
@@ -362,6 +395,17 @@ Example usage for a project using a compile commands database: if (Err) { llvm::outs() << "warning: " << toString(std::move(Err)) << "\n"; } - + llvm::timeTraceProfilerEnd(); + + if (FTimeTrace) { +std::error_code EC; +llvm::raw_fd_ostrea

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

2024-07-09 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-09 Thread Paul Kirth via cfe-commits
@@ -30,7 +30,7 @@ ClangDocContext getClangDocContext(std::vector UserStylesheets = {}, StringRef RepositoryUrl = "") { ClangDocContext CDCtx{ - {}, "test-project", {}, {}, {}, RepositoryUrl, UserStylesheets}; + {}, "test-project", {}, {}, {}, {},

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

2024-07-09 Thread Paul Kirth via cfe-commits
@@ -480,12 +480,15 @@ mergeInfos(std::vector> &Values); struct ClangDocContext { ClangDocContext() = default; ClangDocContext(tooling::ExecutionContext *ECtx, StringRef ProjectName, - bool PublicOnly, StringRef OutDirectory, StringRef SourceRoot, +

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

2024-07-09 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 ftime profiling (PR #97644)

2024-07-09 Thread Paul Kirth via cfe-commits
@@ -30,6 +35,7 @@ template bool MapASTVisitor::mapDecl(const T *D) { if (D->getParentFunctionOrMethod()) return true; + llvm::timeTraceProfilerBegin("emit info phase", "emit info"); ilovepi wrote: nit: try to be consistent w/ the logging style and ca

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

2024-07-09 Thread Paul Kirth via cfe-commits
@@ -316,32 +342,39 @@ Example usage for a project using a compile commands database: std::move(ReadInfos->begin(), ReadInfos->end(), std::back_inserter(Infos)); } + llvm::timeTraceProfilerEnd(); + llvm::timeTraceProfilerBegin("mergin

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

2024-07-09 Thread Paul Kirth via cfe-commits
@@ -362,6 +395,17 @@ Example usage for a project using a compile commands database: if (Err) { llvm::outs() << "warning: " << toString(std::move(Err)) << "\n"; } - + llvm::timeTraceProfilerEnd(); + + if (FTimeTrace) { +std::error_code EC; +llvm::raw_fd_ostrea

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

2024-07-09 Thread Paul Kirth via cfe-commits
@@ -99,6 +100,16 @@ URL of repository that hosts code. Used for links to definition locations.)"), llvm::cl::cat(ClangDocCategory)); +static llvm::cl::opt FTimeTrace("ftime-trace", llvm::cl::desc(R"( +Turn on time profiler. Generates clang-doc-tracing.json)")

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

2024-07-09 Thread Paul Kirth via cfe-commits
@@ -670,6 +671,7 @@ llvm::Error ClangDocBitcodeReader::readRecord(unsigned ID, T I) { template <> llvm::Error ClangDocBitcodeReader::readRecord(unsigned ID, Reference *I) { + llvm::TimeTraceScope("clang-doc", "readRecord Reference"); ilovepi wrote: Why `rea

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

2024-07-09 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 ilovepi wrote: This can't work right, can it? you haven't made `%t`, you als

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

2024-07-09 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 enum test (PR #97679)

2024-07-09 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 nested namespace test case (PR #97681)

2024-07-09 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,340 @@ +// RUN: clang-doc --format=html --output=%t/docs --executor=standalone %s +// RUN: clang-doc --format=md --output=%t/docs --executor=standalone %s +// RUN: FileCheck %s -input-file=%t/docs/index_json.js -check-prefix=JSON-INDEX +// RUN: FileCheck %s -input-file=

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

2024-07-09 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,340 @@ +// RUN: clang-doc --format=html --output=%t/docs --executor=standalone %s +// RUN: clang-doc --format=md --output=%t/docs --executor=standalone %s ilovepi wrote: Why no `mkdir`? I presume because clang-doc will make it, but the test shouldn't

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

2024-07-09 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi commented: This is headed in the right direction, but I'm not sure we want to match so many of the single line tags ... they don't seem particularly valuable from a testing standpoint. If you think we're missing tests for the HTML structure, then we should have some

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

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

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

2024-07-09 Thread Paul Kirth via cfe-commits
@@ -54,306 +54,249 @@ // JSON-INDEX-NEXT: }; // JSON-INDEX-NEXT: } -// HTML-SHAPE: -// HTML-SHAPE-NEXT: -// HTML-SHAPE-NEXT: class Shape -// HTML-SHAPE-NEXT: -// HTML-SHAPE-NEXT: -// HTML-SHAPE-NEXT: -// HTML-SHAPE-NEXT: -// HTML-SHAPE-NEXT: -// HTML-SHAPE-NEXT: -//

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

2024-07-09 Thread Paul Kirth via cfe-commits
ilovepi wrote: any progress here? 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] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-07-10 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang -Wno-constant-conversion -Wno-array-bounds -Wno-division-by-zero -Wno-shift-negative-value -Wno-shift-count-negative -Wno-int-to-pointer-cast -O0 -fsanitize=alignment,array-bounds,bool,float-cast-overflow,implicit-integer-sign-change,implicit-si

[clang-tools-extra] [libc] Update libc namespace clang-tidy checks (PR #98424)

2024-07-10 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/98424 This patch updates the clang-tidy checks for llvm-libc to ensure that the namespace macro used to declare the libc namespace is updated from LIBC_NAMESPACE to LIBC_NAMESPACE_DECL which by default has hidden visi

[clang-tools-extra] [libc] Update libc namespace clang-tidy checks (PR #98424)

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

[clang-tools-extra] [libc] Update libc namespace clang-tidy checks (PR #98424)

2024-07-10 Thread Paul Kirth via cfe-commits
@@ -3,60 +3,61 @@ #define MACRO_A "defining macros outside namespace is valid" class ClassB; -// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration must be enclosed within the 'LIBC_NAMESPACE' namespace +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration must be enclos

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

2024-07-11 Thread Paul Kirth via cfe-commits
@@ -12,16 +12,21 @@ #include "clang/AST/Comment.h" #include "clang/Index/USRGeneration.h" #include "llvm/ADT/StringExtras.h" -#include "llvm/Support/Error.h" +#include "llvm/ADT/StringSet.h" +#include "llvm/Support/Mutex.h" namespace clang { namespace doc { +static llvm::

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

2024-07-11 Thread Paul Kirth via cfe-commits
@@ -53,30 +80,34 @@ template bool MapASTVisitor::mapDecl(const T *D) { } bool MapASTVisitor::VisitNamespaceDecl(const NamespaceDecl *D) { - return mapDecl(D); + return mapDecl(D, true); ilovepi wrote: for constant params you should have a comment, per our

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

2024-07-11 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-07-11 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi commented: Seems like there's a few clang-format errors, so lets address those, too. https://github.com/llvm/llvm-project/pull/96809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

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

2024-07-11 Thread Paul Kirth via cfe-commits
@@ -12,16 +12,31 @@ #include "clang/AST/Comment.h" #include "clang/Index/USRGeneration.h" #include "llvm/ADT/StringExtras.h" -#include "llvm/Support/Error.h" +#include "llvm/ADT/StringSet.h" +#include "llvm/Support/Mutex.h" namespace clang { namespace doc { +static llvm::

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

2024-07-11 Thread Paul Kirth via cfe-commits
@@ -53,30 +80,34 @@ template bool MapASTVisitor::mapDecl(const T *D) { } bool MapASTVisitor::VisitNamespaceDecl(const NamespaceDecl *D) { - return mapDecl(D); + return mapDecl(D, true); } -bool MapASTVisitor::VisitRecordDecl(const RecordDecl *D) { return mapDecl(D); } +

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

2024-07-11 Thread Paul Kirth via cfe-commits
ilovepi wrote: > Ok nevermind, disregard the above comment I was wrong about the mechanism of > the bug. the source of this bug comes from the way clang-doc handles C code, > particularly anonymous typedef in C. When clang-doc encounters an anonymous > typedef in C it incorrectly serializes it

[clang-tools-extra] [libc] Update libc namespace clang-tidy checks (PR #98424)

2024-07-11 Thread Paul Kirth via cfe-commits
@@ -30,20 +30,35 @@ void ImplementationInNamespaceCheck::check( const auto *MatchedDecl = Result.Nodes.getNodeAs("child_of_translation_unit"); const auto *NS = dyn_cast(MatchedDecl); + + // LLVM libc declarations should be inside of a non-anonymous namespace. if (

[clang-tools-extra] [libc] Update libc namespace clang-tidy checks (PR #98424)

2024-07-11 Thread Paul Kirth via cfe-commits
@@ -30,20 +30,35 @@ void ImplementationInNamespaceCheck::check( const auto *MatchedDecl = Result.Nodes.getNodeAs("child_of_translation_unit"); const auto *NS = dyn_cast(MatchedDecl); + + // LLVM libc declarations should be inside of a non-anonymous namespace. if (

[clang-tools-extra] [libc] Update libc namespace clang-tidy checks (PR #98424)

2024-07-11 Thread Paul Kirth via cfe-commits
@@ -30,20 +30,35 @@ void ImplementationInNamespaceCheck::check( const auto *MatchedDecl = Result.Nodes.getNodeAs("child_of_translation_unit"); const auto *NS = dyn_cast(MatchedDecl); + + // LLVM libc declarations should be inside of a non-anonymous namespace. if (

[clang-tools-extra] [libc] Update libc namespace clang-tidy checks (PR #98424)

2024-07-11 Thread Paul Kirth via cfe-commits
ilovepi wrote: Also, as an FYI to reviewers, I'm working on the FixIts for these as a separate patch. https://github.com/llvm/llvm-project/pull/98424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang-tools-extra] [libc] Update libc namespace clang-tidy checks (PR #98424)

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

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