@@ -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;
@@ -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
@@ -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
@@ -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,
@@ -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
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
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
@@ -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?
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
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
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
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
@@ -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 = "
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
@@ -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
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
_
@@ -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
@@ -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
@@ -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
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
@@ -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
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
@@ -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
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
@@ -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
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
@@ -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 < %
@@ -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 < %
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
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
@@ -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
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
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
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
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
@@ -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
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
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
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
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
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
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
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
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
@@ -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
@@ -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
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
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
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
@@ -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
@@ -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
@@ -30,7 +30,7 @@ ClangDocContext
getClangDocContext(std::vector UserStylesheets = {},
StringRef RepositoryUrl = "") {
ClangDocContext CDCtx{
- {}, "test-project", {}, {}, {}, RepositoryUrl, UserStylesheets};
+ {}, "test-project", {}, {}, {}, {},
@@ -480,12 +480,15 @@ mergeInfos(std::vector> &Values);
struct ClangDocContext {
ClangDocContext() = default;
ClangDocContext(tooling::ExecutionContext *ECtx, StringRef ProjectName,
- bool PublicOnly, StringRef OutDirectory, StringRef
SourceRoot,
+
@@ -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"
@@ -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
@@ -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
@@ -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
@@ -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)")
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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=
@@ -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
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
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
@@ -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:
-//
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
@@ -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
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
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
@@ -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
@@ -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::
@@ -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
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
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
@@ -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::
@@ -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); }
+
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
@@ -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 (
@@ -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 (
@@ -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 (
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
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
401 - 500 of 1144 matches
Mail list logo