@@ -146,9 +148,24 @@ class ASTWalker : public RecursiveASTVisitor {
//
// If it's an enum constant, it must be due to prior decl. Report
references
// to it when qualifier isn't a type.
-if (llvm::isa(FD)) {
- if (!DRE->getQualifier() || DRE->getQualifier(
https://github.com/kadircet updated
https://github.com/llvm/llvm-project/pull/106706
From 53b34977daa00abdad9bb6b3a351b05ae59cb2df Mon Sep 17 00:00:00 2001
From: Kadir Cetinkaya
Date: Fri, 30 Aug 2024 12:28:02 +0200
Subject: [PATCH] [include-cleaner] Report refs for enum constants used through
https://github.com/kadircet closed
https://github.com/llvm/llvm-project/pull/106706
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kadircet closed
https://github.com/llvm/llvm-project/pull/106354
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kadircet milestoned
https://github.com/llvm/llvm-project/pull/106354
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
kadircet wrote:
/cherry-pick b47d7ce8121b1cb1923e879d58eaa1d63aeaaae2
https://github.com/llvm/llvm-project/pull/106354
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -702,6 +704,10 @@ ParsedAST::build(llvm::StringRef Filename, const
ParseInputs &Inputs,
log("Execute() failed when building AST for {0}: {1}", MainInput.getFile(),
toString(std::move(Err)));
+ // Disable the macro collector for the remainder of this function,
@@ -51,6 +52,9 @@
namespace clang {
namespace clangd {
+
+extern llvm::cl::opt ExperimentalModulesSupport;
kadircet wrote:
we don't need this declaration for the command line flag, we're already passing
this through `ClangdLSPServer::Options`.
https://githu
@@ -0,0 +1,199 @@
+//===-- ProjectModules.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,355 @@
+//===--- PrerequisiteModulesTests.cpp ---*- 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-Identifi
@@ -0,0 +1,340 @@
+//===- ModulesBuilder.cpp *-
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,355 @@
+//===--- PrerequisiteModulesTests.cpp ---*- 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-Identifi
@@ -0,0 +1,110 @@
+//===- ModulesBuilder.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,355 @@
+//===--- PrerequisiteModulesTests.cpp ---*- 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-Identifi
@@ -0,0 +1,355 @@
+//===--- PrerequisiteModulesTests.cpp ---*- 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-Identifi
@@ -112,6 +114,9 @@ class ClangdServer {
/// This throttler controls which preambles may be built at a given time.
clangd::PreambleThrottler *PreambleThrottler = nullptr;
+/// Enable experimental support for modules.
kadircet wrote:
no i think tha
@@ -0,0 +1,355 @@
+//===--- PrerequisiteModulesTests.cpp ---*- 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-Identifi
@@ -0,0 +1,340 @@
+//===- ModulesBuilder.cpp *-
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,355 @@
+//===--- PrerequisiteModulesTests.cpp ---*- 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-Identifi
@@ -0,0 +1,355 @@
+//===--- PrerequisiteModulesTests.cpp ---*- 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-Identifi
https://github.com/kadircet edited
https://github.com/llvm/llvm-project/pull/87208
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kadircet requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/87208
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -135,6 +135,21 @@ TEST(IncludeCleaner, GetUnusedHeaders) {
Pointee(writtenInclusion("\"dir/unused.h\"";
}
+TEST(IncludeCleaner, SystemUnusedHeaders) {
+ auto TU = TestTU::withCode(R"cpp(
+#include
+#include
+SystemClass x;
+ )c
@@ -254,6 +254,10 @@ struct Fragment {
/// unused or missing. These can match any suffix of the header file in
/// question.
std::vector> IgnoreHeader;
+
+ /// If false (default), unused system headers will be ignored.
+ /// Standard library headers
@@ -572,32 +572,43 @@ struct FragmentCompiler {
#else
static llvm::Regex::RegexFlags Flags = llvm::Regex::NoFlags;
#endif
-auto Filters = std::make_shared>();
-for (auto &HeaderPattern : F.IgnoreHeader) {
- // Anchor on the right.
- std::string AnchoredPat
@@ -114,6 +114,7 @@ struct Config {
/// these regexes.
struct {
std::vector> IgnoreHeader;
+ bool AnalyzeSystemHeaders = false;
kadircet wrote:
can you move the comment about regexes near `IgnoreHeader`.
Also I think `AnalyzeAngledIncludes
@@ -62,15 +64,6 @@ issueIncludeCleanerDiagnostics(ParsedAST &AST,
llvm::StringRef Code,
const ThreadsafeFS &TFS,
HeaderFilter IgnoreHeader = {});
-/// Affects whether standard library includes should be considered
@@ -572,32 +572,43 @@ struct FragmentCompiler {
#else
static llvm::Regex::RegexFlags Flags = llvm::Regex::NoFlags;
#endif
-auto Filters = std::make_shared>();
-for (auto &HeaderPattern : F.IgnoreHeader) {
- // Anchor on the right.
- std::string AnchoredPat
@@ -135,6 +135,21 @@ TEST(IncludeCleaner, GetUnusedHeaders) {
Pointee(writtenInclusion("\"dir/unused.h\"";
}
+TEST(IncludeCleaner, SystemUnusedHeaders) {
+ auto TU = TestTU::withCode(R"cpp(
+#include
+#include
+SystemClass x;
+ )c
kadircet wrote:
thanks for the patch! this definitely LGTM at high level.
as you folks also pointed out we don't want to surface analysis for angled
includes in general, as include-cleaner doesn't have support for system headers
yet (we wanted to have something similar to Stdlib includes, whic
@@ -572,32 +572,43 @@ struct FragmentCompiler {
#else
static llvm::Regex::RegexFlags Flags = llvm::Regex::NoFlags;
#endif
-auto Filters = std::make_shared>();
-for (auto &HeaderPattern : F.IgnoreHeader) {
- // Anchor on the right.
- std::string AnchoredPat
@@ -572,32 +572,43 @@ struct FragmentCompiler {
#else
static llvm::Regex::RegexFlags Flags = llvm::Regex::NoFlags;
#endif
-auto Filters = std::make_shared>();
-for (auto &HeaderPattern : F.IgnoreHeader) {
- // Anchor on the right.
- std::string AnchoredPat
@@ -135,6 +135,21 @@ TEST(IncludeCleaner, GetUnusedHeaders) {
Pointee(writtenInclusion("\"dir/unused.h\"";
}
+TEST(IncludeCleaner, SystemUnusedHeaders) {
+ auto TU = TestTU::withCode(R"cpp(
+#include
+#include
+SystemClass x;
+ )c
@@ -135,6 +135,21 @@ TEST(IncludeCleaner, GetUnusedHeaders) {
Pointee(writtenInclusion("\"dir/unused.h\"";
}
+TEST(IncludeCleaner, SystemUnusedHeaders) {
+ auto TU = TestTU::withCode(R"cpp(
+#include
+#include
+SystemClass x;
+ )c
@@ -68,24 +68,32 @@ bool isIgnored(llvm::StringRef HeaderPath, HeaderFilter
IgnoreHeaders) {
}
bool mayConsiderUnused(const Inclusion &Inc, ParsedAST &AST,
- const include_cleaner::PragmaIncludes *PI) {
+ const include_cleaner::Prag
https://github.com/kadircet approved this pull request.
thanks a lot, LGTM!
it'd be great if you can also follow up with a change to
https://github.com/llvm/clangd-www/blob/main/config.md
https://github.com/llvm/llvm-project/pull/87208
___
cfe-commit
kadircet wrote:
instead of testing this in clangd, can you add tests to
`clang/test/CodeCompletion/`? (even better if you can extend
`clang/unittests/Sema/CodeCompleteTest.cpp`). as this is a clang feature, and
it'd be nice to make sure it doesn't regress at clang-level.
https://github.com/ll
kadircet wrote:
hi! this seems to be crashing for certain code patterns,
https://github.com/llvm/llvm-project/issues/92896 has a minimal reproducer
https://github.com/llvm/llvm-project/pull/90397
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -0,0 +1,106 @@
+//===-- ModuleDependencyScanner.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
https://github.com/kadircet requested changes to this pull request.
thanks a lot and sorry for taking so long.
i think this looks great at a high level, mostly asked for some changes in the
implementation. the only layering-wise change is who should own
`ModulesBuilder` (you can find details i
@@ -0,0 +1,339 @@
+//===- ModulesBuilder.cpp *-
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,71 @@
+//===- ModulesBuilder.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: Apa
@@ -0,0 +1,106 @@
+//===-- ModuleDependencyScanner.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,106 @@
+//===-- ModuleDependencyScanner.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
https://github.com/kadircet edited
https://github.com/llvm/llvm-project/pull/66462
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,106 @@
+//===-- ModuleDependencyScanner.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,71 @@
+//===- ModulesBuilder.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: Apa
@@ -0,0 +1,106 @@
+//===-- ModuleDependencyScanner.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,106 @@
+//===-- ModuleDependencyScanner.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,106 @@
+//===-- ModuleDependencyScanner.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,106 @@
+//===-- ModuleDependencyScanner.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,106 @@
+//===-- ModuleDependencyScanner.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,81 @@
+//=== ModuleDependencyScanner.cpp *-
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: Apa
@@ -0,0 +1,71 @@
+//===- ModulesBuilder.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: Apa
@@ -0,0 +1,81 @@
+//=== ModuleDependencyScanner.cpp *-
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: Apa
@@ -0,0 +1,339 @@
+//===- ModulesBuilder.cpp *-
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
@@ -48,6 +48,9 @@ Major New Features
Improvements to clangd
--
+- Introduced exmperimental support for C++20 Modules. The experimental support
can
+ be enabled by `-experimental-modules-support` option.
kadircet wrote:
i think we should
@@ -0,0 +1,339 @@
+//===- ModulesBuilder.cpp *-
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,339 @@
+//===- ModulesBuilder.cpp *-
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
https://github.com/kadircet created
https://github.com/llvm/llvm-project/pull/93079
Prevent OOB access.
Fixes https://github.com/llvm/llvm-project/issues/93076
From 7840ea2b16863ee7057f3b1239c59b6be06cbd42 Mon Sep 17 00:00:00 2001
From: Kadir Cetinkaya
Date: Wed, 22 May 2024 19:37:18 +0200
S
@@ -11298,8 +11298,9 @@ static void DiagnoseBadConversion(Sema &S,
OverloadCandidate *Cand,
Expr *FromExpr = Conv.Bad.FromExpr;
QualType FromTy = Conv.Bad.getFromType();
QualType ToTy = Conv.Bad.getToType();
- SourceRange ToParamRange =
- !isObjectArgument ? Fn->ge
@@ -11298,8 +11298,9 @@ static void DiagnoseBadConversion(Sema &S,
OverloadCandidate *Cand,
Expr *FromExpr = Conv.Bad.FromExpr;
QualType FromTy = Conv.Bad.getFromType();
QualType ToTy = Conv.Bad.getToType();
- SourceRange ToParamRange =
- !isObjectArgument ? Fn->ge
https://github.com/kadircet updated
https://github.com/llvm/llvm-project/pull/93079
From f7bdd39714e21ff31b3c5aa6a3a18967cb6fef2c Mon Sep 17 00:00:00 2001
From: Kadir Cetinkaya
Date: Wed, 22 May 2024 19:37:18 +0200
Subject: [PATCH 1/2] [clang][Sema] Fix crash when diagnosing candidates with
pa
https://github.com/kadircet updated
https://github.com/llvm/llvm-project/pull/93079
From 6a057ff4b539045ce81e55b63702892496d18a97 Mon Sep 17 00:00:00 2001
From: Kadir Cetinkaya
Date: Wed, 22 May 2024 19:37:18 +0200
Subject: [PATCH] [clang][Sema] Fix crash when diagnosing candidates with
parame
kadircet wrote:
@shafik thx for the pointers, i didn't know this came up before and even there
were attempted fixes. I can verify that both of those are also fixed with this
patch.
@knightXun do you plan to proceed with
https://github.com/llvm/llvm-project/pull/70280 ? If so I am happy to dis
https://github.com/kadircet updated
https://github.com/llvm/llvm-project/pull/93079
From 9c691ab41ba500c1962bf9d63de86b65f184f047 Mon Sep 17 00:00:00 2001
From: Kadir Cetinkaya
Date: Wed, 22 May 2024 19:37:18 +0200
Subject: [PATCH] [clang][Sema] Fix crash when diagnosing candidates with
parame
https://github.com/kadircet updated
https://github.com/llvm/llvm-project/pull/93079
From d133b1bf63ab8c5408497ef4c2d2d629ebcff8eb Mon Sep 17 00:00:00 2001
From: Kadir Cetinkaya
Date: Wed, 22 May 2024 19:37:18 +0200
Subject: [PATCH] [clang][Sema] Fix crash when diagnosing candidates with
parame
https://github.com/kadircet updated
https://github.com/llvm/llvm-project/pull/93079
From 98ae27a0d303252a23891b204df18112a846f661 Mon Sep 17 00:00:00 2001
From: Kadir Cetinkaya
Date: Wed, 22 May 2024 19:37:18 +0200
Subject: [PATCH] [clang][Sema] Fix crash when diagnosing candidates with
parame
https://github.com/kadircet closed
https://github.com/llvm/llvm-project/pull/93079
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kadircet edited
https://github.com/llvm/llvm-project/pull/93417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -42,7 +41,11 @@
#include
#include
-namespace clang::clangd {
+namespace clang {
+
+class Module;
kadircet wrote:
this is not an "unnecessary" include, clangd requires a declaration of
`clang::Module` in this file (even if incomplete) and we try not to h
https://github.com/kadircet requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/93417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
SG if you also considered the style block. I suppose the risks of having
this in a feature-specific block is much lower.
On Tue, Dec 7, 2021, 20:14 Sam McCall via Phabricator <
revi...@reviews.llvm.org> wrote:
> sammccall added inline comments.
>
>
>
> Comment at: clang-tools-ext
Hi Salman, it looks like patch doesn't have edit access for anyone but you.
I had drafted some comments but can't hit the submit button.
I think you can go to
https://reviews.llvm.org/differential/revision/edit/116085/ and change the
`Editable By` field to `All Users`
On Tue, Dec 21, 2021 at 8:45
kadircet wrote:
hi, this seems to be triggering infinite recursion and stack exhaustion on some
invalid code patterns, see https://github.com/llvm/llvm-project/issues/104802
for details.
https://github.com/llvm/llvm-project/pull/102605
___
cfe-commit
kadircet wrote:
Hi folks, I am a little confused about the behavior introduced by this patch.
I was expecting `Foo::*` in `Type Foo::* name` to be treated as a single entity
and whole thing to be aligned with `name` or spaced away from it, Rather than
splitting `*` . To add some more from the
https://github.com/kadircet created
https://github.com/llvm/llvm-project/pull/105168
ccae7b461be339e717d02f99ac857cf0bc7d17f improved handling for nested
calls, but this resulted in a lot of changes near `new` expressions.
This patch tries to restore previous behavior around new expressions, by
https://github.com/kadircet edited
https://github.com/llvm/llvm-project/pull/105043
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kadircet requested changes to this pull request.
thanks a lot for the quick fix!
https://github.com/llvm/llvm-project/pull/105043
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo
@@ -4591,7 +4589,9 @@ bool TokenAnnotator::spaceRequiredBetween(const
AnnotatedLine &Line,
if (!BeforeLeft)
return false;
if (BeforeLeft->is(tok::coloncolon)) {
- return Left.is(tok::star) &&
+ const auto *Prev = BeforeLeft->Previous;
+ return Left
@@ -4591,7 +4589,9 @@ bool TokenAnnotator::spaceRequiredBetween(const
AnnotatedLine &Line,
if (!BeforeLeft)
return false;
if (BeforeLeft->is(tok::coloncolon)) {
- return Left.is(tok::star) &&
+ const auto *Prev = BeforeLeft->Previous;
+ return Left
kadircet wrote:
```
$ cat a.cc
fooo(BAR(
XXXZ()));
```
```
$ clang-format a.cc
fooo(BAR(
XXXZ()));
```
https://github.com/llvm/llvm-project/pul
@@ -4591,7 +4589,9 @@ bool TokenAnnotator::spaceRequiredBetween(const
AnnotatedLine &Line,
if (!BeforeLeft)
return false;
if (BeforeLeft->is(tok::coloncolon)) {
- return Left.is(tok::star) &&
+ const auto *Prev = BeforeLeft->Previous;
+ return Left
https://github.com/kadircet updated
https://github.com/llvm/llvm-project/pull/105168
From d0f1e7032647845fbe235856998e86bfbb59e937 Mon Sep 17 00:00:00 2001
From: Kadir Cetinkaya
Date: Tue, 20 Aug 2024 19:40:42 +0200
Subject: [PATCH] [clang-format] Treat new expressions as simple functions
ccae
@@ -848,6 +848,8 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState
&State, bool DryRun,
const auto IsSimpleFunction = [&](const FormatToken &Tok) {
if (!Tok.FakeLParens.empty() && Tok.FakeLParens.back() > prec::Unknown)
return false;
+if (Tok.is(tok
https://github.com/kadircet approved this pull request.
thanks a lot!
https://github.com/llvm/llvm-project/pull/105043
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4589,9 +4589,12 @@ bool TokenAnnotator::spaceRequiredBetween(const
AnnotatedLine &Line,
if (!BeforeLeft)
return false;
if (BeforeLeft->is(tok::coloncolon)) {
- const auto *Prev = BeforeLeft->Previous;
- return Left.is(tok::star) && Prev &&
-
https://github.com/kadircet edited
https://github.com/llvm/llvm-project/pull/105043
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kadircet updated
https://github.com/llvm/llvm-project/pull/105168
From 089699a673d29e244e750bf1c978292594362cdc Mon Sep 17 00:00:00 2001
From: Kadir Cetinkaya
Date: Tue, 20 Aug 2024 19:40:42 +0200
Subject: [PATCH] [clang-format] Treat new expressions as simple functions
ccae
https://github.com/kadircet created
https://github.com/llvm/llvm-project/pull/105844
In practice most of these expressions just resolve to implicitly
provided `operator new` and standard says it's not necessary to include
`` for that.
Hence this is resulting in a lot of churn in cases where incl
https://github.com/kadircet closed
https://github.com/llvm/llvm-project/pull/105844
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kadircet closed
https://github.com/llvm/llvm-project/pull/105168
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kadircet updated
https://github.com/llvm/llvm-project/pull/108524
From e63f2acd673183d15420b41ebe50a1c061de0905 Mon Sep 17 00:00:00 2001
From: Kadir Cetinkaya
Date: Fri, 13 Sep 2024 11:31:43 +0200
Subject: [PATCH] [Format] Dont treat LBrace after extends/implements as
initia
kadircet wrote:
added, ptal
https://github.com/llvm/llvm-project/pull/108524
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -243,14 +244,16 @@ class AnnotatingParser {
// operator that was misinterpreted because we are parsing template
// parameters.
// FIXME: This is getting out of hand, write a decent parser.
- if (InExpr && !Line.startsWith(tok::kw_template) &&
+ if
https://github.com/kadircet requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/108671
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kadircet closed
https://github.com/llvm/llvm-project/pull/108524
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kadircet requested changes to this pull request.
thanks a lot for the patch, and sorry for regressing this.
I think this is also going to regress behavior in some cases (e.g. working
directory in compile commands might be virtual for some build systems like
bazel).
When inc
kadircet wrote:
> so clang-include-cleaner correctly adjusted the path to
> /home/leebc/.cache/bazel/_bazel_leebc/5ea2deb937e75f0bf29ba4c49931e67d/execroot/_main/api/main.cc,
> which was correctly symlinked.
in our case this is symlinked to an immutable copy of the source file (to make
sure b
@@ -305,7 +342,32 @@ int main(int argc, const char **argv) {
}
}
- clang::tooling::ClangTool Tool(OptionsParser->getCompilations(),
+ auto &CompilationDatabase = OptionsParser->getCompilations();
kadircet wrote:
i think this can be simplified with som
401 - 500 of 862 matches
Mail list logo