@@ -2052,6 +2052,19 @@ def referenced(self):
return self._referenced
+@property
+def specialized(self):
+"""
+For a cursor that is instantiated from a template, returns a cursor
+representing the template that it was instantiated from.
https://github.com/DeinAlptraum commented:
The Python part looks mostly good to me. I'm not too familiar with the
non-Python side of things though, so would like someone else to take a look as
well.
@Endilll do you want to take a look?
https://github.com/llvm/llvm-project/pull/123539
_
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 293dbea8b0169525d93a4ee4b7d6c53aa9d4bee0
8aea4bc08a1f48819d8fa4e6608997b5f5c1d024 --e
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Nathan Ridge (HighCommander4)
Changes
Partially fixes https://github.com/llvm/llvm-project/issues/124450
---
Full diff: https://github.com/llvm/llvm-project/pull/124451.diff
2 Files Affected:
- (modified) clang/lib/Sema/HeuristicResolve
https://github.com/HighCommander4 created
https://github.com/llvm/llvm-project/pull/124451
Partially fixes https://github.com/llvm/llvm-project/issues/124450
>From 9c8349f994f8c66f07be79834352fbe25301ef43 Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Sun, 26 Jan 2025 02:04:45 -0500
Subject
@@ -51,28 +57,71 @@ class StringToOffsetTable {
return II->second;
}
- // Emit the string using string literal concatenation, for better readability
- // and searchability.
- void EmitStringLiteralDef(raw_ostream &OS, const Twine &Decl,
-co
https://github.com/HighCommander4 created
https://github.com/llvm/llvm-project/pull/124449
None
>From 6f0ff1b166f2ea3b0bfa58ca2a0911832d751bdf Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Sun, 26 Jan 2025 01:30:28 -0500
Subject: [PATCH] [clang][CodeComplete] Use HeuristicResolver to resol
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Kazu Hirata (kazutakahirata)
Changes
This patch avoids repeated map lookups and constructions of temporary
std::string instances by switching to StringMap.
---
Full diff: https://github.com/llvm/llvm-project/pull/124448.diff
1 Files Aff
https://github.com/kazutakahirata created
https://github.com/llvm/llvm-project/pull/124448
This patch avoids repeated map lookups and constructions of temporary
std::string instances by switching to StringMap.
>From 2273e9e518fa5625a40298a970dfd3ad1c3f27db Mon Sep 17 00:00:00 2001
From: Kazu H
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Kazu Hirata (kazutakahirata)
Changes
Note that PointerUnion::dyn_cast has been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_cast() with
//isa, cast and the llvm::dyn_cast
Litera
https://github.com/kazutakahirata created
https://github.com/llvm/llvm-project/pull/124447
Note that PointerUnion::dyn_cast has been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_cast() with
//isa, cast and the llvm::dyn_cast
Literal migration
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Kazu Hirata (kazutakahirata)
Changes
Note that PointerUnion::dyn_cast has been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_cast() with
//isa, cast and the llvm::dyn_cast
Litera
https://github.com/kazutakahirata created
https://github.com/llvm/llvm-project/pull/124446
Note that PointerUnion::dyn_cast has been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_cast() with
//isa, cast and the llvm::dyn_cast
Literal migration
https://github.com/anematode updated
https://github.com/llvm/llvm-project/pull/124365
>From 2508da6fd7f38101011573460724f13df1c1616d Mon Sep 17 00:00:00 2001
From: Timothy Herchen
Date: Fri, 24 Jan 2025 15:13:30 -0800
Subject: [PATCH 1/2] [clang][docs] Fix typos concerning wasm __funcref
---
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/124313
>From 8210ac8a213a8409dc3b470fb295b70e8264934d Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Sun, 12 Jan 2025 14:45:24 -0300
Subject: [PATCH] [clang] disallow narrowing when matching template template
p
@@ -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
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder
`openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building
`clang` at step 6 "test-openmp".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/73/builds/12436
Here is the relevant piec
Author: Owen Pan
Date: 2025-01-25T18:31:42-08:00
New Revision: c1ec5beb4ab36c2c4d99ed6d735d217e74364771
URL:
https://github.com/llvm/llvm-project/commit/c1ec5beb4ab36c2c4d99ed6d735d217e74364771
DIFF:
https://github.com/llvm/llvm-project/commit/c1ec5beb4ab36c2c4d99ed6d735d217e74364771.diff
LOG:
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/124438
>From 8679752fc806d232732bab5da1f53b78c6f7f0e9 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sat, 25 Jan 2025 15:53:36 -0800
Subject: [PATCH] [clang-format] Treat `f(a)` as template function call
Fixes #123144.
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/124380
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,117 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++26 %s -verify
ricejasonf wrote:
I added these to the bottom of this file.
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-co
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/124380
>From 5b45be664597788137686c1b374f362f23e06d78 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 24 Jan 2025 18:07:05 -0800
Subject: [PATCH 1/2] [clang-format] Fix a crash on comment after TableGen
l_paren
Fix
antangelo wrote:
> LGTM modulo nits. Can we observe that through sema/pch tests?
This functionality isn't yet observable in code (i.e. through lit tests), so it
can't be tested through PCH tests on its own (which is primarily why I haven't
split this code off sooner).
In the CTAD from inherite
@@ -2290,18 +2290,21 @@ CXXDeductionGuideDecl *CXXDeductionGuideDecl::Create(
ASTContext &C, DeclContext *DC, SourceLocation StartLoc,
ExplicitSpecifier ES, const DeclarationNameInfo &NameInfo, QualType T,
TypeSourceInfo *TInfo, SourceLocation EndLocation, CXXConstr
@@ -8147,6 +8149,26 @@ TEST_P(ImportFunctions, CTADWithLocalTypedef) {
ASSERT_TRUE(ToD);
}
+TEST_P(ImportFunctions, CTADAliasTemplate) {
+ Decl *TU = getTuDecl(
+ R"(
+ template struct A {
+A(T);
+ };
+ template
+ using B = A;
+ B b{(i
https://github.com/antangelo updated
https://github.com/llvm/llvm-project/pull/123875
>From ff55e99b39e2e60859a93db5a479ac2128761e30 Mon Sep 17 00:00:00 2001
From: antangelo
Date: Tue, 21 Jan 2025 22:53:39 -0500
Subject: [PATCH 1/2] [clang] Track source deduction guide for alias template
deduc
https://github.com/hnakamura5 approved this pull request.
https://github.com/llvm/llvm-project/pull/124380
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -101,6 +101,9 @@ TEST_F(FormatTestTableGen, BangOperators) {
" \"zerozero\",\n"
" true: // default\n"
" \"positivepositive\");\n"
llvmbot wrote:
@llvm/pr-subscribers-clang-format
Author: Owen Pan (owenca)
Changes
Fixes #123144.
---
Full diff: https://github.com/llvm/llvm-project/pull/124438.diff
2 Files Affected:
- (modified) clang/lib/Format/TokenAnnotator.cpp (+3-4)
- (modified) clang/unittests/Format/TokenAnn
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/124438
Fixes #123144.
>From c401d699b756a54b2e7c9a1c00bcae005c9cae4d Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sat, 25 Jan 2025 15:53:36 -0800
Subject: [PATCH] [clang-format] Treat `f(a)` as template function call
chandlerc wrote:
Ping!
I've updated this to incorporate the changes in #123398 to the NVPTX.def file
this is replacing.
Adding the author & reviewers of that PR to this -- I'd really like to either
get this landed or figure out what other approach to use it avoid having to
continually update
Author: Kazu Hirata
Date: 2025-01-25T15:25:17-08:00
New Revision: d2c7cabe0453d6a6d03c15b7ae1800b53de9e182
URL:
https://github.com/llvm/llvm-project/commit/d2c7cabe0453d6a6d03c15b7ae1800b53de9e182
DIFF:
https://github.com/llvm/llvm-project/commit/d2c7cabe0453d6a6d03c15b7ae1800b53de9e182.diff
L
https://github.com/kazutakahirata closed
https://github.com/llvm/llvm-project/pull/124434
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kazutakahirata closed
https://github.com/llvm/llvm-project/pull/124433
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Kazu Hirata
Date: 2025-01-25T15:25:04-08:00
New Revision: 0f3c2884f3ccbdbe396e4388feb8be716b50dd68
URL:
https://github.com/llvm/llvm-project/commit/0f3c2884f3ccbdbe396e4388feb8be716b50dd68
DIFF:
https://github.com/llvm/llvm-project/commit/0f3c2884f3ccbdbe396e4388feb8be716b50dd68.diff
L
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder
`clang-s390x-linux-multistage` running on `systemz-1` while building `clang` at
step 5 "ninja check 1".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/98/builds/941
Here is the relevant piece of the
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/124433
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/124434
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Kazu Hirata (kazutakahirata)
Changes
Note that PointerUnion::dyn_cast has been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_cast() with
//isa, cast and the llvm::dyn_cast
Litera
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Kazu Hirata (kazutakahirata)
Changes
Note that PointerUnion::dyn_cast has been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_cast() with
//isa, cast and the llvm::dyn_cast
Litera
https://github.com/kazutakahirata created
https://github.com/llvm/llvm-project/pull/124434
Note that PointerUnion::dyn_cast has been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_cast() with
//isa, cast and the llvm::dyn_cast
Literal migration
https://github.com/kazutakahirata created
https://github.com/llvm/llvm-project/pull/124433
Note that PointerUnion::dyn_cast has been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_cast() with
//isa, cast and the llvm::dyn_cast
Literal migration
@@ -6113,9 +6113,13 @@ void Clang::ConstructJob(Compilation &C, const JobAction
&JA,
if (KernelOrKext && RawTriple.isOSDarwin())
CmdArgs.push_back("-fforbid-guard-variables");
- if (Args.hasFlag(options::OPT_mms_bitfields, options::OPT_mno_ms_bitfields,
-
https://github.com/kazutakahirata closed
https://github.com/llvm/llvm-project/pull/124425
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Kazu Hirata
Date: 2025-01-25T14:05:11-08:00
New Revision: 04d5608057f73cf8deb66ddaeddf2f9254fd864b
URL:
https://github.com/llvm/llvm-project/commit/04d5608057f73cf8deb66ddaeddf2f9254fd864b
DIFF:
https://github.com/llvm/llvm-project/commit/04d5608057f73cf8deb66ddaeddf2f9254fd864b.diff
L
https://github.com/kazutakahirata closed
https://github.com/llvm/llvm-project/pull/124430
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Kazu Hirata
Date: 2025-01-25T14:05:01-08:00
New Revision: 563c7c5539f05e7f8cbb42565c1f24466019f38b
URL:
https://github.com/llvm/llvm-project/commit/563c7c5539f05e7f8cbb42565c1f24466019f38b
DIFF:
https://github.com/llvm/llvm-project/commit/563c7c5539f05e7f8cbb42565c1f24466019f38b.diff
L
@@ -2009,7 +2009,8 @@ class ClassTemplateSpecializationDecl : public
CXXRecordDecl,
/// Retrieve the template argument list as written in the sources,
/// if any.
const ASTTemplateArgumentListInfo *getTemplateArgsAsWritten() const {
-if (auto *Info = ExplicitInfo.dyn
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/124425
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/124430
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Kazu Hirata (kazutakahirata)
Changes
Note that PointerUnion::dyn_cast has been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_cast() with
//isa, cast and the llvm::dyn_cast
Litera
https://github.com/kazutakahirata created
https://github.com/llvm/llvm-project/pull/124430
Note that PointerUnion::dyn_cast has been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_cast() with
//isa, cast and the llvm::dyn_cast
Literal migration
@@ -885,18 +885,18 @@ class Preprocessor {
}
~MacroState() {
- if (auto *Info = State.dyn_cast())
+ if (auto *Info = dyn_cast_if_present(State))
Info->~ModuleMacroInfo();
}
MacroDirective *getLatest() const {
- if (auto *Info = State
@@ -1391,7 +1391,9 @@ class DeclContextLookupResult {
const_iterator end() const { return iterator(); }
bool empty() const { return Result.isNull(); }
- bool isSingleResult() const { return Result.dyn_cast(); }
+ bool isSingleResult() const {
+return dyn_cast_if_pre
https://github.com/kazutakahirata updated
https://github.com/llvm/llvm-project/pull/124425
>From 8586c0eae876176888bba3f9f9b8f2a83eea9684 Mon Sep 17 00:00:00 2001
From: Kazu Hirata
Date: Sat, 25 Jan 2025 10:38:03 -0800
Subject: [PATCH 1/2] [clang] Migrate away from PointerUnion::dyn_cast (NFC)
@@ -885,18 +885,18 @@ class Preprocessor {
}
~MacroState() {
- if (auto *Info = State.dyn_cast())
+ if (auto *Info = dyn_cast_if_present(State))
Info->~ModuleMacroInfo();
}
MacroDirective *getLatest() const {
- if (auto *Info = State
@@ -2009,7 +2009,8 @@ class ClassTemplateSpecializationDecl : public
CXXRecordDecl,
/// Retrieve the template argument list as written in the sources,
/// if any.
const ASTTemplateArgumentListInfo *getTemplateArgsAsWritten() const {
-if (auto *Info = ExplicitInfo.dyn
@@ -1391,7 +1391,9 @@ class DeclContextLookupResult {
const_iterator end() const { return iterator(); }
bool empty() const { return Result.isNull(); }
- bool isSingleResult() const { return Result.dyn_cast(); }
+ bool isSingleResult() const {
+return dyn_cast_if_pre
@@ -2009,7 +2009,8 @@ class ClassTemplateSpecializationDecl : public
CXXRecordDecl,
/// Retrieve the template argument list as written in the sources,
/// if any.
const ASTTemplateArgumentListInfo *getTemplateArgsAsWritten() const {
-if (auto *Info = ExplicitInfo.dyn
https://github.com/trelau updated
https://github.com/llvm/llvm-project/pull/123539
>From bb0542e8f2ad50892ee9d2c1f76ec1def85c3e56 Mon Sep 17 00:00:00 2001
From: Trevor Laughlin
Date: Sun, 19 Jan 2025 19:21:10 -0500
Subject: [PATCH 1/2] [cindex] Add API to query the class methods of a type
---
https://github.com/HazardyKnusperkeks approved this pull request.
https://github.com/llvm/llvm-project/pull/124397
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request.
https://github.com/llvm/llvm-project/pull/124380
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: cor3ntin (cor3ntin)
Changes
As we create defaul constructors lazily, we should not inherit from the parent
evaluation context.
However, we need to make an exception for lambdas (in particular their
conversion operators, which are also imp
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Kazu Hirata (kazutakahirata)
Changes
Note that PointerUnion::dyn_cast has been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_cast() with
//isa, cast and the llvm::dyn_cast
This p
https://github.com/cor3ntin created
https://github.com/llvm/llvm-project/pull/124426
As we create defaul constructors lazily, we should not inherit from the parent
evaluation context.
However, we need to make an exception for lambdas (in particular their
conversion operators, which are also im
https://github.com/kazutakahirata created
https://github.com/llvm/llvm-project/pull/124425
Note that PointerUnion::dyn_cast has been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_cast() with
//isa, cast and the llvm::dyn_cast
This patch migrat
asb wrote:
> It could be due to builtins, I believe we always serialize them, and that
> would be different between targets. Does RISC-V have a lot of them compared
> to other targets?
That's almost certainly it then, thanks! We have a _lot_ of vector builtins in
particular.
https://github.c
https://github.com/AidanGoldfarb ready_for_review
https://github.com/llvm/llvm-project/pull/122754
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1,11 +1,20 @@
// RUN: %clang -### -S -fwrapv -fno-wrapv -fwrapv %s 2>&1 | FileCheck
-check-prefix=CHECK1 %s
// CHECK1: -fwrapv
//
+// RUN: %clang -### -S -fwrapv-pointer -fno-wrapv-pointer -fwrapv-pointer %s
2>&1 | FileCheck -check-prefix=CHECK1-POINTER %s
+// CHECK1-POIN
@@ -1,11 +1,20 @@
// RUN: %clang -### -S -fwrapv -fno-wrapv -fwrapv %s 2>&1 | FileCheck
-check-prefix=CHECK1 %s
// CHECK1: -fwrapv
//
+// RUN: %clang -### -S -fwrapv-pointer -fno-wrapv-pointer -fwrapv-pointer %s
2>&1 | FileCheck -check-prefix=CHECK1-POINTER %s
+// CHECK1-POIN
https://github.com/MaskRay edited
https://github.com/llvm/llvm-project/pull/122486
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MaskRay approved this pull request.
Will be used by chromium and other users. There is some gap in sanitizer that
is not so important.
LGTM, but other reviewers need to stamp as well.
https://github.com/llvm/llvm-project/pull/122486
__
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/123413
>From f5f0ba142a2eb71ce781faf4e15fcd225bec9ca8 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Sat, 18 Jan 2025 00:49:29 +0300
Subject: [PATCH 1/3] [clang-tidy] Added support for 3-argument string ctor
---
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/122951
>From 841cfec5a0ab4ce5ce64e71facfb7becaf4340e8 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Tue, 14 Jan 2025 22:05:43 +0300
Subject: [PATCH 1/5] [clang-tidy] add AllowedTypes to misc-const-correctness
-
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/124313
>From f2df46da93aeeaed9f774322231866a7509e3fa0 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Sun, 12 Jan 2025 14:45:24 -0300
Subject: [PATCH] [clang] disallow narrowing when matching template template
p
@@ -0,0 +1,48 @@
+.. title:: clang-tidy - bugprone-smartptr-reset-ambiguous-call
+
+bugprone-smartptr-reset-ambiguous-call
+==
+
+Finds potentially erroneous calls to ``reset`` method on
vbvictor wrote:
Done
https://github.com
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/121291
>From 37dce6a7ed0cca2e9819c24f4d176c43e3c9f2ac Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Sun, 29 Dec 2024 15:32:22 +0300
Subject: [PATCH 1/8] [clang-tidy] Add bugprone-reset-call check
---
.../bugpr
@@ -66,8 +66,9 @@ namespace DependentType {
using ok = Pt, tT0>;
using err1 = tT0; // expected-error {{too few template arguments
for class template 'ii'}}
// expected-note@-1 {{different template
parameters}}
- using err2 = tT0; // FIXME: sh
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: cor3ntin (cor3ntin)
Changes
HandleImmediateInvocation can call MarkExpressionAsImmediateEscalating and
should always be called before CheckImmediateEscalatingFunctionDefinition.
However, we were not doing that in `ActFunctionBody`.
We si
https://github.com/cor3ntin created
https://github.com/llvm/llvm-project/pull/124414
HandleImmediateInvocation can call MarkExpressionAsImmediateEscalating and
should always be called before CheckImmediateEscalatingFunctionDefinition.
However, we were not doing that in `ActFunctionBody`.
We s
thorsten-klein wrote:
@EugeneZelenko What do you think about some additional option
`EnforceNoNamespaceComments` in order to enforce that no namespace comment is
present?
If you like the idea, I could create some additional PR for introducing this
option.
https://github.com/llvm/llvm-project/
https://github.com/thorsten-klein edited
https://github.com/llvm/llvm-project/pull/124265
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/thorsten-klein edited
https://github.com/llvm/llvm-project/pull/124265
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -287,6 +287,11 @@ Changes in existing checks
` check to
report a location even when the member location is not valid.
+- Improved :doc:`google-readability-namespace-comments
+ ` check to
+ add an option ``AllowNoNamespaceComments``, that permits
Eugen
https://github.com/thorsten-klein updated
https://github.com/llvm/llvm-project/pull/124265
>From 9f3bc5021e6da87fa9a8db60b513acb87ed6b02f Mon Sep 17 00:00:00 2001
From: "Klein, Thorsten (GDE-EDSI1)"
Date: Fri, 24 Jan 2025 13:46:24 +0100
Subject: [PATCH] added option AllowNoNamespaceComments for
@@ -287,6 +287,11 @@ Changes in existing checks
` check to
report a location even when the member location is not valid.
+- Improved :doc:`google-readability-namespace-comments
+ ` check to
+ add an option ``AllowNoNamespaceComments``, that permits
thors
@@ -287,6 +287,11 @@ Changes in existing checks
` check to
report a location even when the member location is not valid.
+- Improved :doc:`google-readability-namespace-comments
+ ` check to
+ add an option ``AllowNoNamespaceComments``, that permits
Eugen
@@ -184,6 +189,11 @@ void NamespaceCommentCheck::check(const
MatchFinder::MatchResult &Result) {
ND->isAnonymousNamespace() ? "anonymous namespace"
: ("namespace '" + *NamespaceNameAsWritten +
"'");
+ // If no namespace comment is allo
gruenich wrote:
Already fixed by 7974f12b1e3682514bd58b35c5a784f35938fa04
https://github.com/llvm/llvm-project/pull/124398
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/gruenich closed
https://github.com/llvm/llvm-project/pull/124398
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/thorsten-klein updated
https://github.com/llvm/llvm-project/pull/124265
>From bade51bc7f0135e5c74cc64ee851a17813c6820f Mon Sep 17 00:00:00 2001
From: "Klein, Thorsten (GDE-EDSI1)"
Date: Fri, 24 Jan 2025 13:46:24 +0100
Subject: [PATCH] added option AllowNoNamespaceComments for
@@ -39,3 +39,11 @@ Options
An unsigned integer specifying the number of spaces before the comment
closing a namespace definition. Default is `1U`.
+
+
+.. option:: AllowNoNamespaceComments
+
+ When true, the check will allow that namespace comments are ommitted
+ ent
@@ -402,6 +402,13 @@ Changes in existing checks
` check to use correct
template
type in ``std::min`` and ``std::max`` when operand is integer literal.
+- Improved :doc:`google-readability-namespace-comments
EugeneZelenko wrote:
Please keep alphabetical o
@@ -402,6 +402,13 @@ Changes in existing checks
` check to use correct
template
type in ``std::min`` and ``std::max`` when operand is integer literal.
+- Improved :doc:`google-readability-namespace-comments
+ ` that permits
+ omitting namespace comments entirely. With
@@ -39,3 +39,11 @@ Options
An unsigned integer specifying the number of spaces before the comment
closing a namespace definition. Default is `1U`.
+
+
+.. option:: AllowNoNamespaceComments
+
+ When true, the check will allow that namespace comments are ommitted
---
@@ -0,0 +1,40 @@
+.. title:: clang-tidy - use-cpp-style-comments
+
+modernize-use-cpp-style-comments
+
+
+Replace C-style comments with C++-style comments.
+C-style comments (``/* ... */``) are inherited from C, while C++ introduces
+``//`` as a mo
@@ -0,0 +1,127 @@
+//===--- UseCppStyleCommentsCheck.cpp -
clang-tidy-===//
+
+//
+// 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:
@@ -173,6 +173,11 @@ New checks
Replace comparisons between signed and unsigned integers with their safe
C++20 ``std::cmp_*`` alternative, if available.
+
+- New :doc:`modernize-use-cpp-style-comments
EugeneZelenko wrote:
Should be before `modernize-use
@@ -0,0 +1,40 @@
+//===--- UseCppStyleCommentsCheck.h -
clang-tidy---===//
EugeneZelenko wrote:
```suggestion
//===--- UseCppStyleCommentsCheck.h - clang-tidy-*- C++ -*-===//
```
https://github.com/llvm/llvm-project/pull/
@@ -0,0 +1,68 @@
+// RUN: %check_clang_tidy -std=c++11 %s modernize-use-cpp-style-comments %t --
--
+
+// Single-line full C-style comment
+static const int CONSTANT = 42; /* Important constant value */
+// CHECK-MESSAGES: :[[@LINE-1]]:33: warning: use C++ style comments '//'
in
1 - 100 of 147 matches
Mail list logo