[clang] [clang] In Sema use new parentEvaluationContext function (PR #93338)

2024-05-26 Thread Vlad Serebrennikov via cfe-commits

https://github.com/Endilll commented:

LGTM

https://github.com/llvm/llvm-project/pull/93338
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[llvm-branch-commits] [mlir] [draft] Dialect Conversion without Rollback (PR #93412)

2024-05-26 Thread Matthias Springer via llvm-branch-commits
32)>)>
 // CHECK: %[[S5:.+]] = llvm.extractvalue %[[S4]][0] : 
!llvm.struct<(struct<(f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32)>, struct<(f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32)>)> 
@@ -1296,7 +1298,7 @@ func.func @warpgroup_matrix_multiply_m128n128k64(
 // CHECK: nvvm.wgmma.fence.aligned
 // CHECK: %[[S137:.+]] = llvm.mlir.undef : !llvm.struct<(struct<(f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32)>, 
struct<(f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32)>)>
 // CHECK: %[[S138:.+]] = llvm.extractvalue %136[0] : 
!llvm.struct<(struct<(f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32)>, struct<(f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32)>)> 
-// CHECK: %[[S139:.+]] = nvvm.wgmma.mma_async %0, %1, %[[S138]], , D[, , ], A[, , ], B[, 
, ] : !llvm.struct<(f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32)> -> !llvm.struct<(f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32)>
+// CHECK: %[[S139:.+]] = nvvm.wgmma.mma_async %[[S0]], %[[S1]], %[[S138]], , D[, , ], A[, , ], 
B[, , ] : !llvm.struct<(f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32)> -> !llvm.struct<(f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, 
f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32)>
 // CHECK: nvvm.wgmma.mma_async
 // CHECK: nvvm.wgmma.mma_async
 // CHECK: %[[S154:.+]] = nvvm.wgmma.mma_async

___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[clang] [clang] In Sema use new parentEvaluationContext function (PR #93338)

2024-05-26 Thread Oleksandr T. via cfe-commits
(getLangOpts().CPlusPlus23 && Rec.InLifetimeExtendingContext &&
   PrevRecord.InLifetimeExtendingContext &&
   !Rec.ForRangeLifetimeExtendTemps.empty()) {
-const_cast &>(
-PrevRecord.ForRangeLifetimeExtendTemps)
-.append(Rec.ForRangeLifetimeExtendTemps);
+PrevRecord.ForRangeLifetimeExtendTemps.append(
+Rec.ForRangeLifetimeExtendTemps);
   }
 
   WarnOnPendingNoDerefs(Rec);

>From 0d92f883b2b4da20550caecfa6d2b6e69ad685f5 Mon Sep 17 00:00:00 2001
From: Oleksandr T 
Date: Sun, 26 May 2024 15:47:51 +0300
Subject: [PATCH 3/3] eliminate duplication in const and non-const overloads

---
 clang/include/clang/Sema/Sema.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h
index 2fe885e5429ca..ec083f7cc09b7 100644
--- a/clang/include/clang/Sema/Sema.h
+++ b/clang/include/clang/Sema/Sema.h
@@ -5160,9 +5160,7 @@ class Sema final : public SemaBase {
   };
 
   const ExpressionEvaluationContextRecord () const {
-assert(ExprEvalContexts.size() >= 2 &&
-   "Must be in an expression evaluation context");
-return ExprEvalContexts[ExprEvalContexts.size() - 2];
+return const_cast(this)->parentEvaluationContext();
   };
 
   bool isBoundsAttrContext() const {

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang][Sema] Use correct TemplateName when transforming TemplateSpecializationType (PR #93411)

2024-05-26 Thread Qizhi Hu via cfe-commits
medTypeLoc().getType())) {
 TemplateSpecializationTypeLoc SpecTL =
 TL.getNamedTypeLoc().castAs();
-// TemplateArgumentListInfo NewTemplateArgs;
-// NewTemplateArgs.setLAngleLoc(SpecTL.getLAngleLoc());
-// NewTemplateArgs.setRAngleLoc(SpecTL.getRAngleLoc());
-
-// typedef TemplateArgumentLocContainerIterator<
-// TemplateSpecializationTypeLoc> ArgIterator;
-// if (getDerived().TransformTemplateArguments(ArgIterator(SpecTL, 0),
-// ArgIterator(SpecTL, 
SpecTL.getNumArgs()),
-// NewTemplateArgs))
-//   return QualType();
-
+const TemplateSpecializationType *TST =
+SpecTL.getType()->castAs();
 CXXScopeSpec SS;
 SS.Adopt(QualifierLoc);
-TemplateName InstName = getDerived().RebuildTemplateName(
-SS, TL.getTemplateKeywordLoc(), 
*TST->getTemplateName().getAsTemplateDecl()->getIdentifier(), 
TL.getNamedTypeLoc().getBeginLoc(), QualType(), nullptr,
-false);
-
-if (InstName.isNull())
-  return QualType();
-
-// If it's still dependent, make a dependent specialization.
-// if (InstName.getAsDependentTemplateName())
-//   return SemaRef.Context.getDependentTemplateSpecializationType(
-//   Keyword, QualifierLoc.getNestedNameSpecifier(), Name,
-//   Args.arguments());
-
-// Otherwise, make an elaborated type wrapping a non-dependent
-// specialization.
-// NamedT = getDerived().RebuildTemplateSpecializationType(InstName, 
TL.getNamedTypeLoc().getBeginLoc(), NewTemplateArgs);
-NamedT = TransformTemplateSpecializationType(TLB, SpecTL, InstName);
-  } else {
+if (TemplateDecl *TD = TST->getTemplateName().getAsTemplateDecl()) {
+  TemplateName InstName = getDerived().RebuildTemplateName(
+  SS, TL.getTemplateKeywordLoc(), *TD->getIdentifier(),
+  TL.getNamedTypeLoc().getBeginLoc(), /*ObjectType=*/QualType(),
+  /*FirstQualifierInScope=*/nullptr, /*AllowInjectedClassName=*/false);
+  if (InstName.isNull())
+return QualType();
+  NamedT = TransformTemplateSpecializationType(TLB, SpecTL, InstName);
+}
+  }
+  if (NamedT.isNull()) {
 NamedT = getDerived().TransformType(TLB, TL.getNamedTypeLoc());
-
+if (NamedT.isNull())
+  return QualType();
   }
 
-  if (NamedT.isNull())
-return QualType();
-
   // C++0x [dcl.type.elab]p2:
   //   If the identifier resolves to a typedef-name or the simple-template-id
   //   resolves to an alias template specialization, the
diff --git a/clang/test/SemaCXX/PR91677.cpp b/clang/test/SemaCXX/PR91677.cpp
new file mode 100644
index 0..cc8db60a438ea
--- /dev/null
+++ b/clang/test/SemaCXX/PR91677.cpp
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -verify -std=c++20 -fsyntax-only %s
+// expected-no-diagnostics
+
+template  struct t1 {
+  template 
+  struct t2 {};
+};
+
+template 
+t1::template t2 f1();
+
+void f2() {
+  f1();
+}
diff --git a/clang/test/SemaTemplate/typename-specifier-3.cpp 
b/clang/test/SemaTemplate/typename-specifier-3.cpp
index 714830f0032d2..a62a1fc5ab39c 100644
--- a/clang/test/SemaTemplate/typename-specifier-3.cpp
+++ b/clang/test/SemaTemplate/typename-specifier-3.cpp
@@ -28,16 +28,17 @@ namespace PR12884_original {
   typedef int arg;
 };
 struct C {
-  typedef B::X x; // precxx17-warning{{missing 'typename' 
prior to dependent type name B::X; implicit 'typename' is a C++20 extension}}
+  typedef B::X x; // precxx17-warning{{missing 'typename' 
prior to dependent type name B::X; implicit 'typename' is a C++20 extension}} \
+   cxx17-error{{typename specifier refers 
to non-type member 'arg' in 'PR12884_original::A::B'}}
 };
   };
 
   template <> struct A::B {
 template  struct X {};
-static const int arg = 0;
+    static const int arg = 0; // cxx17-note{{referenced member 'arg' is 
declared here}}
   };
 
-  A::C::x a;
+  A::C::x a; // cxx17-note{{in instantiation of member class 
'PR12884_original::A::C' requested here}}
 }
 namespace PR12884_half_fixed {
   template  struct A {

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang][Sema] Use correct TemplateName when transforming TemplateSpecializationType (PR #93411)

2024-05-26 Thread Qizhi Hu via cfe-commits
medTypeLoc().getType())) {
 TemplateSpecializationTypeLoc SpecTL =
 TL.getNamedTypeLoc().castAs();
-// TemplateArgumentListInfo NewTemplateArgs;
-// NewTemplateArgs.setLAngleLoc(SpecTL.getLAngleLoc());
-// NewTemplateArgs.setRAngleLoc(SpecTL.getRAngleLoc());
-
-// typedef TemplateArgumentLocContainerIterator<
-// TemplateSpecializationTypeLoc> ArgIterator;
-// if (getDerived().TransformTemplateArguments(ArgIterator(SpecTL, 0),
-// ArgIterator(SpecTL, 
SpecTL.getNumArgs()),
-// NewTemplateArgs))
-//   return QualType();
-
+const TemplateSpecializationType *TST =
+SpecTL.getType()->castAs();
 CXXScopeSpec SS;
 SS.Adopt(QualifierLoc);
-TemplateName InstName = getDerived().RebuildTemplateName(
-SS, TL.getTemplateKeywordLoc(), 
*TST->getTemplateName().getAsTemplateDecl()->getIdentifier(), 
TL.getNamedTypeLoc().getBeginLoc(), QualType(), nullptr,
-false);
-
-if (InstName.isNull())
-  return QualType();
-
-// If it's still dependent, make a dependent specialization.
-// if (InstName.getAsDependentTemplateName())
-//   return SemaRef.Context.getDependentTemplateSpecializationType(
-//   Keyword, QualifierLoc.getNestedNameSpecifier(), Name,
-//   Args.arguments());
-
-// Otherwise, make an elaborated type wrapping a non-dependent
-// specialization.
-// NamedT = getDerived().RebuildTemplateSpecializationType(InstName, 
TL.getNamedTypeLoc().getBeginLoc(), NewTemplateArgs);
-NamedT = TransformTemplateSpecializationType(TLB, SpecTL, InstName);
-  } else {
+if (TemplateDecl *TD = TST->getTemplateName().getAsTemplateDecl()) {
+  TemplateName InstName = getDerived().RebuildTemplateName(
+  SS, TL.getTemplateKeywordLoc(), *TD->getIdentifier(),
+  TL.getNamedTypeLoc().getBeginLoc(), /*ObjectType=*/QualType(),
+  /*FirstQualifierInScope=*/nullptr, /*AllowInjectedClassName=*/false);
+  if (InstName.isNull())
+return QualType();
+  NamedT = TransformTemplateSpecializationType(TLB, SpecTL, InstName);
+}
+  }
+  if (NamedT.isNull()) {
 NamedT = getDerived().TransformType(TLB, TL.getNamedTypeLoc());
-
+if (NamedT.isNull())
+  return QualType();
   }
 
-  if (NamedT.isNull())
-return QualType();
-
   // C++0x [dcl.type.elab]p2:
   //   If the identifier resolves to a typedef-name or the simple-template-id
   //   resolves to an alias template specialization, the
diff --git a/clang/test/SemaCXX/PR91677.cpp b/clang/test/SemaCXX/PR91677.cpp
new file mode 100644
index 0..66c3c11834832
--- /dev/null
+++ b/clang/test/SemaCXX/PR91677.cpp
@@ -0,0 +1,31 @@
+// RUN: %clang_cc1 -verify -std=c++20 -fsyntax-only %s
+// expected-no-diagnostics
+
+template  struct t1 {
+  template 
+  struct t2 {};
+};
+
+template 
+t1::template t2 f1();
+
+void f2() {
+  f1();
+}
+
+namespace N {
+  template  struct A {
+struct B {
+  template  struct X {};
+  typedef int arg;
+};
+struct C {
+  typedef typename B::template X x;
+};
+  };
+
+  template <> struct A::B {
+template  struct X {};
+static const int arg = 0;
+  };
+}
diff --git a/clang/test/SemaTemplate/typename-specifier-3.cpp 
b/clang/test/SemaTemplate/typename-specifier-3.cpp
index 714830f0032d2..a62a1fc5ab39c 100644
--- a/clang/test/SemaTemplate/typename-specifier-3.cpp
+++ b/clang/test/SemaTemplate/typename-specifier-3.cpp
@@ -28,16 +28,17 @@ namespace PR12884_original {
   typedef int arg;
 };
 struct C {
-  typedef B::X x; // precxx17-warning{{missing 'typename' 
prior to dependent type name B::X; implicit 'typename' is a C++20 extension}}
+  typedef B::X x; // precxx17-warning{{missing 'typename' 
prior to dependent type name B::X; implicit 'typename' is a C++20 extension}} \
+   cxx17-error{{typename specifier refers 
to non-type member 'arg' in 'PR12884_original::A::B'}}
 };
   };
 
   template <> struct A::B {
 template  struct X {};
-static const int arg = 0;
+    static const int arg = 0; // cxx17-note{{referenced member 'arg' is 
declared here}}
   };
 
-  A::C::x a;
+  A::C::x a; // cxx17-note{{in instantiation of member class 
'PR12884_original::A::C' requested here}}
 }
 namespace PR12884_half_fixed {
   template  struct A {

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang][Sema] Use correct TemplateName when transforming TemplateSpecializationType (PR #93411)

2024-05-26 Thread via cfe-commits

llvmbot wrote:




@llvm/pr-subscribers-clang

Author: Qizhi Hu (jcsxky)


Changes

Consider the following testcase:
```cpp
namespace PR12884_original {
  template typename T struct A {
struct B { ##1
  template typename U struct X {};
  typedef int arg;
};
struct C {
  typedef B::Xtypename B::arg x; 
};
  };

  template  struct Aint::B { ##2
template int N struct X {};
static const int arg = 0;
  };

  Aint::C::x a;
}
```
It will crash when compiling with `clang(assertions trunk)`. The reason is that 
we lookup `X`(`B::X`) in `##1` when instantiating `typedef 
B::Xtypename B::arg x; ` during instantiating `Aint::C::x`. 
This is incorrect because we should lookup `X` in `##2` when we see the 
declaration `Aint::C::x a;`. Since clang parse `AT::BT` 
to an `ElaboratedType`(`typename` is not required while compiling with 
`-std=c++20`)  while `typename AT::BT` turns to be a 
`DependentTemplateSpecializationType`, we should rebuild the `TemplateName` 
with transformed `Qualifier`(whose type is `NestedNameSpecifier`) to make sure 
the lookup context is correct.
This patch also attempts to fix #91677 which crashes with the same 
reason.

---
Full diff: https://github.com/llvm/llvm-project/pull/93411.diff


3 Files Affected:

- (modified) clang/lib/Sema/TreeTransform.h (+24-3) 
- (added) clang/test/SemaCXX/PR91677.cpp (+31) 
- (modified) clang/test/SemaTemplate/typename-specifier-3.cpp (+4-3) 


``diff
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index dee335b526991..6ef2eec09ec02 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -7216,9 +7216,30 @@ 
TreeTransform::TransformElaboratedType(TypeLocBuilder ,
   return QualType();
   }
 
-  QualType NamedT = getDerived().TransformType(TLB, TL.getNamedTypeLoc());
-  if (NamedT.isNull())
-return QualType();
+  QualType NamedT;
+  if (SemaRef.getLangOpts().CPlusPlus20 && QualifierLoc &&
+  isa(TL.getNamedTypeLoc().getType())) {
+TemplateSpecializationTypeLoc SpecTL =
+TL.getNamedTypeLoc().castAs();
+const TemplateSpecializationType *TST =
+SpecTL.getType()->castAs();
+CXXScopeSpec SS;
+SS.Adopt(QualifierLoc);
+if (TemplateDecl *TD = TST->getTemplateName().getAsTemplateDecl()) {
+  TemplateName InstName = getDerived().RebuildTemplateName(
+  SS, TL.getTemplateKeywordLoc(), *TD->getIdentifier(),
+  TL.getNamedTypeLoc().getBeginLoc(), /*ObjectType=*/QualType(),
+  /*FirstQualifierInScope=*/nullptr, /*AllowInjectedClassName=*/false);
+  if (InstName.isNull())
+return QualType();
+  NamedT = TransformTemplateSpecializationType(TLB, SpecTL, InstName);
+}
+  }
+  if (NamedT.isNull()) {
+NamedT = getDerived().TransformType(TLB, TL.getNamedTypeLoc());
+if (NamedT.isNull())
+  return QualType();
+  }
 
   // C++0x [dcl.type.elab]p2:
   //   If the identifier resolves to a typedef-name or the simple-template-id
diff --git a/clang/test/SemaCXX/PR91677.cpp b/clang/test/SemaCXX/PR91677.cpp
new file mode 100644
index 0..ef2999f959506
--- /dev/null
+++ b/clang/test/SemaCXX/PR91677.cpp
@@ -0,0 +1,31 @@
+// RUN: %clang_cc1 -verify -std=c++20 -fsyntax-only %s
+// expected-no-diagnostics
+
+template  struct t1 {
+  template 
+  struct t2 {};
+};
+
+template 
+t1::template t2 f1();
+
+void f2() {
+  f1();
+}
+
+namespace N {
+  template  struct A {
+struct B {
+  template  struct X {};
+  typedef int arg;
+};
+struct C {
+  typedef B::template X x;
+};
+  };
+
+  template <> struct A::B {
+template  struct X {};
+static const int arg = 0;
+  };
+}
diff --git a/clang/test/SemaTemplate/typename-specifier-3.cpp 
b/clang/test/SemaTemplate/typename-specifier-3.cpp
index 714830f0032d2..a62a1fc5ab39c 100644
--- a/clang/test/SemaTemplate/typename-specifier-3.cpp
+++ b/clang/test/SemaTemplate/typename-specifier-3.cpp
@@ -28,16 +28,17 @@ namespace PR12884_original {
   typedef int arg;
 };
 struct C {
-  typedef B::X x; // precxx17-warning{{missing 'typename' 
prior to dependent type name B::X; implicit 'typename' is a C++20 extension}}
+  typedef B::X x; // precxx17-warning{{missing 'typename' 
prior to dependent type name B::X; implicit 'typename' is a C++20 extension}} \
+   cxx17-error{{typename specifier refers 
to non-type member 'arg' in 'PR12884_original::A::B'}}
 };
   };
 
   template <> struct A::B {
 template  struct X {};
-static const int arg = 0;
+static const int arg = 0; // cxx17-note{{referenced member 'arg' is 
declared here}}
   };
 
-  A::C::x a;
+  A::C::x a; // cxx17-note{{in instantiation of member class 
'PR12884_original::A::C' requested here}}
 }
 namespace PR12884_half_fixed {
   template  struct A {

``




https://github.com/llvm/llvm-project/pull/93411
_______

[clang] [Clang][Sema] Use correct TemplateName when transforming TemplateSpecializationType (PR #93411)

2024-05-26 Thread Qizhi Hu via cfe-commits
cxx17-error{{typename specifier refers 
to non-type member 'arg' in 'PR12884_original::A::B'}}
 };
   };
 
   template <> struct A::B {
 template  struct X {};
-static const int arg = 0;
+static const int arg = 0; // cxx17-note{{referenced member 'arg' is 
declared here}}
   };
 
-  A::C::x a;
+  A::C::x a; // cxx17-note{{in instantiation of member class 
'PR12884_original::A::C' requested here}}
 }
 namespace PR12884_half_fixed {
   template  struct A {

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [lldb] [clang][Modules] Move `ASTSourceDescriptor` into its own file (PR #67930)

2024-05-26 Thread via cfe-commits

https://github.com/cor3ntin approved this pull request.

LGTM

https://github.com/llvm/llvm-project/pull/67930
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[Lldb-commits] [clang] [lldb] [clang][Modules] Move `ASTSourceDescriptor` into its own file (PR #67930)

2024-05-26 Thread via lldb-commits

https://github.com/cor3ntin approved this pull request.

LGTM

https://github.com/llvm/llvm-project/pull/67930
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[clang] Remove dangling conversion to `optional &` (PR #93385)

2024-05-26 Thread via cfe-commits

https://github.com/cor3ntin approved this pull request.

LGTM.

https://github.com/llvm/llvm-project/pull/93385
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [analyzer] Adding taint analysis capability to unix.Malloc checker (PR #92420)

2024-05-26 Thread Balazs Benics via cfe-commits

steakhal wrote:

> I'll port this patch downstream to see how this would behave on the Juliet 
> C++ benchmark or on some real-world code.

Ah nvm. llvm/main diverged quite a bit since 18.1.6. I can't just pick this 
one. Given this, I won't backport and test this PR.

https://github.com/llvm/llvm-project/pull/92420
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


branch master updated: gnu: Add luarocks.

2024-05-26 Thread guix-commits
This is an automated email from the git hooks/post-receive script.

abcdw pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
 new dc8fb56724 gnu: Add luarocks.
dc8fb56724 is described below

commit dc8fb5672464b6386f6b4b94723f9b36edc4e625
Author: Timo Wilken 
AuthorDate: Fri Feb 24 23:46:13 2023 +0100

gnu: Add luarocks.

* gnu/packages/lua.scm (luarocks): Add variable.
* gnu/packages/lua.scm (make-luarocks): New function.
* gnu/packages/lua.scm (lua5.2-luarocks): New variable.

Co-authored-by: Andrew Tropin 

Signed-off-by: Andrew Tropin 

Change-Id: I7f14f43c85384917b2bd39bdedafb372558a1ab8
---
 gnu/packages/lua.scm | 123 ++-
 1 file changed, 122 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 7b17c0756b..62415f58f0 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2022 Leo Nikkilä 
 ;;; Copyright © 2023 Yovan Naumovski 
 ;;; Copyright © 2023 Valter Nazianzeno 
+;;; Copyright © 2023 Timo Wilken 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -48,12 +49,17 @@
   #:use-module (guix build-system meson)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
+  #:use-module (gnu packages curl)
   #:use-module (gnu packages build-tools)
   #:use-module (gnu packages gcc)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gperf)
+  #:use-module (gnu packages gnupg)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages libffi)
@@ -65,11 +71,15 @@
   #:use-module (gnu packages rdf)
   #:use-module (gnu packages re2c)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages rsync)
+  #:use-module (gnu packages ssh)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages vim)
+  #:use-module (gnu packages wget)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
-  #:use-module (srfi srfi-1))
+  #:use-module ((srfi srfi-1) #:hide (zip)))
 
 (define-public lua
   (package
@@ -1139,6 +1149,117 @@ signals to Linux processes.")
 shell command executions.")
 (license license:bsd-3)))
 
+(define-public (make-luarocks name lua)
+  (package
+(name name)
+(version "3.9.2")
+(home-page "https://luarocks.org/;)
+(source (origin
+  (method url-fetch)
+  (uri (string-append "https://luarocks.org/releases/luarocks-;
+  version ".tar.gz"))
+  (sha256
+   (base32
+"1nsfp7cwqcxa8vmkcqkgi5wc0iax0j3gbdfd183kw81cq3nf99mw"
+(build-system gnu-build-system)
+(arguments
+ `(#:tests? #f ;upstream has no tests
+   #:phases
+   (modify-phases %standard-phases
+ (add-before 'build 'patch-bin-sh
+   (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("GNUmakefile" "src/luarocks/fs/unix.lua"
+"src/luarocks/core/sysdetect.lua")
+   (("/bin/sh")
+(search-input-file inputs "/bin/sh")
+ (replace 'configure
+   (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+   (invoke "./configure"
+   (string-append "--prefix=" out)
+ (add-after 'install 'patch-unzip
+   (lambda* (#:key inputs outputs #:allow-other-keys)
+ (substitute*
+ (string-append
+  (assoc-ref outputs "out") "/etc/luarocks/config-"
+  ,(substring (package-version lua) 0 3) ".lua") ;e.g. "5.2"
+   (("variables = \\{")
+(string-append
+ "variables = {\n"
+ "   AR = \"" (search-input-file inputs "/bin/ar") "\";\n"
+ "   BUNZIP2 = \"" (search-input-file inputs "/bin/bunzip2") 
"\";\n"
+ "   CC = \"" (search-input-file inputs "/bin/gcc") "\";\n"
+ "   CHMOD = \"" (search-input-file inputs "/bin/chmod") 
"\";\n"
+ "   CP = \"" (search-input-file inputs "/bin/cp") "\";\n"
+ "   CURL = \"" (search-input-file inputs "/bin/curl") "\";\n"
+ "   FIND = \"" (search-input-file inputs "/bin/find") "\";\n"
+ "   GIT = \"" (search-input-file inputs "/bin/git") "\";\n"
+ "   GPG = \"" (search-input-file inputs "/bin/gpg") "\";\n"
+ "   GUNZIP = \"" (search-input-file inputs "/bin/gunzip") 
"\";\n"
+ "   HG = \"" (search-input-file inputs "/bin/hg") "\";\n"
+ " 

[clang] [analyzer] Adding taint analysis capability to unix.Malloc checker (PR #92420)

2024-05-26 Thread Balazs Benics via cfe-commits

https://github.com/steakhal commented:

The patch makes sense to me.
Have you considered applying the same heuristic to C++ array new allocations?

I'll port this patch downstream to see how this would behave on the Juliet C++ 
benchmark or on some real-world code.

https://github.com/llvm/llvm-project/pull/92420
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][analyzer] PutenvStackArrayChecker: No warning from 'main' (PR #93299)

2024-05-26 Thread Balazs Benics via cfe-commits

https://github.com/steakhal approved this pull request.

LGTM

https://github.com/llvm/llvm-project/pull/93299
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-05-26 Thread Balazs Benics via cfe-commits

https://github.com/steakhal edited 
https://github.com/llvm/llvm-project/pull/93408
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[jenkins-infra/account-app]

2024-05-26 Thread 'renovate[bot]' via Jenkins Commits
  Branch: refs/renovate/branches/renovate/org.assertj-assertj-core-3.x
  Home:   https://github.com/jenkins-infra/account-app

To unsubscribe from these emails, change your notification settings at 
https://github.com/jenkins-infra/account-app/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-commits/jenkins-infra/account-app/push/refs/renovate/branches/renovate/org.assertj-assertj-core-3.x/cba20c-00%40github.com.


[jenkins-infra/account-app] 178737: Update dependency org.assertj:assertj-core to v3.26.0

2024-05-26 Thread 'renovate[bot]' via Jenkins Commits
  Branch: refs/heads/renovate/org.assertj-assertj-core-3.x
  Home:   https://github.com/jenkins-infra/account-app
  Commit: 17873787f20ea3b27d38b906bac8f856b45a9d45
  
https://github.com/jenkins-infra/account-app/commit/17873787f20ea3b27d38b906bac8f856b45a9d45
  Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  Date:   2024-05-26 (Sun, 26 May 2024)

  Changed paths:
M build.gradle.kts

  Log Message:
  ---
  Update dependency org.assertj:assertj-core to v3.26.0



To unsubscribe from these emails, change your notification settings at 
https://github.com/jenkins-infra/account-app/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-commits/jenkins-infra/account-app/push/refs/heads/renovate/org.assertj-assertj-core-3.x/00-178737%40github.com.


[jenkins-infra/account-app] cba20c: Update dependency org.assertj:assertj-core to v3.26.0

2024-05-26 Thread 'renovate[bot]' via Jenkins Commits
  Branch: refs/renovate/branches/renovate/org.assertj-assertj-core-3.x
  Home:   https://github.com/jenkins-infra/account-app
  Commit: cba20cf6e4f5368b4468cc0f2bbef5be7891be5a
  
https://github.com/jenkins-infra/account-app/commit/cba20cf6e4f5368b4468cc0f2bbef5be7891be5a
  Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  Date:   2024-05-26 (Sun, 26 May 2024)

  Changed paths:
M build.gradle.kts

  Log Message:
  ---
  Update dependency org.assertj:assertj-core to v3.26.0



To unsubscribe from these emails, change your notification settings at 
https://github.com/jenkins-infra/account-app/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-commits/jenkins-infra/account-app/push/refs/renovate/branches/renovate/org.assertj-assertj-core-3.x/00-cba20c%40github.com.


[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions with no decl in source (PR #93394)

2024-05-26 Thread Timm Baeder via cfe-commits


@@ -5,7 +5,7 @@ void similar() { // expected-note {{'similar' declared here}}
   if constexpr (similer<>) {} // expected-error {{use of undeclared identifier 
'similer'; did you mean 'similar'?}}
 }
 void a() { if constexpr (__adl_swap<>) {}} // expected-error{{use of 
undeclared identifier '__adl_swap'; did you mean '__sync_swap'?}} \
-   // expected-note {{'__sync_swap' 
declared here}}
+   // not-expected-note 
{{'__sync_swap' declared here}}

tbaederr wrote:

I don't think the `not-` prefix actually does anything with `-verify`, does it?

https://github.com/llvm/llvm-project/pull/93394
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions with no decl in source (PR #93394)

2024-05-26 Thread Timm Baeder via cfe-commits

tbaederr wrote:

Would be nice if you could add new explicit tests for this.

https://github.com/llvm/llvm-project/pull/93394
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-05-26 Thread via cfe-commits
nj_}}
+  p = buffer[startIndex + 1];
+  clang_analyzer_isTainted(p); // expected-warning {{NO}}
+  clang_analyzer_dump(p); // expected-warning {{conj_}}
+  p = buffer[startIndex + 2];
+  clang_analyzer_isTainted(p); // expected-warning {{NO}}
+  clang_analyzer_dump(p); // expected-warning {{conj_}}
+  p = buffer[startIndex + 3];
+  clang_analyzer_isTainted(p); // expected-warning {{NO}}
+  clang_analyzer_dump(p); // expected-warning {{conj_}}
+  p = buffer[startIndex + 4];
+  clang_analyzer_isTainted(p); // expected-warning {{NO}}
+  clang_analyzer_dump(p); // expected-warning {{conj_}}
+  p = buffer[startIndex + 5];
+  clang_analyzer_isTainted(p); // expected-warning {{NO}}
+  clang_analyzer_dump(p); // expected-warning {{conj_}}
+  p = buffer[0];
+  clang_analyzer_isTainted(p); // expected-warning {{NO}}
+  clang_analyzer_dump(p); // expected-warning {{conj_}}
+} else {
+  long p = buffer[startIndex];
+  clang_analyzer_isTainted(p); // expected-warning {{NO}}
+  clang_analyzer_dump(p); // expected-warning {{conj_}}
+  p = buffer[0];
+  clang_analyzer_isTainted(p); // expected-warning {{NO}}
+  clang_analyzer_dump(p); // expected-warning {{conj_}}
+}
+fclose(fp);
+  }
+}
+
+struct S {
+  int a;
+  long b;
+};
+
+void comopund_write1() {
+  if (FILE *fp = fopen("/home/test", "rb+")) {
+S s; // s.a is not touched by fread.
+if (1 == fread(, sizeof(s.b), 1, fp)) {
+  long p = s.b;
+  clang_analyzer_isTainted(p); // expected-warning {{YES}}
+  clang_analyzer_dump(p); // expected-warning {{conj_}}
+} else {
+  long p = s.b;
+  clang_analyzer_isTainted(p); // expected-warning {{YES}}
+  clang_analyzer_dump(p); // expected-warning {{conj_}}
+}
+fclose(fp);
+  }
+}
+
+void comopund_write2() {
+  if (FILE *fp = fopen("/home/test", "rb+")) {
+S s; // s.a is not touched by fread.
+if (1 == fread(, sizeof(s.b), 1, fp)) {
+  long p = s.a; // FIXME: This should raise an uninitialized read.
+  clang_analyzer_isTainted(p); // expected-warning {{NO}} FIXME: This 
should be YES.
+  clang_analyzer_dump(p); // expected-warning {{conj_}}
+} else {
+  long p = s.a; // FIXME: This should raise an uninitialized read.
+  clang_analyzer_isTainted(p); // expected-warning {{NO}} FIXME: This 
should be YES.
+  clang_analyzer_dump(p); // expected-warning {{conj_}}
+}
+fclose(fp);
+  }
+}
+
+void var_write() {
+  if (FILE *fp = fopen("/home/test", "rb+")) {
+int a, b; // 'a' is not touched by fread.
+if (1 == fread(, sizeof(b), 1, fp)) {
+  long p = a; // expected-warning{{Assigned value is garbage or undefined}}
+} else {
+  long p = a; // expected-warning{{Assigned value is garbage or undefined}}
+}
+fclose(fp);
+  }
+}
+
+// When reading a lot of data, invalidating all elements is too time-consuming.
+// Instead, the knowledge of the whole array is lost.
+#define MaxInvalidatedElementRegion 64 // See StreamChecker::evalFreadFwrite 
in StreamChecker.cpp.
+#define PastMaxComplexity MaxInvalidatedElementRegion + 1
+void test_large_read() {
+  int buffer[PastMaxComplexity + 1];
+  buffer[PastMaxComplexity] = 42;
+  if (FILE *fp = fopen("/home/test", "rb+")) {
+if (buffer[PastMaxComplexity] != 42) {
+  clang_analyzer_warnIfReached(); // Unreachable.
+}
+if (1 == fread(buffer, sizeof(int), PastMaxComplexity, fp)) {
+  if (buffer[PastMaxComplexity] != 42) {
+clang_analyzer_warnIfReached(); // expected-warning{{REACHABLE}}
+  }
+}
+fclose(fp);
+  }
+}
+
+void test_small_read() {
+  int buffer[10];
+  buffer[5] = 42;
+  if (FILE *fp = fopen("/home/test", "rb+")) {
+clang_analyzer_dump(buffer[5]); // expected-warning{{42 S32b}}
+if (1 == fread(buffer, sizeof(int), 5, fp)) {
+  clang_analyzer_dump(buffer[5]); // expected-warning{{42 S32b}}
+}
+fclose(fp);
+  }
+}

``




https://github.com/llvm/llvm-project/pull/93408
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-05-26 Thread Balazs Benics via cfe-commits
f data, invalidating all elements is too time-consuming.
+// Instead, the knowledge of the whole array is lost.
+#define MaxInvalidatedElementRegion 64 // See StreamChecker::evalFreadFwrite 
in StreamChecker.cpp.
+#define PastMaxComplexity MaxInvalidatedElementRegion + 1
+void test_large_read() {
+  int buffer[PastMaxComplexity + 1];
+  buffer[PastMaxComplexity] = 42;
+  if (FILE *fp = fopen("/home/test", "rb+")) {
+if (buffer[PastMaxComplexity] != 42) {
+  clang_analyzer_warnIfReached(); // Unreachable.
+}
+if (1 == fread(buffer, sizeof(int), PastMaxComplexity, fp)) {
+  if (buffer[PastMaxComplexity] != 42) {
+clang_analyzer_warnIfReached(); // expected-warning{{REACHABLE}}
+  }
+}
+fclose(fp);
+  }
+}
+
+void test_small_read() {
+  int buffer[10];
+  buffer[5] = 42;
+  if (FILE *fp = fopen("/home/test", "rb+")) {
+clang_analyzer_dump(buffer[5]); // expected-warning{{42 S32b}}
+if (1 == fread(buffer, sizeof(int), 5, fp)) {
+  clang_analyzer_dump(buffer[5]); // expected-warning{{42 S32b}}
+}
+fclose(fp);
+  }
+}

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix the warning in RefCntblBaseVirtualDtorChecker.cpp:61 (PR #93403)

2024-05-26 Thread NAKAMURA Takumi via cfe-commits

https://github.com/chapuni approved this pull request.

Thanks!

https://github.com/llvm/llvm-project/pull/93403
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions with no decl in source (PR #93394)

2024-05-26 Thread Youngsuk Kim via cfe-commits

https://github.com/JOE1994 updated 
https://github.com/llvm/llvm-project/pull/93394

>From 00c93043fca8f8a1f20634ea1b281c60926bd571 Mon Sep 17 00:00:00 2001
From: Youngsuk Kim 
Date: Sat, 25 May 2024 20:42:43 -0500
Subject: [PATCH 1/2] [clang][Sema] Don't emit 'declared here' note for builtin
 functions with no decl in source

Fixes #93369
---
 clang/lib/Sema/SemaLookup.cpp   | 10 ++
 clang/test/SemaCXX/invalid-if-constexpr.cpp |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index ef0a655b631ab..348f9e5b8f530 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/lib/Sema/SemaLookup.cpp
@@ -5897,6 +5897,16 @@ void Sema::diagnoseTypo(const TypoCorrection ,
 
   NamedDecl *ChosenDecl =
   Correction.isKeyword() ? nullptr : Correction.getFoundDecl();
+
+  // For builtin functions which aren't declared anywhere in source,
+  // don't emit the "declared here" note.
+  if (auto *FD = dyn_cast_or_null(ChosenDecl);
+  FD && FD->getBuiltinID() &&
+  PrevNote.getDiagID() == diag::note_previous_decl &&
+  Correction.getCorrectionRange().getBegin() == FD->getBeginLoc()) {
+ChosenDecl = nullptr;
+  }
+
   if (PrevNote.getDiagID() && ChosenDecl)
 Diag(ChosenDecl->getLocation(), PrevNote)
   << CorrectedQuotedStr << (ErrorRecovery ? FixItHint() : FixTypo);
diff --git a/clang/test/SemaCXX/invalid-if-constexpr.cpp 
b/clang/test/SemaCXX/invalid-if-constexpr.cpp
index 7643c47488f05..16d422880e8a9 100644
--- a/clang/test/SemaCXX/invalid-if-constexpr.cpp
+++ b/clang/test/SemaCXX/invalid-if-constexpr.cpp
@@ -5,7 +5,7 @@ void similar() { // expected-note {{'similar' declared here}}
   if constexpr (similer<>) {} // expected-error {{use of undeclared identifier 
'similer'; did you mean 'similar'?}}
 }
 void a() { if constexpr (__adl_swap<>) {}} // expected-error{{use of 
undeclared identifier '__adl_swap'; did you mean '__sync_swap'?}} \
-   // expected-note {{'__sync_swap' 
declared here}}
+   // not-expected-note 
{{'__sync_swap' declared here}}
 
 int AA() { return true;} // expected-note {{'AA' declared here}}
 

>From 42bbff26459b71e9d77c4d907703930e12db8958 Mon Sep 17 00:00:00 2001
From: Youngsuk Kim 
Date: Sun, 26 May 2024 05:53:03 -0400
Subject: [PATCH 2/2] Use dyn_cast_if_present

Co-authored-by: Timm Baeder 
---
 clang/lib/Sema/SemaLookup.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index 348f9e5b8f530..be6ea20a956a3 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/lib/Sema/SemaLookup.cpp
@@ -5900,7 +5900,7 @@ void Sema::diagnoseTypo(const TypoCorrection ,
 
   // For builtin functions which aren't declared anywhere in source,
   // don't emit the "declared here" note.
-  if (auto *FD = dyn_cast_or_null(ChosenDecl);
+  if (const auto *FD = dyn_cast_if_present(ChosenDecl);
   FD && FD->getBuiltinID() &&
   PrevNote.getDiagID() == diag::note_previous_decl &&
   Correction.getCorrectionRange().getBegin() == FD->getBeginLoc()) {

_______
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[jenkinsci/claim-plugin] 98c19c: Bump org.jenkins-ci.plugins:plugin from 4.71 to 4.82

2024-05-26 Thread 'dependabot[bot]' via Jenkins Commits
  Branch: refs/heads/dependabot/maven/org.jenkins-ci.plugins-plugin-4.82
  Home:   https://github.com/jenkinsci/claim-plugin
  Commit: 98c19ce87203edc680f3fa7bfa3f39c4e145
  
https://github.com/jenkinsci/claim-plugin/commit/98c19ce87203edc680f3fa7bfa3f39c4e145
  Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  Date:   2024-05-26 (Sun, 26 May 2024)

  Changed paths:
M pom.xml

  Log Message:
  ---
  Bump org.jenkins-ci.plugins:plugin from 4.71 to 4.82

Bumps [org.jenkins-ci.plugins:plugin](https://github.com/jenkinsci/plugin-pom) 
from 4.71 to 4.82.
- [Release notes](https://github.com/jenkinsci/plugin-pom/releases)
- [Changelog](https://github.com/jenkinsci/plugin-pom/blob/master/CHANGELOG.md)
- 
[Commits](https://github.com/jenkinsci/plugin-pom/compare/plugin-4.71...plugin-4.82)

---
updated-dependencies:
- dependency-name: org.jenkins-ci.plugins:plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] 



To unsubscribe from these emails, change your notification settings at 
https://github.com/jenkinsci/claim-plugin/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-commits/jenkinsci/claim-plugin/push/refs/heads/dependabot/maven/org.jenkins-ci.plugins-plugin-4.82/00-98c19c%40github.com.


[jenkinsci/claim-plugin] 2f576a: Bump requirement to 2.426.3

2024-05-26 Thread 'Arnaud TAMAILLON' via Jenkins Commits
  Branch: 
refs/heads/dependabot/maven/io.jenkins.plugins-font-awesome-api-6.5.2-1
  Home:   https://github.com/jenkinsci/claim-plugin
  Commit: 2f576a730cf209628cb3d4b87d921e1cdadb63e1
  
https://github.com/jenkinsci/claim-plugin/commit/2f576a730cf209628cb3d4b87d921e1cdadb63e1
  Author: Greybird 
  Date:   2024-05-26 (Sun, 26 May 2024)

  Changed paths:
M Jenkinsfile
M pom.xml

  Log Message:
  ---
  Bump requirement to 2.426.3



To unsubscribe from these emails, change your notification settings at 
https://github.com/jenkinsci/claim-plugin/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-commits/jenkinsci/claim-plugin/push/refs/heads/dependabot/maven/io.jenkins.plugins-font-awesome-api-6.5.2-1/5cdca9-2f576a%40github.com.


03/03: gnu: fasd: Update to 1.0.2.

2024-05-26 Thread guix-commits
cbaines pushed a commit to branch master
in repository guix.

commit e51d98d8e91e12f3f2d5907819a957564c531e25
Author: Artyom V. Poptsov 
AuthorDate: Sat May 25 10:15:23 2024 +0300

gnu: fasd: Update to 1.0.2.

* gnu/packages/admin.scm (fasd): Update to 1.0.2.
[source]: Use project fork that integrates recent pull requests as the
original project is unmaintained and archived.
[home-page]: Update.
[description]: Improve formatting.
[license]: Change to expat (MIT) license as "LICENSE" file of the project
contains MIT license.

Change-Id: I0070c394a9a8b80ac137728831c0eb7a0e15e2b4
Signed-off-by: Christopher Baines 
---
 gnu/packages/admin.scm | 21 +++--
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 0a3c074dc2..bae9ee1308 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -65,6 +65,7 @@
 ;;; Copyright © 2023 Nicolas Graves 
 ;;; Copyright © 2023 Tomás Ortín Fernández 
 ;;; Copyright © 2024 dan 
+;;; Copyright © 2024 Artyom V. Poptsov 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3234,31 +3235,31 @@ frequently used directories by typing only a small 
pattern.")
 (define-public fasd
   (package
 (name "fasd")
-(version "1.0.1")
+(version "1.0.2")
 (source (origin
   (method git-fetch)
   (uri (git-reference
-(url "https://github.com/clvv/fasd;)
+(url "https://github.com/whjvenyl/fasd;)
 (commit version)))
   (file-name (git-file-name name version))
   (sha256
(base32
-"1awi71jdv3mhjrmar2d4z1i90kn7apd7aq1w31sh6w4yibz9kiyj"
+"0q72a54dcahc9pan5qkmnsvpqiqgjjxwdxzzm8pxzylpr329jjyh"
 (build-system gnu-build-system)
 (arguments
  `(#:phases (modify-phases %standard-phases
   (delete 'configure))  ;no configuration
#:tests? #f  ;no tests
#:make-flags (list (string-append "PREFIX=" %output
-(home-page "https://github.com/clvv/fasd;)
+(home-page "https://github.com/whjvenyl/fasd;)
 (synopsis "Quick access to files and directories for shells")
 (description
- "Fasd (pronounced similar to \"fast\") is a command-line productivity
-booster.  Fasd offers quick access to files and directories for POSIX shells.
-It is inspired by tools like autojump, z, and v.  Fasd keeps track of files
-and directories you have accessed so that you can quickly reference them in
-the command line.")
-(license license:x11)))
+ "Fasd (pronounced similar to \"fast\") is a command-line productivity 
booster.
+Fasd offers quick access to files and directories for POSIX shells.  It is 
inspired
+by tools like @code{autojump}, @code{z}, and @code{v}.  Fasd keeps track of 
files and
+directories you have accessed so that you can quickly reference them in the 
command
+line.")
+(license license:expat)))
 
 (define-public iftop
   (package



01/03: gnu: python-scikit-image: Disable test_ellipse_parameter_stability.

2024-05-26 Thread guix-commits
cbaines pushed a commit to branch master
in repository guix.

commit a4a45669c76f80d5126add818df22f42547bb4a2
Author: Christopher Baines 
AuthorDate: Fri May 17 09:00:52 2024 +0100

gnu: python-scikit-image: Disable test_ellipse_parameter_stability.

As it's flaky, see https://github.com/scikit-image/scikit-image/issues/7061

* gnu/packages/python-science.scm (python-scikit-image)[arguments]: Add
 #:test-flags.

Change-Id: Ic1fc301eb0fad5330c34780ce096c446c1076824
---
 gnu/packages/python-science.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index ea2b8236d5..2650ac46d6 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -473,6 +473,8 @@ logic, also known as grey logic.")
 (build-system pyproject-build-system)
 (arguments
  (list
+  ;; Disable flaky test
+  #:test-flags #~(list "-k" "not test_ellipse_parameter_stability")
   #:phases
   #~(modify-phases %standard-phases
   (add-before 'build 'change-home-dir



branch master updated (77771036f0 -> e51d98d8e9)

2024-05-26 Thread guix-commits
cbaines pushed a change to branch master
in repository guix.

from 1036f0 configure.ac: Set default value for the 'prefix' variable.
 new a4a45669c7 gnu: python-scikit-image: Disable 
test_ellipse_parameter_stability.
 new 13d5e6f84a gnu: xpra: Update to 6.0.1.
 new e51d98d8e9 gnu: fasd: Update to 1.0.2.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 gnu/packages/admin.scm  | 21 +++--
 gnu/packages/python-science.scm |  2 ++
 gnu/packages/xorg.scm   | 12 +++-
 3 files changed, 20 insertions(+), 15 deletions(-)



02/03: gnu: xpra: Update to 6.0.1.

2024-05-26 Thread guix-commits
cbaines pushed a commit to branch master
in repository guix.

commit 13d5e6f84a5a3130b628bc37377db562fc69b057
Author: Andy Tai 
AuthorDate: Fri May 24 22:44:43 2024 -0700

gnu: xpra: Update to 6.0.1.

* gnu/packages/xorg.scm (xpra): Update to 6.0.1.

Change-Id: Iddd33aa57f1959c753df892c9b26df48e85b16ad
Signed-off-by: Christopher Baines 
---
 gnu/packages/xorg.scm | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 1f1fe4d7c6..c13a1f4215 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -6158,14 +6158,16 @@ basic eye-candy effects.")
 (define-public xpra
   (package
 (name "xpra")
-(version "6.0")
+(version "6.0.1")
 (source
  (origin
-   (method url-fetch)
-   (uri (string-append "https://www.xpra.org/src/xpra-;
-   version ".tar.xz"))
+   (method git-fetch)
+   (uri (git-reference
+   (url "https://github.com/Xpra-org/xpra.git;)
+   (commit (string-append "v" version
+   (file-name (git-file-name name version))
(sha256
-(base32 "1dh89k2whvim4lgnryr9hisdq2zzcc5md9c3vm49y6jsp4j77glq"))
+(base32 "0l92zscy1kjb0bpsdd8r2mchv2gks0krz6dj34s65c34zwa1rwg6"))
(patches (search-patches "xpra-6.0-systemd-run.patch"
 "xpra-6.0-install_libs.patch"
 (build-system python-build-system)



[clang] d0bb917 - [clang][Interp] Handle ObjCBoxedExprs

2024-05-26 Thread Timm Bäder via cfe-commits

Author: Timm Bäder
Date: 2024-05-26T10:50:45+02:00
New Revision: d0bb91739022e1f15b1ec9a6fd7fc92cd0f95444

URL: 
https://github.com/llvm/llvm-project/commit/d0bb91739022e1f15b1ec9a6fd7fc92cd0f95444
DIFF: 
https://github.com/llvm/llvm-project/commit/d0bb91739022e1f15b1ec9a6fd7fc92cd0f95444.diff

LOG: [clang][Interp] Handle ObjCBoxedExprs

Added: 


Modified: 
clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/lib/AST/Interp/ByteCodeExprGen.h
clang/test/AST/Interp/objc.mm

Removed: 




diff  --git a/clang/lib/AST/Interp/ByteCodeExprGen.cpp 
b/clang/lib/AST/Interp/ByteCodeExprGen.cpp
index f00421d0c2ea9..7aa2105942ecb 100644
--- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp
+++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp
@@ -2649,6 +2649,14 @@ bool ByteCodeExprGen::VisitShuffleVectorExpr(
   return true;
 }
 
+template 
+bool ByteCodeExprGen::VisitObjCBoxedExpr(const ObjCBoxedExpr *E) {
+  if (!E->isExpressibleAsConstantInitializer())
+return this->emitInvalid(E);
+
+  return this->delegate(E->getSubExpr());
+}
+
 template  bool ByteCodeExprGen::discard(const Expr *E) 
{
   OptionScope Scope(this, /*NewDiscardResult=*/true,
  /*NewInitializing=*/false);

diff  --git a/clang/lib/AST/Interp/ByteCodeExprGen.h 
b/clang/lib/AST/Interp/ByteCodeExprGen.h
index c648b0e4be704..44c495240289f 100644
--- a/clang/lib/AST/Interp/ByteCodeExprGen.h
+++ b/clang/lib/AST/Interp/ByteCodeExprGen.h
@@ -127,6 +127,7 @@ class ByteCodeExprGen : public 
ConstStmtVisitor, bool>,
   bool VisitAddrLabelExpr(const AddrLabelExpr *E);
   bool VisitConvertVectorExpr(const ConvertVectorExpr *E);
   bool VisitShuffleVectorExpr(const ShuffleVectorExpr *E);
+  bool VisitObjCBoxedExpr(const ObjCBoxedExpr *E);
 
 protected:
   bool visitExpr(const Expr *E) override;

diff  --git a/clang/test/AST/Interp/objc.mm b/clang/test/AST/Interp/objc.mm
index e48fa3c0ac709..6402c8ae098fd 100644
--- a/clang/test/AST/Interp/objc.mm
+++ b/clang/test/AST/Interp/objc.mm
@@ -10,3 +10,4 @@ @interface A {
 @interface NSString
 @end
 constexpr NSString *t0 = @"abc";
+constexpr NSString *t1 = @("abc");



_______
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] 5220b7b - [clang][Interp] Handle objc strings

2024-05-26 Thread Timm Bäder via cfe-commits

Author: Timm Bäder
Date: 2024-05-26T10:50:44+02:00
New Revision: 5220b7bea8b01f46e9f7326b9c9a7e550e8451d1

URL: 
https://github.com/llvm/llvm-project/commit/5220b7bea8b01f46e9f7326b9c9a7e550e8451d1
DIFF: 
https://github.com/llvm/llvm-project/commit/5220b7bea8b01f46e9f7326b9c9a7e550e8451d1.diff

LOG: [clang][Interp] Handle objc strings

Added: 


Modified: 
clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/lib/AST/Interp/ByteCodeExprGen.h
clang/lib/AST/Interp/Context.cpp
clang/test/AST/Interp/objc.mm

Removed: 




diff  --git a/clang/lib/AST/Interp/ByteCodeExprGen.cpp 
b/clang/lib/AST/Interp/ByteCodeExprGen.cpp
index 6607727b5246f..f00421d0c2ea9 100644
--- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp
+++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp
@@ -1637,6 +1637,12 @@ bool ByteCodeExprGen::VisitStringLiteral(const 
StringLiteral *E) {
   return true;
 }
 
+template 
+bool ByteCodeExprGen::VisitObjCStringLiteral(
+const ObjCStringLiteral *E) {
+  return this->delegate(E->getString());
+}
+
 template 
 bool ByteCodeExprGen::VisitSYCLUniqueStableNameExpr(
 const SYCLUniqueStableNameExpr *E) {

diff  --git a/clang/lib/AST/Interp/ByteCodeExprGen.h 
b/clang/lib/AST/Interp/ByteCodeExprGen.h
index a2e283c866332..c648b0e4be704 100644
--- a/clang/lib/AST/Interp/ByteCodeExprGen.h
+++ b/clang/lib/AST/Interp/ByteCodeExprGen.h
@@ -90,6 +90,7 @@ class ByteCodeExprGen : public 
ConstStmtVisitor, bool>,
   bool VisitOpaqueValueExpr(const OpaqueValueExpr *E);
   bool VisitAbstractConditionalOperator(const AbstractConditionalOperator *E);
   bool VisitStringLiteral(const StringLiteral *E);
+  bool VisitObjCStringLiteral(const ObjCStringLiteral *E);
   bool VisitSYCLUniqueStableNameExpr(const SYCLUniqueStableNameExpr *E);
   bool VisitCharacterLiteral(const CharacterLiteral *E);
   bool VisitCompoundAssignOperator(const CompoundAssignOperator *E);

diff  --git a/clang/lib/AST/Interp/Context.cpp 
b/clang/lib/AST/Interp/Context.cpp
index d51a57e5e92ea..4ecfa0f9bfd75 100644
--- a/clang/lib/AST/Interp/Context.cpp
+++ b/clang/lib/AST/Interp/Context.cpp
@@ -164,7 +164,8 @@ std::optional Context::classify(QualType T) const 
{
   T->isFunctionType() || 
T->isSpecificBuiltinType(BuiltinType::BoundMember))
 return PT_FnPtr;
 
-  if (T->isReferenceType() || T->isPointerType())
+  if (T->isReferenceType() || T->isPointerType() ||
+  T->isObjCObjectPointerType())
 return PT_Ptr;
 
   if (const auto *AT = T->getAs())

diff  --git a/clang/test/AST/Interp/objc.mm b/clang/test/AST/Interp/objc.mm
index 44b74d193b66a..e48fa3c0ac709 100644
--- a/clang/test/AST/Interp/objc.mm
+++ b/clang/test/AST/Interp/objc.mm
@@ -6,3 +6,7 @@ @interface A {
   static_assert(a, ""); // both-error {{static assertion expression is not an 
integral constant expression}}
 }
 @end
+
+@interface NSString
+@end
+constexpr NSString *t0 = @"abc";



_______
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[jenkinsci/claim-plugin] 5cdca9: Bump io.jenkins.plugins:font-awesome-api from 6.4....

2024-05-26 Thread 'dependabot[bot]' via Jenkins Commits
  Branch: 
refs/heads/dependabot/maven/io.jenkins.plugins-font-awesome-api-6.5.2-1
  Home:   https://github.com/jenkinsci/claim-plugin
  Commit: 5cdca90f4345d587ff7f623c55d77913c12fb471
  
https://github.com/jenkinsci/claim-plugin/commit/5cdca90f4345d587ff7f623c55d77913c12fb471
  Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  Date:   2024-05-26 (Sun, 26 May 2024)

  Changed paths:
M pom.xml

  Log Message:
  ---
  Bump io.jenkins.plugins:font-awesome-api from 6.4.0-2 to 6.5.2-1

Bumps 
[io.jenkins.plugins:font-awesome-api](https://github.com/jenkinsci/font-awesome-api-plugin)
 from 6.4.0-2 to 6.5.2-1.
- [Release notes](https://github.com/jenkinsci/font-awesome-api-plugin/releases)
- 
[Changelog](https://github.com/jenkinsci/font-awesome-api-plugin/blob/main/CHANGELOG.md)
- 
[Commits](https://github.com/jenkinsci/font-awesome-api-plugin/compare/v6.4.0-2...v6.5.2-1)

---
updated-dependencies:
- dependency-name: io.jenkins.plugins:font-awesome-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] 



To unsubscribe from these emails, change your notification settings at 
https://github.com/jenkinsci/claim-plugin/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-commits/jenkinsci/claim-plugin/push/refs/heads/dependabot/maven/io.jenkins.plugins-font-awesome-api-6.5.2-1/00-5cdca9%40github.com.


[jenkinsci/claim-plugin] a5b4fb: Bump org.apache.maven.plugins:maven-checkstyle-plu...

2024-05-26 Thread 'dependabot[bot]' via Jenkins Commits
  Branch: refs/heads/master
  Home:   https://github.com/jenkinsci/claim-plugin
  Commit: a5b4fbb99279dfa3518d709dbffbf21a938e8a87
  
https://github.com/jenkinsci/claim-plugin/commit/a5b4fbb99279dfa3518d709dbffbf21a938e8a87
  Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  Date:   2024-05-26 (Sun, 26 May 2024)

  Changed paths:
M pom.xml

  Log Message:
  ---
  Bump org.apache.maven.plugins:maven-checkstyle-plugin (#277)

Bumps 
[org.apache.maven.plugins:maven-checkstyle-plugin](https://github.com/apache/maven-checkstyle-plugin)
 from 3.3.0 to 3.3.1.
- 
[Commits](https://github.com/apache/maven-checkstyle-plugin/compare/maven-checkstyle-plugin-3.3.0...maven-checkstyle-plugin-3.3.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-checkstyle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] 
Co-authored-by: dependabot[bot] 
<49699333+dependabot[bot]@users.noreply.github.com>



To unsubscribe from these emails, change your notification settings at 
https://github.com/jenkinsci/claim-plugin/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-commits/jenkinsci/claim-plugin/push/refs/heads/master/a12524-a5b4fb%40github.com.


[jenkinsci/claim-plugin] df4786: Bump org.apache.maven.plugins:maven-checkstyle-plugin

2024-05-26 Thread 'dependabot[bot]' via Jenkins Commits
  Branch: 
refs/heads/dependabot/maven/org.apache.maven.plugins-maven-checkstyle-plugin-3.3.1
  Home:   https://github.com/jenkinsci/claim-plugin
  Commit: df4786a8f6d7ab7320387326c71fddb2ed9d3df7
  
https://github.com/jenkinsci/claim-plugin/commit/df4786a8f6d7ab7320387326c71fddb2ed9d3df7
  Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  Date:   2024-05-26 (Sun, 26 May 2024)

  Changed paths:
M pom.xml

  Log Message:
  ---
  Bump org.apache.maven.plugins:maven-checkstyle-plugin

Bumps 
[org.apache.maven.plugins:maven-checkstyle-plugin](https://github.com/apache/maven-checkstyle-plugin)
 from 3.3.0 to 3.3.1.
- 
[Commits](https://github.com/apache/maven-checkstyle-plugin/compare/maven-checkstyle-plugin-3.3.0...maven-checkstyle-plugin-3.3.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-checkstyle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] 



To unsubscribe from these emails, change your notification settings at 
https://github.com/jenkinsci/claim-plugin/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-commits/jenkinsci/claim-plugin/push/refs/heads/dependabot/maven/org.apache.maven.plugins-maven-checkstyle-plugin-3.3.1/8858ac-df4786%40github.com.


[jenkinsci/claim-plugin] a12524: Bump com.sonyericsson.jenkins.plugins.bfa:build-fa...

2024-05-26 Thread 'dependabot[bot]' via Jenkins Commits
  Branch: refs/heads/master
  Home:   https://github.com/jenkinsci/claim-plugin
  Commit: a12524f1b7efcc81e1a6d236603237b1eda7ec96
  
https://github.com/jenkinsci/claim-plugin/commit/a12524f1b7efcc81e1a6d236603237b1eda7ec96
  Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  Date:   2024-05-26 (Sun, 26 May 2024)

  Changed paths:
M pom.xml

  Log Message:
  ---
  Bump com.sonyericsson.jenkins.plugins.bfa:build-failure-analyzer (#267)

Bumps 
[com.sonyericsson.jenkins.plugins.bfa:build-failure-analyzer](https://github.com/jenkinsci/build-failure-analyzer-plugin)
 from 2.4.1 to 2.4.2.
- [Release 
notes](https://github.com/jenkinsci/build-failure-analyzer-plugin/releases)
- 
[Changelog](https://github.com/jenkinsci/build-failure-analyzer-plugin/blob/master/docs/old-changelog.md)
- 
[Commits](https://github.com/jenkinsci/build-failure-analyzer-plugin/compare/build-failure-analyzer-2.4.1...build-failure-analyzer-2.4.2)

---
updated-dependencies:
- dependency-name: com.sonyericsson.jenkins.plugins.bfa:build-failure-analyzer
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] 
Co-authored-by: dependabot[bot] 
<49699333+dependabot[bot]@users.noreply.github.com>



To unsubscribe from these emails, change your notification settings at 
https://github.com/jenkinsci/claim-plugin/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-commits/jenkinsci/claim-plugin/push/refs/heads/master/0061de-a12524%40github.com.


[clang] [clang][driver] add pointer qualifier to auto type (PR #91874)

2024-05-26 Thread Mohammed Keyvanzadeh via cfe-commits

VoltrexKeyva wrote:

Pinging again after another week of no reviews.

https://github.com/llvm/llvm-project/pull/91874
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][CodeComplete] Recurse into the subexpression of deref operator in getApproximateType (PR #93404)

2024-05-26 Thread via cfe-commits

llvmbot wrote:




@llvm/pr-subscribers-clang-tools-extra

Author: Younan Zhang (zyn0217)


Changes

The issue with the previous implementation bc31be7 was that getApproximateType 
could potentially return a null QualType for a dereferencing operator, which is 
not what its caller wants.

---
Full diff: https://github.com/llvm/llvm-project/pull/93404.diff


2 Files Affected:

- (modified) clang/lib/Sema/SemaCodeComplete.cpp (+10-2) 
- (modified) clang/test/CodeCompletion/member-access.cpp (+16) 


``diff
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp 
b/clang/lib/Sema/SemaCodeComplete.cpp
index 328641ed94881..73ed99e099869 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/lib/Sema/SemaCodeComplete.cpp
@@ -5680,8 +5680,16 @@ QualType getApproximateType(const Expr *E) {
 }
   }
   if (const auto *UO = llvm::dyn_cast(E)) {
-if (UO->getOpcode() == UnaryOperatorKind::UO_Deref)
-  return UO->getSubExpr()->getType()->getPointeeType();
+if (UO->getOpcode() == UnaryOperatorKind::UO_Deref) {
+  // We recurse into the subexpression because it could be of dependent
+  // type.
+  QualType SubType = getApproximateType(UO->getSubExpr());
+  if (auto Pointee = SubType->getPointeeType(); !Pointee.isNull())
+return Pointee;
+  // Our caller expects a non-null result, even though the SubType is
+  // supposed to have a pointee.
+  return SubType;
+}
   }
   return Unresolved;
 }
diff --git a/clang/test/CodeCompletion/member-access.cpp 
b/clang/test/CodeCompletion/member-access.cpp
index 9f8c21c0bca6d..912f269db6c1a 100644
--- a/clang/test/CodeCompletion/member-access.cpp
+++ b/clang/test/CodeCompletion/member-access.cpp
@@ -367,4 +367,20 @@ class A {
 // CHECK-DEREF-THIS: [#void#]function()
   }
 };
+
+template 
+struct RepeatedField {
+  void Add();
+};
+
+template 
+RepeatedField* MutableRepeatedField() {}
+
+template 
+void Foo() {
+  auto& C = *MutableRepeatedField();
+  C.
+}
+// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:382:5 %s -o - | 
FileCheck -check-prefix=CHECK-DEREF-DEPENDENT %s
+// CHECK-DEREF-DEPENDENT: [#void#]Add()
 }

``




https://github.com/llvm/llvm-project/pull/93404
_______
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][CodeComplete] Recurse into the subexpression of deref operator in getApproximateType (PR #93404)

2024-05-26 Thread Younan Zhang via cfe-commits

https://github.com/zyn0217 created 
https://github.com/llvm/llvm-project/pull/93404

The issue with the previous implementation bc31be7 was that getApproximateType 
could potentially return a null QualType for a dereferencing operator, which is 
not what its caller wants.

>From 7639cb738dfb876c7abdf7337fad3aa80e912736 Mon Sep 17 00:00:00 2001
From: Younan Zhang 
Date: Sun, 26 May 2024 15:52:31 +0800
Subject: [PATCH] [clang][CodeComplete] Recurse into the subexpression of deref
 operator in getApproximateType

The issue with the previous implementation bc31be7 was that
getApproximateType could potentially return a null QualType for a
dereferencing operator, which is not what its caller wants.
---
 clang/lib/Sema/SemaCodeComplete.cpp | 12 ++--
 clang/test/CodeCompletion/member-access.cpp | 16 
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/clang/lib/Sema/SemaCodeComplete.cpp 
b/clang/lib/Sema/SemaCodeComplete.cpp
index 328641ed94881..73ed99e099869 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/lib/Sema/SemaCodeComplete.cpp
@@ -5680,8 +5680,16 @@ QualType getApproximateType(const Expr *E) {
 }
   }
   if (const auto *UO = llvm::dyn_cast(E)) {
-if (UO->getOpcode() == UnaryOperatorKind::UO_Deref)
-  return UO->getSubExpr()->getType()->getPointeeType();
+if (UO->getOpcode() == UnaryOperatorKind::UO_Deref) {
+  // We recurse into the subexpression because it could be of dependent
+  // type.
+  QualType SubType = getApproximateType(UO->getSubExpr());
+  if (auto Pointee = SubType->getPointeeType(); !Pointee.isNull())
+return Pointee;
+  // Our caller expects a non-null result, even though the SubType is
+  // supposed to have a pointee.
+  return SubType;
+}
   }
   return Unresolved;
 }
diff --git a/clang/test/CodeCompletion/member-access.cpp 
b/clang/test/CodeCompletion/member-access.cpp
index 9f8c21c0bca6d..912f269db6c1a 100644
--- a/clang/test/CodeCompletion/member-access.cpp
+++ b/clang/test/CodeCompletion/member-access.cpp
@@ -367,4 +367,20 @@ class A {
 // CHECK-DEREF-THIS: [#void#]function()
   }
 };
+
+template 
+struct RepeatedField {
+  void Add();
+};
+
+template 
+RepeatedField* MutableRepeatedField() {}
+
+template 
+void Foo() {
+  auto& C = *MutableRepeatedField();
+  C.
+}
+// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:382:5 %s -o - | 
FileCheck -check-prefix=CHECK-DEREF-DEPENDENT %s
+// CHECK-DEREF-DEPENDENT: [#void#]Add()
 }

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix the warning in RefCntblBaseVirtualDtorChecker.cpp:61 (PR #93403)

2024-05-26 Thread via cfe-commits

llvmbot wrote:




@llvm/pr-subscribers-clang

Author: Ryosuke Niwa (rniwa)


Changes



---
Full diff: https://github.com/llvm/llvm-project/pull/93403.diff


1 Files Affected:

- (modified) 
clang/lib/StaticAnalyzer/Checkers/WebKit/RefCntblBaseVirtualDtorChecker.cpp 
(+1-1) 


``diff
diff --git 
a/clang/lib/StaticAnalyzer/Checkers/WebKit/RefCntblBaseVirtualDtorChecker.cpp 
b/clang/lib/StaticAnalyzer/Checkers/WebKit/RefCntblBaseVirtualDtorChecker.cpp
index 26879f2f87c8b..9df108e28ecdb 100644
--- 
a/clang/lib/StaticAnalyzer/Checkers/WebKit/RefCntblBaseVirtualDtorChecker.cpp
+++ 
b/clang/lib/StaticAnalyzer/Checkers/WebKit/RefCntblBaseVirtualDtorChecker.cpp
@@ -58,7 +58,7 @@ class DerefFuncDeleteExprVisitor
   std::optional HasSpecializedDelete(CXXMethodDecl *Decl) {
 if (auto *Body = Decl->getBody())
   return VisitBody(Body);
-if (auto *Tmpl = Decl->getTemplateInstantiationPattern())
+if (Decl->getTemplateInstantiationPattern())
   return std::nullopt; // Indeterminate. There was no concrete instance.
 return false;
   }

``




https://github.com/llvm/llvm-project/pull/93403
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix the warning in RefCntblBaseVirtualDtorChecker.cpp:61 (PR #93403)

2024-05-26 Thread via cfe-commits

llvmbot wrote:




@llvm/pr-subscribers-clang-static-analyzer-1

Author: Ryosuke Niwa (rniwa)


Changes



---
Full diff: https://github.com/llvm/llvm-project/pull/93403.diff


1 Files Affected:

- (modified) 
clang/lib/StaticAnalyzer/Checkers/WebKit/RefCntblBaseVirtualDtorChecker.cpp 
(+1-1) 


``diff
diff --git 
a/clang/lib/StaticAnalyzer/Checkers/WebKit/RefCntblBaseVirtualDtorChecker.cpp 
b/clang/lib/StaticAnalyzer/Checkers/WebKit/RefCntblBaseVirtualDtorChecker.cpp
index 26879f2f87c8b..9df108e28ecdb 100644
--- 
a/clang/lib/StaticAnalyzer/Checkers/WebKit/RefCntblBaseVirtualDtorChecker.cpp
+++ 
b/clang/lib/StaticAnalyzer/Checkers/WebKit/RefCntblBaseVirtualDtorChecker.cpp
@@ -58,7 +58,7 @@ class DerefFuncDeleteExprVisitor
   std::optional HasSpecializedDelete(CXXMethodDecl *Decl) {
 if (auto *Body = Decl->getBody())
   return VisitBody(Body);
-if (auto *Tmpl = Decl->getTemplateInstantiationPattern())
+if (Decl->getTemplateInstantiationPattern())
   return std::nullopt; // Indeterminate. There was no concrete instance.
 return false;
   }

``




https://github.com/llvm/llvm-project/pull/93403
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [webkit.RefCntblBaseVirtualDtor] Allow CRTP classes without a virtual destructor. (PR #92837)

2024-05-26 Thread Ryosuke Niwa via cfe-commits


@@ -11,16 +11,116 @@
 #include "PtrTypesSemantics.h"
 #include "clang/AST/CXXInheritance.h"
 #include "clang/AST/RecursiveASTVisitor.h"
+#include "clang/AST/StmtVisitor.h"
 #include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
 #include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h"
 #include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
 #include "clang/StaticAnalyzer/Core/Checker.h"
+#include "llvm/ADT/DenseSet.h"
+#include "llvm/ADT/SetVector.h"
 #include 
 
 using namespace clang;
 using namespace ento;
 
 namespace {
+
+class DerefFuncDeleteExprVisitor
+: public ConstStmtVisitor {
+  // Returns true if any of child statements return true.
+  bool VisitChildren(const Stmt *S) {
+for (const Stmt *Child : S->children()) {
+  if (Child && Visit(Child))
+return true;
+}
+return false;
+  }
+
+  bool VisitBody(const Stmt *Body) {
+if (!Body)
+  return false;
+
+auto [It, IsNew] = VisitedBody.insert(Body);
+if (!IsNew) // This body is recursive
+  return false;
+
+return Visit(Body);
+  }
+
+public:
+  DerefFuncDeleteExprVisitor(const TemplateArgumentList ,
+ const CXXRecordDecl *ClassDecl)
+  : ArgList(), ClassDecl(ClassDecl) {}
+
+  DerefFuncDeleteExprVisitor(const CXXRecordDecl *ClassDecl)
+  : ClassDecl(ClassDecl) {}
+
+  std::optional HasSpecializedDelete(CXXMethodDecl *Decl) {
+if (auto *Body = Decl->getBody())
+  return VisitBody(Body);
+if (auto *Tmpl = Decl->getTemplateInstantiationPattern())

rniwa wrote:

Here's a PR to fix it: https://github.com/llvm/llvm-project/pull/93403

https://github.com/llvm/llvm-project/pull/92837
_______
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix the warning in RefCntblBaseVirtualDtorChecker.cpp:61 (PR #93403)

2024-05-26 Thread Ryosuke Niwa via cfe-commits

https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/93403

None

>From 4f5b6ac39e709bddf7f1ced314ebb1984a1942de Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa 
Date: Sun, 26 May 2024 00:34:15 -0700
Subject: [PATCH] Fix the warning in RefCntblBaseVirtualDtorChecker.cpp:61

---
 .../Checkers/WebKit/RefCntblBaseVirtualDtorChecker.cpp  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/clang/lib/StaticAnalyzer/Checkers/WebKit/RefCntblBaseVirtualDtorChecker.cpp 
b/clang/lib/StaticAnalyzer/Checkers/WebKit/RefCntblBaseVirtualDtorChecker.cpp
index 26879f2f87c8b..9df108e28ecdb 100644
--- 
a/clang/lib/StaticAnalyzer/Checkers/WebKit/RefCntblBaseVirtualDtorChecker.cpp
+++ 
b/clang/lib/StaticAnalyzer/Checkers/WebKit/RefCntblBaseVirtualDtorChecker.cpp
@@ -58,7 +58,7 @@ class DerefFuncDeleteExprVisitor
   std::optional HasSpecializedDelete(CXXMethodDecl *Decl) {
 if (auto *Body = Decl->getBody())
   return VisitBody(Body);
-if (auto *Tmpl = Decl->getTemplateInstantiationPattern())
+if (Decl->getTemplateInstantiationPattern())
   return std::nullopt; // Indeterminate. There was no concrete instance.
 return false;
   }

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-format] Add LeftWithLastLine to AlignEscapedNewlines option (PR #93402)

2024-05-26 Thread via cfe-commits
Line = std::max(C.PreviousEndOfTokenColumn + 2, MaxEndOfLine);
-  } else {
-alignEscapedNewlines(StartOfMacro + 1, i, MaxEndOfLine);
-MaxEndOfLine = AlignLeft ? 0 : Style.ColumnLimit;
-StartOfMacro = i;
-  }
+if (C.NewlinesBefore == 0 && (!WithLastLine || C.Tok->isNot(tok::eof)))
+  continue;
+const bool InPPDirective = C.ContinuesPPDirective;
+const auto BackslashColumn = C.PreviousEndOfTokenColumn + 2;
+if (InPPDirective ||
+(WithLastLine && (MaxColumn == 0 || BackslashColumn <= MaxColumn))) {
+  MaxEndOfLine = std::max(BackslashColumn, MaxEndOfLine);
+}
+if (!InPPDirective) {
+  alignEscapedNewlines(StartOfMacro + 1, i, MaxEndOfLine);
+  MaxEndOfLine = AlignLeft ? 0 : MaxColumn;
+  StartOfMacro = i;
 }
   }
   alignEscapedNewlines(StartOfMacro + 1, Changes.size(), MaxEndOfLine);
diff --git a/clang/unittests/Format/ConfigParseTest.cpp 
b/clang/unittests/Format/ConfigParseTest.cpp
index 82e72f08ffb5e..ff3ced38a1f31 100644
--- a/clang/unittests/Format/ConfigParseTest.cpp
+++ b/clang/unittests/Format/ConfigParseTest.cpp
@@ -480,6 +480,8 @@ TEST(ConfigParseTest, ParsesConfiguration) {
   FormatStyle::ENAS_DontAlign);
   CHECK_PARSE("AlignEscapedNewlines: Left", AlignEscapedNewlines,
   FormatStyle::ENAS_Left);
+  CHECK_PARSE("AlignEscapedNewlines: LeftWithLastLine", AlignEscapedNewlines,
+  FormatStyle::ENAS_LeftWithLastLine);
   CHECK_PARSE("AlignEscapedNewlines: Right", AlignEscapedNewlines,
   FormatStyle::ENAS_Right);
   // For backward compatibility:
diff --git a/clang/unittests/Format/FormatTest.cpp 
b/clang/unittests/Format/FormatTest.cpp
index a9df994189f00..76eb2b6cd994c 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -6636,6 +6636,26 @@ TEST_F(FormatTest, EscapedNewlines) {
"  int x(int a);",
AlignLeft);
 
+  constexpr StringRef Code{"#define A   \\\n"
+   "  int a123; \\\n"
+   "  int a;\\\n"
+   "  int a1234;"};
+  verifyFormat(Code, AlignLeft);
+
+  constexpr StringRef Code2{"#define A\\\n"
+"  int a123;  \\\n"
+"  int a; \\\n"
+"  int a1234;"};
+  auto LastLine = getLLVMStyle();
+  LastLine.AlignEscapedNewlines = FormatStyle::ENAS_LeftWithLastLine;
+  verifyFormat(Code2, LastLine);
+
+  LastLine.ColumnLimit = 13;
+  verifyFormat(Code, LastLine);
+
+  LastLine.ColumnLimit = 0;
+  verifyFormat(Code2, LastLine);
+
   FormatStyle DontAlign = getLLVMStyle();
   DontAlign.AlignEscapedNewlines = FormatStyle::ENAS_DontAlign;
   DontAlign.MaxEmptyLinesToKeep = 3;

``




https://github.com/llvm/llvm-project/pull/93402
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-format] Add LeftWithLastLine to AlignEscapedNewlines option (PR #93402)

2024-05-26 Thread via cfe-commits
Line = std::max(C.PreviousEndOfTokenColumn + 2, MaxEndOfLine);
-  } else {
-alignEscapedNewlines(StartOfMacro + 1, i, MaxEndOfLine);
-MaxEndOfLine = AlignLeft ? 0 : Style.ColumnLimit;
-StartOfMacro = i;
-  }
+if (C.NewlinesBefore == 0 && (!WithLastLine || C.Tok->isNot(tok::eof)))
+  continue;
+const bool InPPDirective = C.ContinuesPPDirective;
+const auto BackslashColumn = C.PreviousEndOfTokenColumn + 2;
+if (InPPDirective ||
+(WithLastLine && (MaxColumn == 0 || BackslashColumn <= MaxColumn))) {
+  MaxEndOfLine = std::max(BackslashColumn, MaxEndOfLine);
+}
+if (!InPPDirective) {
+  alignEscapedNewlines(StartOfMacro + 1, i, MaxEndOfLine);
+  MaxEndOfLine = AlignLeft ? 0 : MaxColumn;
+  StartOfMacro = i;
 }
   }
   alignEscapedNewlines(StartOfMacro + 1, Changes.size(), MaxEndOfLine);
diff --git a/clang/unittests/Format/ConfigParseTest.cpp 
b/clang/unittests/Format/ConfigParseTest.cpp
index 82e72f08ffb5e..ff3ced38a1f31 100644
--- a/clang/unittests/Format/ConfigParseTest.cpp
+++ b/clang/unittests/Format/ConfigParseTest.cpp
@@ -480,6 +480,8 @@ TEST(ConfigParseTest, ParsesConfiguration) {
   FormatStyle::ENAS_DontAlign);
   CHECK_PARSE("AlignEscapedNewlines: Left", AlignEscapedNewlines,
   FormatStyle::ENAS_Left);
+  CHECK_PARSE("AlignEscapedNewlines: LeftWithLastLine", AlignEscapedNewlines,
+  FormatStyle::ENAS_LeftWithLastLine);
   CHECK_PARSE("AlignEscapedNewlines: Right", AlignEscapedNewlines,
   FormatStyle::ENAS_Right);
   // For backward compatibility:
diff --git a/clang/unittests/Format/FormatTest.cpp 
b/clang/unittests/Format/FormatTest.cpp
index a9df994189f00..76eb2b6cd994c 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -6636,6 +6636,26 @@ TEST_F(FormatTest, EscapedNewlines) {
"  int x(int a);",
AlignLeft);
 
+  constexpr StringRef Code{"#define A   \\\n"
+   "  int a123; \\\n"
+   "  int a;\\\n"
+   "  int a1234;"};
+  verifyFormat(Code, AlignLeft);
+
+  constexpr StringRef Code2{"#define A\\\n"
+"  int a123;  \\\n"
+"  int a; \\\n"
+"  int a1234;"};
+  auto LastLine = getLLVMStyle();
+  LastLine.AlignEscapedNewlines = FormatStyle::ENAS_LeftWithLastLine;
+  verifyFormat(Code2, LastLine);
+
+  LastLine.ColumnLimit = 13;
+  verifyFormat(Code, LastLine);
+
+  LastLine.ColumnLimit = 0;
+  verifyFormat(Code2, LastLine);
+
   FormatStyle DontAlign = getLLVMStyle();
   DontAlign.AlignEscapedNewlines = FormatStyle::ENAS_DontAlign;
   DontAlign.MaxEmptyLinesToKeep = 3;

``




https://github.com/llvm/llvm-project/pull/93402
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-format] Add LeftWithLastLine to AlignEscapedNewlines option (PR #93402)

2024-05-26 Thread Owen Pan via cfe-commits
StartOfMacro = 0;
   for (unsigned i = 1, e = Changes.size(); i < e; ++i) {
 Change  = Changes[i];
-if (C.NewlinesBefore > 0) {
-  if (C.ContinuesPPDirective) {
-MaxEndOfLine = std::max(C.PreviousEndOfTokenColumn + 2, MaxEndOfLine);
-  } else {
-alignEscapedNewlines(StartOfMacro + 1, i, MaxEndOfLine);
-MaxEndOfLine = AlignLeft ? 0 : Style.ColumnLimit;
-StartOfMacro = i;
-  }
+if (C.NewlinesBefore == 0 && (!WithLastLine || C.Tok->isNot(tok::eof)))
+  continue;
+const bool InPPDirective = C.ContinuesPPDirective;
+const auto BackslashColumn = C.PreviousEndOfTokenColumn + 2;
+if (InPPDirective ||
+(WithLastLine && (MaxColumn == 0 || BackslashColumn <= MaxColumn))) {
+  MaxEndOfLine = std::max(BackslashColumn, MaxEndOfLine);
+}
+if (!InPPDirective) {
+  alignEscapedNewlines(StartOfMacro + 1, i, MaxEndOfLine);
+  MaxEndOfLine = AlignLeft ? 0 : MaxColumn;
+  StartOfMacro = i;
 }
   }
   alignEscapedNewlines(StartOfMacro + 1, Changes.size(), MaxEndOfLine);
diff --git a/clang/unittests/Format/ConfigParseTest.cpp 
b/clang/unittests/Format/ConfigParseTest.cpp
index 82e72f08ffb5e..ff3ced38a1f31 100644
--- a/clang/unittests/Format/ConfigParseTest.cpp
+++ b/clang/unittests/Format/ConfigParseTest.cpp
@@ -480,6 +480,8 @@ TEST(ConfigParseTest, ParsesConfiguration) {
   FormatStyle::ENAS_DontAlign);
   CHECK_PARSE("AlignEscapedNewlines: Left", AlignEscapedNewlines,
   FormatStyle::ENAS_Left);
+  CHECK_PARSE("AlignEscapedNewlines: LeftWithLastLine", AlignEscapedNewlines,
+  FormatStyle::ENAS_LeftWithLastLine);
   CHECK_PARSE("AlignEscapedNewlines: Right", AlignEscapedNewlines,
   FormatStyle::ENAS_Right);
   // For backward compatibility:
diff --git a/clang/unittests/Format/FormatTest.cpp 
b/clang/unittests/Format/FormatTest.cpp
index a9df994189f00..76eb2b6cd994c 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -6636,6 +6636,26 @@ TEST_F(FormatTest, EscapedNewlines) {
"  int x(int a);",
AlignLeft);
 
+  constexpr StringRef Code{"#define A   \\\n"
+   "  int a123; \\\n"
+   "  int a;\\\n"
+   "  int a1234;"};
+  verifyFormat(Code, AlignLeft);
+
+  constexpr StringRef Code2{"#define A\\\n"
+"  int a123;  \\\n"
+"  int a; \\\n"
+"  int a1234;"};
+  auto LastLine = getLLVMStyle();
+  LastLine.AlignEscapedNewlines = FormatStyle::ENAS_LeftWithLastLine;
+  verifyFormat(Code2, LastLine);
+
+  LastLine.ColumnLimit = 13;
+  verifyFormat(Code, LastLine);
+
+  LastLine.ColumnLimit = 0;
+  verifyFormat(Code2, LastLine);
+
   FormatStyle DontAlign = getLLVMStyle();
   DontAlign.AlignEscapedNewlines = FormatStyle::ENAS_DontAlign;
   DontAlign.MaxEmptyLinesToKeep = 3;

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang] Rewrite SourceLocExpr in default args (PR #93383)

2024-05-26 Thread via cfe-commits

https://github.com/cor3ntin closed 
https://github.com/llvm/llvm-project/pull/93383
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] 70d6e7c - [Clang] Rewrite SourceLocExpr in default args (#93383)

2024-05-26 Thread via cfe-commits

Author: cor3ntin
Date: 2024-05-26T09:18:33+02:00
New Revision: 70d6e7c09fd1a79ca5c2c2deeb72e6b0e1e80a52

URL: 
https://github.com/llvm/llvm-project/commit/70d6e7c09fd1a79ca5c2c2deeb72e6b0e1e80a52
DIFF: 
https://github.com/llvm/llvm-project/commit/70d6e7c09fd1a79ca5c2c2deeb72e6b0e1e80a52.diff

LOG: [Clang] Rewrite SourceLocExpr in default args (#93383)

In order for their dependency to be computed correctly, SourceLocExpr
should refer to the context in which they are used.

Fixes #92680

Added: 


Modified: 
clang/docs/ReleaseNotes.rst
clang/lib/Sema/SemaExpr.cpp
clang/test/SemaCXX/source_location.cpp

Removed: 




diff  --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index d023f53754cb3..825e91876ffce 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -794,6 +794,8 @@ Bug Fixes to C++ Support
   Fixes (#GH87210), (GH89541).
 - Clang no longer tries to check if an expression is immediate-escalating in 
an unevaluated context.
   Fixes (#GH91308).
+- Fix a crash caused by a regression in the handling of ``source_location``
+  in dependent contexts. Fixes (#GH92680).
 
 Bug Fixes to AST Handling
 ^

diff  --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index ff9c5ead36dcf..410f80ae864a1 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -5506,6 +5506,15 @@ struct EnsureImmediateInvocationInDefaultArgs
   // cause it to incorrectly point it to the outermost class
   // in the case of nested struct initialization.
   ExprResult TransformCXXThisExpr(CXXThisExpr *E) { return E; }
+
+  // Rewrite to source location to refer to the context in which they are used.
+  ExprResult TransformSourceLocExpr(SourceLocExpr *E) {
+if (E->getParentContext() == SemaRef.CurContext)
+  return E;
+return getDerived().RebuildSourceLocExpr(E->getIdentKind(), E->getType(),
+ E->getBeginLoc(), E->getEndLoc(),
+ SemaRef.CurContext);
+  }
 };
 
 ExprResult Sema::BuildCXXDefaultArgExpr(SourceLocation CallLoc,

diff  --git a/clang/test/SemaCXX/source_location.cpp 
b/clang/test/SemaCXX/source_location.cpp
index 63157cfacdd98..6b3610d703e71 100644
--- a/clang/test/SemaCXX/source_location.cpp
+++ b/clang/test/SemaCXX/source_location.cpp
@@ -912,3 +912,20 @@ auto g() {
 }
 
 }
+
+namespace GH92680 {
+
+struct IntConstuctible {
+  IntConstuctible(std::source_location = std::source_location::current());
+};
+
+template 
+auto construct_at(IntConstuctible) -> decltype(IntConstuctible()) {
+  return {};
+}
+
+void test() {
+  construct_at({});
+}
+
+}



_______
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang] Rewrite SourceLocExpr in default args (PR #93383)

2024-05-26 Thread via cfe-commits

https://github.com/cor3ntin updated 
https://github.com/llvm/llvm-project/pull/93383

>From ce5f58180635968c1525b9a3d267f91c495f3058 Mon Sep 17 00:00:00 2001
From: Corentin Jabot 
Date: Sat, 25 May 2024 20:49:22 +0200
Subject: [PATCH 1/2] [Clang] Rewrite SourceLocExpr in default args

In order for their dependency to be computed correctly,
SourceLocExpr should refer to the context in which they are used.

Fixes #92680
---
 clang/docs/ReleaseNotes.rst|  2 ++
 clang/lib/Sema/SemaExpr.cpp|  9 +
 clang/test/SemaCXX/source_location.cpp | 17 +
 3 files changed, 28 insertions(+)

diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 7bcdee96e213e..3f2c3c1e5a65d 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -771,6 +771,8 @@ Bug Fixes to C++ Support
   Fixes (#GH87210), (GH89541).
 - Clang no longer tries to check if an expression is immediate-escalating in 
an unevaluated context.
   Fixes (#GH91308).
+- Fix a crash caused by a regression in the handling of ``source_location``
+  in dependent contexts. Fixes (#GH92680).
 
 Bug Fixes to AST Handling
 ^
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index ff9c5ead36dcf..ef3162ca989c4 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -5506,6 +5506,15 @@ struct EnsureImmediateInvocationInDefaultArgs
   // cause it to incorrectly point it to the outermost class
   // in the case of nested struct initialization.
   ExprResult TransformCXXThisExpr(CXXThisExpr *E) { return E; }
+
+  // Rewrite to source location to refer to the context in which they are used
+  ExprResult TransformSourceLocExpr(SourceLocExpr *E) {
+if (E->getParentContext() == SemaRef.CurContext)
+  return E;
+return getDerived().RebuildSourceLocExpr(E->getIdentKind(), E->getType(),
+ E->getBeginLoc(), E->getEndLoc(),
+ SemaRef.CurContext);
+  }
 };
 
 ExprResult Sema::BuildCXXDefaultArgExpr(SourceLocation CallLoc,
diff --git a/clang/test/SemaCXX/source_location.cpp 
b/clang/test/SemaCXX/source_location.cpp
index 63157cfacdd98..6b3610d703e71 100644
--- a/clang/test/SemaCXX/source_location.cpp
+++ b/clang/test/SemaCXX/source_location.cpp
@@ -912,3 +912,20 @@ auto g() {
 }
 
 }
+
+namespace GH92680 {
+
+struct IntConstuctible {
+  IntConstuctible(std::source_location = std::source_location::current());
+};
+
+template 
+auto construct_at(IntConstuctible) -> decltype(IntConstuctible()) {
+  return {};
+}
+
+void test() {
+  construct_at({});
+}
+
+}

>From ec59077109616b62a1421aab034caa6cb6148fe4 Mon Sep 17 00:00:00 2001
From: cor3ntin 
Date: Sun, 26 May 2024 09:18:00 +0200
Subject: [PATCH 2/2] Update clang/lib/Sema/SemaExpr.cpp

Co-authored-by: Timm Baeder 
---
 clang/lib/Sema/SemaExpr.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index ef3162ca989c4..410f80ae864a1 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -5507,7 +5507,7 @@ struct EnsureImmediateInvocationInDefaultArgs
   // in the case of nested struct initialization.
   ExprResult TransformCXXThisExpr(CXXThisExpr *E) { return E; }
 
-  // Rewrite to source location to refer to the context in which they are used
+  // Rewrite to source location to refer to the context in which they are used.
   ExprResult TransformSourceLocExpr(SourceLocExpr *E) {
 if (E->getParentContext() == SemaRef.CurContext)
   return E;

_______
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [webkit.RefCntblBaseVirtualDtor] Allow CRTP classes without a virtual destructor. (PR #92837)

2024-05-26 Thread Ryosuke Niwa via cfe-commits


@@ -11,16 +11,116 @@
 #include "PtrTypesSemantics.h"
 #include "clang/AST/CXXInheritance.h"
 #include "clang/AST/RecursiveASTVisitor.h"
+#include "clang/AST/StmtVisitor.h"
 #include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
 #include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h"
 #include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
 #include "clang/StaticAnalyzer/Core/Checker.h"
+#include "llvm/ADT/DenseSet.h"
+#include "llvm/ADT/SetVector.h"
 #include 
 
 using namespace clang;
 using namespace ento;
 
 namespace {
+
+class DerefFuncDeleteExprVisitor
+: public ConstStmtVisitor {
+  // Returns true if any of child statements return true.
+  bool VisitChildren(const Stmt *S) {
+for (const Stmt *Child : S->children()) {
+  if (Child && Visit(Child))
+return true;
+}
+return false;
+  }
+
+  bool VisitBody(const Stmt *Body) {
+if (!Body)
+  return false;
+
+auto [It, IsNew] = VisitedBody.insert(Body);
+if (!IsNew) // This body is recursive
+  return false;
+
+return Visit(Body);
+  }
+
+public:
+  DerefFuncDeleteExprVisitor(const TemplateArgumentList ,
+ const CXXRecordDecl *ClassDecl)
+  : ArgList(), ClassDecl(ClassDecl) {}
+
+  DerefFuncDeleteExprVisitor(const CXXRecordDecl *ClassDecl)
+  : ClassDecl(ClassDecl) {}
+
+  std::optional HasSpecializedDelete(CXXMethodDecl *Decl) {
+if (auto *Body = Decl->getBody())
+  return VisitBody(Body);
+if (auto *Tmpl = Decl->getTemplateInstantiationPattern())

rniwa wrote:

Oh oops, sorry about that.

https://github.com/llvm/llvm-project/pull/92837
_______
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang] In Sema use new parentEvaluationContext function (PR #93338)

2024-05-26 Thread Vlad Serebrennikov via cfe-commits


@@ -5153,6 +5153,12 @@ class Sema final : public SemaBase {
 return ExprEvalContexts.back();
   };
 
+  ExpressionEvaluationContextRecord () {
+assert(ExprEvalContexts.size() >= 2 &&
+   "Must be in an expression evaluation context");
+return ExprEvalContexts[ExprEvalContexts.size() - 2];
+  };
+
   const ExpressionEvaluationContextRecord () const {

Endilll wrote:

You should implement const overload in terms of non-const overload you just 
added via `const_cast` on `this` to avoid duplication.

https://github.com/llvm/llvm-project/pull/93338
_______
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][Interp] Member Pointers (PR #91303)

2024-05-26 Thread Timm Baeder via cfe-commits
on() shouldn't be reachable for 
MemberPointers");
 return 17;
   }
 

>From d76c5855a2529c5849835043ef7d9d6a55280f8e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= 
Date: Sat, 25 May 2024 20:38:02 +0200
Subject: [PATCH 3/4] Allow MemberPointer(int, const Descriptor*), but only for
 Address==0

---
 clang/lib/AST/Interp/MemberPointer.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/clang/lib/AST/Interp/MemberPointer.h 
b/clang/lib/AST/Interp/MemberPointer.h
index d5299e0ff15c6..10ecc1d5ddf7f 100644
--- a/clang/lib/AST/Interp/MemberPointer.h
+++ b/clang/lib/AST/Interp/MemberPointer.h
@@ -32,9 +32,8 @@ class MemberPointer final {
   MemberPointer() = default;
   MemberPointer(Pointer Base, const Decl *Dcl) : Base(Base), Dcl(Dcl) {}
   MemberPointer(uint32_t Address, const Descriptor *D) {
-// This should be impossible to hit, at least I've been unable
-// to write a test for it.
-assert(false && "This constructor shouldn't be reachable for 
MemberPointers");
+// We only reach this for Address == 0, when creating a null member 
pointer.
+assert(Address == 0);
   }
 
   MemberPointer(const Decl *D) : Dcl(D) {

>From c0f567ea4b46f70362beb23743227179bbad9a38 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= 
Date: Sun, 26 May 2024 08:24:11 +0200
Subject: [PATCH 4/4] Fix another edge case

---
 clang/lib/AST/Interp/MemberPointer.cpp   |  3 +++
 clang/test/AST/Interp/memberpointers.cpp | 13 +
 2 files changed, 16 insertions(+)

diff --git a/clang/lib/AST/Interp/MemberPointer.cpp 
b/clang/lib/AST/Interp/MemberPointer.cpp
index 976472b2871b8..96f63643e83c9 100644
--- a/clang/lib/AST/Interp/MemberPointer.cpp
+++ b/clang/lib/AST/Interp/MemberPointer.cpp
@@ -21,6 +21,9 @@ std::optional MemberPointer::toPointer(const Context 
) const {
   const FieldDecl *FD = cast(Dcl);
   assert(FD);
 
+  if (!Base.isBlockPointer())
+return std::nullopt;
+
   Pointer CastedBase =
   (PtrOffset < 0 ? Base.atField(-PtrOffset) : Base.atFieldSub(PtrOffset));
 
diff --git a/clang/test/AST/Interp/memberpointers.cpp 
b/clang/test/AST/Interp/memberpointers.cpp
index 2ee92c1f07708..54d73fe86ca18 100644
--- a/clang/test/AST/Interp/memberpointers.cpp
+++ b/clang/test/AST/Interp/memberpointers.cpp
@@ -182,3 +182,16 @@ namespace {
 return x4.getMember(y);
   }
 }
+
+/// From test/CXX/basic/basic.def.odr/p2.cpp
+namespace {
+  void use(int);
+  struct S { int x; int f() const; };
+  constexpr S *ps = nullptr;
+  S *const  = ps;
+
+  void test() {
+use(ps->*::x);
+use(psr->*::x);
+  }
+}

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang] Rewrite SourceLocExpr in default args (PR #93383)

2024-05-26 Thread Timm Baeder via cfe-commits


@@ -5506,6 +5506,15 @@ struct EnsureImmediateInvocationInDefaultArgs
   // cause it to incorrectly point it to the outermost class
   // in the case of nested struct initialization.
   ExprResult TransformCXXThisExpr(CXXThisExpr *E) { return E; }
+
+  // Rewrite to source location to refer to the context in which they are used

tbaederr wrote:

```suggestion
  // Rewrite to source location to refer to the context in which they are used.
```

https://github.com/llvm/llvm-project/pull/93383
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][Interp] Member Pointers (PR #91303)

2024-05-26 Thread Timm Baeder via cfe-commits
n() shouldn't be reachable for 
MemberPointers");
 return 17;
   }
 

>From d76c5855a2529c5849835043ef7d9d6a55280f8e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= 
Date: Sat, 25 May 2024 20:38:02 +0200
Subject: [PATCH 3/4] Allow MemberPointer(int, const Descriptor*), but only for
 Address==0

---
 clang/lib/AST/Interp/MemberPointer.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/clang/lib/AST/Interp/MemberPointer.h 
b/clang/lib/AST/Interp/MemberPointer.h
index d5299e0ff15c6..10ecc1d5ddf7f 100644
--- a/clang/lib/AST/Interp/MemberPointer.h
+++ b/clang/lib/AST/Interp/MemberPointer.h
@@ -32,9 +32,8 @@ class MemberPointer final {
   MemberPointer() = default;
   MemberPointer(Pointer Base, const Decl *Dcl) : Base(Base), Dcl(Dcl) {}
   MemberPointer(uint32_t Address, const Descriptor *D) {
-// This should be impossible to hit, at least I've been unable
-// to write a test for it.
-assert(false && "This constructor shouldn't be reachable for 
MemberPointers");
+// We only reach this for Address == 0, when creating a null member 
pointer.
+assert(Address == 0);
   }
 
   MemberPointer(const Decl *D) : Dcl(D) {

>From aec4975d63230e9f02d8536050c0aaf62c0cd686 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= 
Date: Sun, 26 May 2024 08:24:11 +0200
Subject: [PATCH 4/4] Fix another edge case

---
 clang/lib/AST/Interp/MemberPointer.cpp   |  3 +++
 clang/test/AST/Interp/memberpointers.cpp | 14 ++
 2 files changed, 17 insertions(+)

diff --git a/clang/lib/AST/Interp/MemberPointer.cpp 
b/clang/lib/AST/Interp/MemberPointer.cpp
index 976472b2871b8..96f63643e83c9 100644
--- a/clang/lib/AST/Interp/MemberPointer.cpp
+++ b/clang/lib/AST/Interp/MemberPointer.cpp
@@ -21,6 +21,9 @@ std::optional MemberPointer::toPointer(const Context 
) const {
   const FieldDecl *FD = cast(Dcl);
   assert(FD);
 
+  if (!Base.isBlockPointer())
+return std::nullopt;
+
   Pointer CastedBase =
   (PtrOffset < 0 ? Base.atField(-PtrOffset) : Base.atFieldSub(PtrOffset));
 
diff --git a/clang/test/AST/Interp/memberpointers.cpp 
b/clang/test/AST/Interp/memberpointers.cpp
index 2ee92c1f07708..8612b29e9f5de 100644
--- a/clang/test/AST/Interp/memberpointers.cpp
+++ b/clang/test/AST/Interp/memberpointers.cpp
@@ -182,3 +182,17 @@ namespace {
 return x4.getMember(y);
   }
 }
+
+/// From test/CXX/basic/basic.def.odr/p2.cpp
+namespace {
+  void use(int);
+  struct S { int x; int f() const; };
+  constexpr S *ps = nullptr;
+  S *const  = ps; // expected-note 2{{here}}
+
+
+  void test() {
+use(ps->*::x); // ok (lvalue-to-rvalue conversion applied to 
id-expression)
+use(psr->*::x); // expected-error {{reference to local variable}}
+  }
+}

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions with no decl in source (PR #93394)

2024-05-26 Thread Timm Baeder via cfe-commits


@@ -5897,6 +5897,16 @@ void Sema::diagnoseTypo(const TypoCorrection ,
 
   NamedDecl *ChosenDecl =
   Correction.isKeyword() ? nullptr : Correction.getFoundDecl();
+
+  // For builtin functions which aren't declared anywhere in source,
+  // don't emit the "declared here" note.
+  if (auto *FD = dyn_cast_or_null(ChosenDecl);

tbaederr wrote:

```suggestion
  if (const auto *FD = dyn_cast_if_present(ChosenDecl);
```

https://github.com/llvm/llvm-project/pull/93394
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang][Sema] Tweak tryCaptureVariable for unevaluated lambdas (PR #93206)

2024-05-26 Thread Younan Zhang via cfe-commits


@@ -1576,7 +1576,10 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer(
   TrailingReturnTypeLoc, ),
   std::move(Attributes), DeclEndLoc);
 
-Actions.ActOnLambdaClosureQualifiers(Intro, MutableLoc);
+// We have called ActOnLambdaClosureQualifiers for parentheses-less cases

zyn0217 wrote:

Yeah, looking into `ActOnLambdaClosureQualifiers`, I don't see anything that 
(currently) depends on lambda parameters. I guess we can combine these two 
calls? I'd love to open a separate NFC PR for doing so, before landing this 
patch. :)

@erichkeane I retrospected your comment in 
https://github.com/llvm/llvm-project/pull/78598#discussion_r1478458713 and I 
appreciate the diagnostics for non-ODR uses - however that's much like a QoI 
issue to me and would it be OK to leave it as a follow-up? Let me know what you 
think and I'll add a FIXME then.

https://github.com/llvm/llvm-project/pull/93206
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-format]: Annotate colons found in inline assembly (PR #92617)

2024-05-25 Thread Hirofumi Nakamura via cfe-commits

https://github.com/hnakamura5 approved this pull request.


https://github.com/llvm/llvm-project/pull/92617
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


07/10: gnu: linux-libre 5.15: Update to 5.15.160.

2024-05-25 Thread guix-commits
lfam pushed a commit to branch kernel-updates
in repository guix.

commit bb79f68cedba22b555a0ad69997754972aa5c428
Author: Wilko Meyer 
AuthorDate: Sat May 25 19:12:54 2024 +0200

gnu: linux-libre 5.15: Update to 5.15.160.

* gnu/packages/linux.scm (linux-libre-5.15-version): Update to 5.15.160.
(linux-libre-5.15-pristine-source): Update hash.

Change-Id: Ic3eddd036fc083cfb4c9ca0d549757c957bd388a
Signed-off-by: Leo Famulari 
---
 gnu/packages/linux.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 01644eca2f..ba7a0b56dd 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -570,7 +570,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given 
DEBLOB-SCRIPTS."
 (%upstream-linux-source version hash)
 deblob-scripts-6.1)))
 
-(define-public linux-libre-5.15-version "5.15.159")
+(define-public linux-libre-5.15-version "5.15.160")
 (define-public linux-libre-5.15-gnu-revision "gnu")
 (define deblob-scripts-5.15
   (linux-libre-deblob-scripts
@@ -580,7 +580,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given 
DEBLOB-SCRIPTS."
(base32 "121shkzgixmywa19xx5f2yxg1primarpg4bxin3jyw0214xbfh2n")))
 (define-public linux-libre-5.15-pristine-source
   (let ((version linux-libre-5.15-version)
-(hash (base32 "1ia1nfci2wkx4nhnldfczpcq47mp7y7g657ikkh8i72y498gwy1l")))
+(hash (base32 "018v19a7rhzc4szybzzn86jlnk42x7jm6xkadfd2d3xq6f7727pl")))
(make-linux-libre-source version
 (%upstream-linux-source version hash)
 deblob-scripts-5.15)))



08/10: gnu: linux-libre 5.10: Update to 5.10.218.

2024-05-25 Thread guix-commits
lfam pushed a commit to branch kernel-updates
in repository guix.

commit 22333db8840733e3f482b8db4d51d6014f481c9a
Author: Wilko Meyer 
AuthorDate: Sat May 25 19:12:55 2024 +0200

gnu: linux-libre 5.10: Update to 5.10.218.

* gnu/packages/linux.scm (linux-libre-5.10-version): Update to 5.10.218.
(linux-libre-5.10-pristine-source): Update hash.

Change-Id: Ied5ce90401f0934ce9fcedad9be86376d3288f56
Signed-off-by: Leo Famulari 
---
 gnu/packages/linux.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index ba7a0b56dd..cf4e964d4f 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -585,7 +585,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given 
DEBLOB-SCRIPTS."
 (%upstream-linux-source version hash)
 deblob-scripts-5.15)))
 
-(define-public linux-libre-5.10-version "5.10.217")
+(define-public linux-libre-5.10-version "5.10.218")
 (define-public linux-libre-5.10-gnu-revision "gnu1")
 (define deblob-scripts-5.10
   (linux-libre-deblob-scripts
@@ -595,7 +595,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given 
DEBLOB-SCRIPTS."
(base32 "12csh2zyjrqzgqcv799gv8h4xaw1irxh2zqddn4jqp5p7psx4j5k")))
 (define-public linux-libre-5.10-pristine-source
   (let ((version linux-libre-5.10-version)
-(hash (base32 "0qhzqrjci45vcbzjch7vq75i6hpyap6yb7jw6g71phcnqgzw2ay5")))
+(hash (base32 "1mmj5hwm5i16gc1y4nzr1cs882vi6vrihrincdcivv63x11v4dlw")))
(make-linux-libre-source version
 (%upstream-linux-source version hash)
 deblob-scripts-5.10)))



10/10: gnu: linux-libre 4.19: Update to 4.19.315.

2024-05-25 Thread guix-commits
lfam pushed a commit to branch kernel-updates
in repository guix.

commit 0b418d079f515f1a21a8df678676c0b63f7dfc2a
Author: Wilko Meyer 
AuthorDate: Sat May 25 19:12:57 2024 +0200

gnu: linux-libre 4.19: Update to 4.19.315.

* gnu/packages/linux.scm (linux-libre-4.19-version): Update to 4.19.315.
(linux-libre-4.19-pristine-source): Update hash.

Change-Id: I43b80c214d87e385e422ce064c3d04e11c4a1997
Signed-off-by: Leo Famulari 
---
 gnu/packages/linux.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 78a4fa05bd..ac5bef8920 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -615,7 +615,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given 
DEBLOB-SCRIPTS."
 (%upstream-linux-source version hash)
 deblob-scripts-5.4)))
 
-(define-public linux-libre-4.19-version "4.19.314")
+(define-public linux-libre-4.19-version "4.19.315")
 (define-public linux-libre-4.19-gnu-revision "gnu1")
 (define deblob-scripts-4.19
   (linux-libre-deblob-scripts
@@ -625,7 +625,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given 
DEBLOB-SCRIPTS."
(base32 "0fgkp3v7qgqpn7l1987xcwwlrmwsbscqnxfv06p8nkavrhymrv3c")))
 (define-public linux-libre-4.19-pristine-source
   (let ((version linux-libre-4.19-version)
-(hash (base32 "0nvrpg5aj2q4h2drmczprqaprcc2zhcrijfri77b830ms8rg4y2a")))
+(hash (base32 "1j1j8awy0237jp2r211qpa305c10y7rlcbkxkzdvzbgyhwy4spkc")))
 (make-linux-libre-source version
  (%upstream-linux-source version hash)
  deblob-scripts-4.19)))



09/10: gnu: linux-libre 5.4: Update to 5.4.277.

2024-05-25 Thread guix-commits
lfam pushed a commit to branch kernel-updates
in repository guix.

commit d4ed9dd57c9a9349995b2fadeeb7445385f9b443
Author: Wilko Meyer 
AuthorDate: Sat May 25 19:12:56 2024 +0200

gnu: linux-libre 5.4: Update to 5.4.277.

* gnu/packages/linux.scm (linux-libre-5.4-version): Update to 5.4.277.
(linux-libre-5.4-pristine-source): Update hash.

Change-Id: I0a51101f41109f784cb7a2cda47a01ab79378b46
Signed-off-by: Leo Famulari 
---
 gnu/packages/linux.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index cf4e964d4f..78a4fa05bd 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -600,7 +600,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given 
DEBLOB-SCRIPTS."
 (%upstream-linux-source version hash)
 deblob-scripts-5.10)))
 
-(define-public linux-libre-5.4-version "5.4.276")
+(define-public linux-libre-5.4-version "5.4.277")
 (define-public linux-libre-5.4-gnu-revision "gnu1")
 (define deblob-scripts-5.4
   (linux-libre-deblob-scripts
@@ -610,7 +610,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given 
DEBLOB-SCRIPTS."
(base32 "0x0xg0fcykpd117x3q0gim8jilhx922ashhckjvafxv2gk2zzjhj")))
 (define-public linux-libre-5.4-pristine-source
   (let ((version linux-libre-5.4-version)
-(hash (base32 "01vfx19n8rv9fgjjzvi78125md71zgn5jrinbarabzr18jyjwwg2")))
+(hash (base32 "0l8zq3k07hdprfpvw69ykkf2pdg8wiv28xz733yxsjcfb0l5n7vy")))
(make-linux-libre-source version
 (%upstream-linux-source version hash)
 deblob-scripts-5.4)))



05/10: gnu: linux-libre 6.6: Update to 6.6.32.

2024-05-25 Thread guix-commits
lfam pushed a commit to branch kernel-updates
in repository guix.

commit f219b99f2ffe68db2fcd4ca1ac743efc6f25bf89
Author: Wilko Meyer 
AuthorDate: Sat May 25 19:12:52 2024 +0200

gnu: linux-libre 6.6: Update to 6.6.32.

* gnu/packages/linux.scm (linux-libre-6.6-version): Update to 6.6.32.
(linux-libre-6.6-pristine-source, deblob-scripts-6.6): Update hashes.

Change-Id: I518ccfefd49ec31341f2d47e096898292fa7f914
Signed-off-by: Leo Famulari 
---
 gnu/packages/linux.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 51d6856b8f..63bbb027f9 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -540,17 +540,17 @@ corresponding UPSTREAM-SOURCE (an origin), using the 
given DEBLOB-SCRIPTS."
 ;; Here are the support timelines:
 ;; 
 
-(define-public linux-libre-6.6-version "6.6.31")
+(define-public linux-libre-6.6-version "6.6.32")
 (define-public linux-libre-6.6-gnu-revision "gnu")
 (define deblob-scripts-6.6
   (linux-libre-deblob-scripts
linux-libre-6.6-version
linux-libre-6.6-gnu-revision
(base32 "1a28pdl645bj4d8gac71dmwmll6a2kgd3k7gkpfvi94yqkzd9r2z")
-   (base32 "115kma7n9c1z9iqp8xnm4mvfz8cgqmc6jn6a7jg5vq0d4c7nr92w")))
+   (base32 "0g45msp8l6hm8b9yq1rp03wab3ssahm5z3zflkspi16d42ikm793")))
 (define-public linux-libre-6.6-pristine-source
   (let ((version linux-libre-6.6-version)
-(hash (base32 "080wwrc231fbf43hvvygddmdxdspyw23jc5vnd6fr5ccdybgzv6n")))
+(hash (base32 "1qbc8dqmk2xs1cz968rysw5xvhq3lj8g0pxp48fr2qbzy3m29a5a")))
(make-linux-libre-source version
 (%upstream-linux-source version hash)
 deblob-scripts-6.6)))



04/10: gnu: linux-libre-6.8: Update to 6.8.11.

2024-05-25 Thread guix-commits
lfam pushed a commit to branch kernel-updates
in repository guix.

commit 82b633aa0fdbd4bda8ae740ee7f1d5a618dd8d02
Author: Wilko Meyer 
AuthorDate: Sat May 25 19:12:51 2024 +0200

gnu: linux-libre-6.8: Update to 6.8.11.

* gnu/packages/linux.scm (linux-libre-6.8-version): Update to 6.8.11.
(linux-libre-6.8-pristine-source, deblob-scripts-6.8): Update hashes.

Change-Id: I5eedf40c8f3ad42805d38f6e7b057a6b0171ae33
Signed-off-by: Leo Famulari 
---
 gnu/packages/linux.scm | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index e577c3790f..51d6856b8f 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -521,17 +521,17 @@ corresponding UPSTREAM-SOURCE (an origin), using the 
given DEBLOB-SCRIPTS."
 ;; The current "stable" kernels. That is, the most recently released major
 ;; versions that are still supported upstream.
 
-(define-public linux-libre-6.8-version "6.8.10")
+(define-public linux-libre-6.8-version "6.8.11")
 (define-public linux-libre-6.8-gnu-revision "gnu")
 (define deblob-scripts-6.8
   (linux-libre-deblob-scripts
linux-libre-6.8-version
linux-libre-6.8-gnu-revision
-   (base32 "0340z315zxz8wd2vlw5i5hgha10iy2yql1bglgl3dci7d2mvmihn")
-   (base32 "1lr4jgj7ii06fgkhnygvkvhz1sp898z801f7sc3zl70241ld06lb")))
+   (base32 "17gvccv60mcpi8l9d83p4jh56vhwsv62blahz774kzyb40j8jsd4")
+   (base32 "049qgwx6njh139vzdhgyzpfbc58vqs66nbsyblq6vszqrz27kmki")))
 (define-public linux-libre-6.8-pristine-source
   (let ((version linux-libre-6.8-version)
-(hash (base32 "0xjirg2w5fc2w2q6wr702akszq32m31lk4q5nbjq10zqhbcr5fxh")))
+(hash (base32 "1di8kr596sf68sm61kp5rz6bn3sb0q5ag1qc5hm8f9dpyq4wv3dp")))
(make-linux-libre-source version
 (%upstream-linux-source version hash)
 deblob-scripts-6.8)))



03/10: gnu: linux-libre 6.9: Update to 6.9.2.

2024-05-25 Thread guix-commits
lfam pushed a commit to branch kernel-updates
in repository guix.

commit 90d938f41656e39c326c548468f224a3a4c03ae5
Author: Wilko Meyer 
AuthorDate: Sat May 25 19:12:50 2024 +0200

gnu: linux-libre 6.9: Update to 6.9.2.

* gnu/packages/linux.scm (linux-libre-6.9-version): Update to 6.9.2.
(linux-libre-6.9-pristine-source, deblob-scripts-6.9): Update hashes.

Change-Id: I05f07f0ad921bdbcbc1e7263d0751ac462a9365a
Signed-off-by: Leo Famulari 
---
 gnu/packages/linux.scm | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 6bea904512..e577c3790f 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -503,17 +503,17 @@ corresponding UPSTREAM-SOURCE (an origin), using the 
given DEBLOB-SCRIPTS."
 
 ;; The current "mainline" kernel.
 
-(define-public linux-libre-6.9-version "6.9.1")
+(define-public linux-libre-6.9-version "6.9.2")
 (define-public linux-libre-6.9-gnu-revision "gnu")
 (define deblob-scripts-6.9
   (linux-libre-deblob-scripts
linux-libre-6.9-version
linux-libre-6.9-gnu-revision
-   (base32 "1lzbn7v25473ggsjp6064ixhzir0y11h74hfxiav7zyjj64kvjiw")
-   (base32 "0a8ikg2b4q6xkd3pnzvd777ngrx74by7l13q7jg4n88myfxqk9xb")))
+   (base32 "1izfwmk0mxikx3bblcwiyrxdd4bg9v0jsph3i8gvrpjb7kw0lhna")
+   (base32 "0b8hsr0s4f3hps27bmd5qj1yknhd73q4zplr4v3lmq7sr57mgly6")))
 (define-public linux-libre-6.9-pristine-source
   (let ((version linux-libre-6.9-version)
-(hash (base32 "0jn0qp22vx7xf2mgaj7cwf8agqhahvrwlda4ak6rw67xk2x19d01")))
+(hash (base32 "1yg5j284y1gz7zwxjz2abvlnas259m1y1vzd9lmcqqar5kgmnv6l")))
(make-linux-libre-source version
 (%upstream-linux-source version hash)
 deblob-scripts-6.9)))



06/10: gnu: linux-libre 6.1: Update to 6.1.92.

2024-05-25 Thread guix-commits
lfam pushed a commit to branch kernel-updates
in repository guix.

commit 9768d790494094cf213564840ba17059df092758
Author: Wilko Meyer 
AuthorDate: Sat May 25 19:12:53 2024 +0200

gnu: linux-libre 6.1: Update to 6.1.92.

* gnu/packages/linux.scm (linux-libre-6.1-version): Update to 6.1.92.
(linux-libre-6.1-pristine-source): Update hash.

Change-Id: Ica9c1ad4e7505dd19dbf2e0852bad8550acec44d
Signed-off-by: Leo Famulari 
---
 gnu/packages/linux.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 63bbb027f9..01644eca2f 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -555,7 +555,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given 
DEBLOB-SCRIPTS."
 (%upstream-linux-source version hash)
 deblob-scripts-6.6)))
 
-(define-public linux-libre-6.1-version "6.1.91")
+(define-public linux-libre-6.1-version "6.1.92")
 (define-public linux-libre-6.1-gnu-revision "gnu")
 (define deblob-scripts-6.1
   (linux-libre-deblob-scripts
@@ -565,7 +565,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given 
DEBLOB-SCRIPTS."
(base32 "0nq8b6rnn031wl0qz7ahyfs3hcb0qsr7hzdmxi2g33ycsm9955lk")))
 (define-public linux-libre-6.1-pristine-source
   (let ((version linux-libre-6.1-version)
-(hash (base32 "1v2d5syxwwqlhvjzxk003qz9sr18r0n8dgg976vbi492r9iww2l8")))
+(hash (base32 "1j9n8gk76nn4gw42iba5zgghr360gb9n1mslr5dyv76wpwkz86ch")))
(make-linux-libre-source version
 (%upstream-linux-source version hash)
 deblob-scripts-6.1)))



02/10: gnu: linux-libre 6.9: Update to 6.9.1.

2024-05-25 Thread guix-commits
lfam pushed a commit to branch kernel-updates
in repository guix.

commit 4e0c8860aa9fe4a06c935fb916aac03ede39c055
Author: Wilko Meyer 
AuthorDate: Fri May 17 14:38:22 2024 +0200

gnu: linux-libre 6.9: Update to 6.9.1.

* gnu/packages/linux.scm (linux-libre-6.9-version): Update to 6.9.1.
(linux-libre-6.9-pristine-source): Update hash.

Change-Id: I9fc5ff4949e5676d8301df2363bf937b2e4767e5
Signed-off-by: Leo Famulari 
---
 gnu/packages/linux.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 153243b2c8..6bea904512 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -503,7 +503,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given 
DEBLOB-SCRIPTS."
 
 ;; The current "mainline" kernel.
 
-(define-public linux-libre-6.9-version "6.9")
+(define-public linux-libre-6.9-version "6.9.1")
 (define-public linux-libre-6.9-gnu-revision "gnu")
 (define deblob-scripts-6.9
   (linux-libre-deblob-scripts
@@ -513,7 +513,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given 
DEBLOB-SCRIPTS."
(base32 "0a8ikg2b4q6xkd3pnzvd777ngrx74by7l13q7jg4n88myfxqk9xb")))
 (define-public linux-libre-6.9-pristine-source
   (let ((version linux-libre-6.9-version)
-(hash (base32 "0jc14s7z2581qgd82lww25p7c4w72scpf49z8ll3wylwk3xh3yi4")))
+(hash (base32 "0jn0qp22vx7xf2mgaj7cwf8agqhahvrwlda4ak6rw67xk2x19d01")))
(make-linux-libre-source version
 (%upstream-linux-source version hash)
 deblob-scripts-6.9)))



branch kernel-updates created (now 0b418d079f)

2024-05-25 Thread guix-commits
lfam pushed a change to branch kernel-updates
in repository guix.

  at 0b418d079f gnu: linux-libre 4.19: Update to 4.19.315.

This branch includes the following new commits:

 new 972ede798e gnu: Add linux-libre 6.9.
 new 4e0c8860aa gnu: linux-libre 6.9: Update to 6.9.1.
 new 90d938f416 gnu: linux-libre 6.9: Update to 6.9.2.
 new 82b633aa0f gnu: linux-libre-6.8: Update to 6.8.11.
 new f219b99f2f gnu: linux-libre 6.6: Update to 6.6.32.
 new 9768d79049 gnu: linux-libre 6.1: Update to 6.1.92.
 new bb79f68ced gnu: linux-libre 5.15: Update to 5.15.160.
 new 22333db884 gnu: linux-libre 5.10: Update to 5.10.218.
 new d4ed9dd57c gnu: linux-libre 5.4: Update to 5.4.277.
 new 0b418d079f gnu: linux-libre 4.19: Update to 4.19.315.

The 10 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[clang] [clang-format]: Annotate colons found in inline assembly (PR #92617)

2024-05-25 Thread Owen Pan via cfe-commits

https://github.com/owenca approved this pull request.


https://github.com/llvm/llvm-project/pull/92617
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-25 Thread Chuanqi Xu via cfe-commits

https://github.com/ChuanqiXu9 edited 
https://github.com/llvm/llvm-project/pull/93388
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[Lldb-commits] [clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-25 Thread Chuanqi Xu via lldb-commits

https://github.com/ChuanqiXu9 edited 
https://github.com/llvm/llvm-project/pull/93388
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-25 Thread Chuanqi Xu via cfe-commits

https://github.com/ChuanqiXu9 requested changes to this pull request.

I don't like the PR since I don't feel it makes the code cleaner and it may 
make the downstream suffering backporting.

https://github.com/llvm/llvm-project/pull/93388
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[Lldb-commits] [clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-25 Thread Chuanqi Xu via lldb-commits

https://github.com/ChuanqiXu9 requested changes to this pull request.

I don't like the PR since I don't feel it makes the code cleaner and it may 
make the downstream suffering backporting.

https://github.com/llvm/llvm-project/pull/93388
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


branch kernel-updates deleted (was 0e24a7138a)

2024-05-25 Thread guix-commits
lfam pushed a change to branch kernel-updates
in repository guix.

 was 0e24a7138a gnu: linux-libre 6.9: Update to 6.9.1.

This change permanently discards the following revisions:

 discard 0e24a7138a gnu: linux-libre 6.9: Update to 6.9.1.
 discard ec59f4807b gnu: Add linux-libre 6.9.



[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions with no decl in source (PR #93394)

2024-05-25 Thread via cfe-commits

llvmbot wrote:




@llvm/pr-subscribers-clang

Author: Youngsuk Kim (JOE1994)


Changes

Fixes #93369

---
Full diff: https://github.com/llvm/llvm-project/pull/93394.diff


2 Files Affected:

- (modified) clang/lib/Sema/SemaLookup.cpp (+10) 
- (modified) clang/test/SemaCXX/invalid-if-constexpr.cpp (+1-1) 


``diff
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index ef0a655b631ab..348f9e5b8f530 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/lib/Sema/SemaLookup.cpp
@@ -5897,6 +5897,16 @@ void Sema::diagnoseTypo(const TypoCorrection ,
 
   NamedDecl *ChosenDecl =
   Correction.isKeyword() ? nullptr : Correction.getFoundDecl();
+
+  // For builtin functions which aren't declared anywhere in source,
+  // don't emit the "declared here" note.
+  if (auto *FD = dyn_cast_or_null(ChosenDecl);
+  FD && FD->getBuiltinID() &&
+  PrevNote.getDiagID() == diag::note_previous_decl &&
+  Correction.getCorrectionRange().getBegin() == FD->getBeginLoc()) {
+ChosenDecl = nullptr;
+  }
+
   if (PrevNote.getDiagID() && ChosenDecl)
 Diag(ChosenDecl->getLocation(), PrevNote)
   << CorrectedQuotedStr << (ErrorRecovery ? FixItHint() : FixTypo);
diff --git a/clang/test/SemaCXX/invalid-if-constexpr.cpp 
b/clang/test/SemaCXX/invalid-if-constexpr.cpp
index 7643c47488f05..16d422880e8a9 100644
--- a/clang/test/SemaCXX/invalid-if-constexpr.cpp
+++ b/clang/test/SemaCXX/invalid-if-constexpr.cpp
@@ -5,7 +5,7 @@ void similar() { // expected-note {{'similar' declared here}}
   if constexpr (similer<>) {} // expected-error {{use of undeclared identifier 
'similer'; did you mean 'similar'?}}
 }
 void a() { if constexpr (__adl_swap<>) {}} // expected-error{{use of 
undeclared identifier '__adl_swap'; did you mean '__sync_swap'?}} \
-   // expected-note {{'__sync_swap' 
declared here}}
+   // not-expected-note 
{{'__sync_swap' declared here}}
 
 int AA() { return true;} // expected-note {{'AA' declared here}}
 

``




https://github.com/llvm/llvm-project/pull/93394
_______
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions with no decl in source (PR #93394)

2024-05-25 Thread Youngsuk Kim via cfe-commits

https://github.com/JOE1994 edited 
https://github.com/llvm/llvm-project/pull/93394
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions with no decl in source (PR #93394)

2024-05-25 Thread Youngsuk Kim via cfe-commits

https://github.com/JOE1994 edited 
https://github.com/llvm/llvm-project/pull/93394
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions w… (PR #93394)

2024-05-25 Thread Youngsuk Kim via cfe-commits

https://github.com/JOE1994 created 
https://github.com/llvm/llvm-project/pull/93394

…ith no decl in source

Fixes #93369

>From 00c93043fca8f8a1f20634ea1b281c60926bd571 Mon Sep 17 00:00:00 2001
From: Youngsuk Kim 
Date: Sat, 25 May 2024 20:42:43 -0500
Subject: [PATCH] [clang][Sema] Don't emit 'declared here' note for builtin
 functions with no decl in source

Fixes #93369
---
 clang/lib/Sema/SemaLookup.cpp   | 10 ++
 clang/test/SemaCXX/invalid-if-constexpr.cpp |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index ef0a655b631ab..348f9e5b8f530 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/lib/Sema/SemaLookup.cpp
@@ -5897,6 +5897,16 @@ void Sema::diagnoseTypo(const TypoCorrection ,
 
   NamedDecl *ChosenDecl =
   Correction.isKeyword() ? nullptr : Correction.getFoundDecl();
+
+  // For builtin functions which aren't declared anywhere in source,
+  // don't emit the "declared here" note.
+  if (auto *FD = dyn_cast_or_null(ChosenDecl);
+  FD && FD->getBuiltinID() &&
+  PrevNote.getDiagID() == diag::note_previous_decl &&
+  Correction.getCorrectionRange().getBegin() == FD->getBeginLoc()) {
+ChosenDecl = nullptr;
+  }
+
   if (PrevNote.getDiagID() && ChosenDecl)
 Diag(ChosenDecl->getLocation(), PrevNote)
   << CorrectedQuotedStr << (ErrorRecovery ? FixItHint() : FixTypo);
diff --git a/clang/test/SemaCXX/invalid-if-constexpr.cpp 
b/clang/test/SemaCXX/invalid-if-constexpr.cpp
index 7643c47488f05..16d422880e8a9 100644
--- a/clang/test/SemaCXX/invalid-if-constexpr.cpp
+++ b/clang/test/SemaCXX/invalid-if-constexpr.cpp
@@ -5,7 +5,7 @@ void similar() { // expected-note {{'similar' declared here}}
   if constexpr (similer<>) {} // expected-error {{use of undeclared identifier 
'similer'; did you mean 'similar'?}}
 }
 void a() { if constexpr (__adl_swap<>) {}} // expected-error{{use of 
undeclared identifier '__adl_swap'; did you mean '__sync_swap'?}} \
-   // expected-note {{'__sync_swap' 
declared here}}
+   // not-expected-note 
{{'__sync_swap' declared here}}
 
 int AA() { return true;} // expected-note {{'AA' declared here}}
 

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


branch master updated: configure.ac: Set default value for the 'prefix' variable.

2024-05-25 Thread guix-commits
This is an automated email from the git hooks/post-receive script.

apteryx pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
 new 1036f0 configure.ac: Set default value for the 'prefix' variable.
1036f0 is described below

commit 1036f0970083c146b709d792d128f4235125
Author: Maxim Cournoyer 
AuthorDate: Fri May 17 15:06:02 2024 -0400

configure.ac: Set default value for the 'prefix' variable.

The Guix standard configuration uses a localstatedir of /var and a 
sysconfdir
of /etc.  To ease things for everyone, make the default values match that
standard expected configuration.  See
 for a
related discussion.

* configure.ac: Default $prefix to '' unless already set.
* doc/contributing.texi (Building from Git): Streamline doc.
* doc/guix-cookbook.texi (Guix environment via direnv): Likewise.

Reviewed-by: Ludovic Courtès 
Change-Id: I23cd12b58a842d246fbc9fdc740311c573eb0212
---
 configure.ac   |  8 +---
 doc/contributing.texi  | 15 +--
 doc/guix-cookbook.texi |  2 +-
 3 files changed, 7 insertions(+), 18 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8c3a06da37..c7b61d56a7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,9 +73,11 @@ AC_ARG_ENABLE([daemon],
   [guix_build_daemon="$enableval"],
   [guix_build_daemon="yes"])
 
-# Prepare a version of $localstatedir & co. that does not contain references
-# to shell variables.
-guix_prefix="`eval echo $prefix | sed -e"s|NONE|/usr/local|g"`"
+dnl Prepare a version of $localstatedir & co. that does not contain references
+dnl to shell variables.  Also set some sane default directory variables for
+dnl use with the Guix.  This also causes localstatedir to be /var and
+dnl sysconfdir to be /etc.
+test "$prefix" = NONE && prefix=
 guix_localstatedir="`eval echo $localstatedir | sed -e 
"s|NONE|$guix_prefix|g"`"
 guix_sysconfdir="`eval echo $sysconfdir | sed -e "s|NONE|$guix_prefix|g"`"
 guix_sbindir="`eval echo $sbindir | sed -e "s|NONE|$guix_prefix|g"`"
diff --git a/doc/contributing.texi b/doc/contributing.texi
index a0d6b5304a..b8adc169d8 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -235,7 +235,7 @@ more information.
 Then, run:
 
 @example
-./configure --localstatedir=/var --sysconfdir=/etc
+./configure
 @end example
 
 @noindent
@@ -246,19 +246,6 @@ normal @code{sysconfdir} value.  Note that you will 
probably not run
 important to pass the right @code{localstatedir} and @code{sysconfdir}
 values, which get recorded in the @code{(guix config)} Guile module.
 
-When configuring Guix on a system that already has a Guix installation,
-be sure to specify the same state directory as the existing installation
-using the @option{--localstatedir} option of the @command{configure}
-script (@pxref{Directory Variables, @code{localstatedir},, standards,
-GNU Coding Standards}).  Usually, this @var{localstatedir} option is set
-to the value @file{/var}.  The @command{configure} script protects
-against unintended misconfiguration of @var{localstatedir} so you do not
-inadvertently corrupt your store (@pxref{The Store}).  The configuration
-directory should also be configured by setting the @option{--sysconfdir}
-option to the @file{/etc} value, which is the location used by Guix to
-store for example the access control list of authorized machines and the
-definition of offload machines.
-
 Finally, you can build Guix and, if you feel so inclined, run the tests
 (@pxref{Running the Test Suite}):
 
diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi
index 6b6f5460c3..93874489c2 100644
--- a/doc/guix-cookbook.texi
+++ b/doc/guix-cookbook.texi
@@ -5093,7 +5093,7 @@ use_guix()
 # Predefine configure flags.
 configure()
 @{
-./configure --localstatedir=/var --prefix=
+./configure
 @}
 export_function configure
 



[clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-25 Thread David Stone via cfe-commits

https://github.com/davidstone updated 
https://github.com/llvm/llvm-project/pull/93388

>From 0933b8e0f3161c0037516f677f1de2e72811d921 Mon Sep 17 00:00:00 2001
From: David Stone 
Date: Sat, 25 May 2024 14:13:30 -0600
Subject: [PATCH 1/5] [clang][Modules] Move `ASTSourceDescriptor` into its own
 file

---
 .../include/clang/Basic/ASTSourceDescriptor.h | 52 +++
 clang/include/clang/Basic/Module.h| 26 --
 clang/lib/AST/ExternalASTSource.cpp   |  2 +-
 clang/lib/Basic/ASTSourceDescriptor.cpp   | 33 
 clang/lib/Basic/CMakeLists.txt|  1 +
 clang/lib/Basic/Module.cpp| 15 --
 clang/lib/CodeGen/CGDebugInfo.h   |  3 +-
 clang/lib/Serialization/ASTReader.cpp |  1 +
 .../Plugins/ExpressionParser/Clang/ASTUtils.h |  8 ++-
 .../Clang/ClangExternalASTSourceCallbacks.cpp |  1 +
 .../Clang/ClangExternalASTSourceCallbacks.h   |  8 ++-
 11 files changed, 105 insertions(+), 45 deletions(-)
 create mode 100644 clang/include/clang/Basic/ASTSourceDescriptor.h
 create mode 100644 clang/lib/Basic/ASTSourceDescriptor.cpp

diff --git a/clang/include/clang/Basic/ASTSourceDescriptor.h 
b/clang/include/clang/Basic/ASTSourceDescriptor.h
new file mode 100644
index 0..175e0551db765
--- /dev/null
+++ b/clang/include/clang/Basic/ASTSourceDescriptor.h
@@ -0,0 +1,52 @@
+//===- ASTSourceDescriptor.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: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+//
+/// \file
+/// Defines the clang::ASTSourceDescriptor class, which abstracts clang modules
+/// and precompiled header files
+//
+//===--===//
+
+#ifndef LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
+#define LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
+
+#include "clang/Basic/Module.h"
+#include "llvm/ADT/StringRef.h"
+#include 
+#include 
+
+namespace clang {
+
+/// Abstracts clang modules and precompiled header files and holds
+/// everything needed to generate debug info for an imported module
+/// or PCH.
+class ASTSourceDescriptor {
+  StringRef PCHModuleName;
+  StringRef Path;
+  StringRef ASTFile;
+  ASTFileSignature Signature;
+  Module *ClangModule = nullptr;
+
+public:
+  ASTSourceDescriptor() = default;
+  ASTSourceDescriptor(StringRef Name, StringRef Path, StringRef ASTFile,
+  ASTFileSignature Signature)
+  : PCHModuleName(std::move(Name)), Path(std::move(Path)),
+ASTFile(std::move(ASTFile)), Signature(Signature) {}
+  ASTSourceDescriptor(Module );
+
+  std::string getModuleName() const;
+  StringRef getPath() const { return Path; }
+  StringRef getASTFile() const { return ASTFile; }
+  ASTFileSignature getSignature() const { return Signature; }
+  Module *getModuleOrNull() const { return ClangModule; }
+};
+
+} // namespace clang
+
+#endif // LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
diff --git a/clang/include/clang/Basic/Module.h 
b/clang/include/clang/Basic/Module.h
index 2d62d05cd9190..e86f4303d732b 100644
--- a/clang/include/clang/Basic/Module.h
+++ b/clang/include/clang/Basic/Module.h
@@ -868,32 +868,6 @@ class VisibleModuleSet {
   unsigned Generation = 0;
 };
 
-/// Abstracts clang modules and precompiled header files and holds
-/// everything needed to generate debug info for an imported module
-/// or PCH.
-class ASTSourceDescriptor {
-  StringRef PCHModuleName;
-  StringRef Path;
-  StringRef ASTFile;
-  ASTFileSignature Signature;
-  Module *ClangModule = nullptr;
-
-public:
-  ASTSourceDescriptor() = default;
-  ASTSourceDescriptor(StringRef Name, StringRef Path, StringRef ASTFile,
-  ASTFileSignature Signature)
-  : PCHModuleName(std::move(Name)), Path(std::move(Path)),
-ASTFile(std::move(ASTFile)), Signature(Signature) {}
-  ASTSourceDescriptor(Module );
-
-  std::string getModuleName() const;
-  StringRef getPath() const { return Path; }
-  StringRef getASTFile() const { return ASTFile; }
-  ASTFileSignature getSignature() const { return Signature; }
-  Module *getModuleOrNull() const { return ClangModule; }
-};
-
-
 } // namespace clang
 
 #endif // LLVM_CLANG_BASIC_MODULE_H
diff --git a/clang/lib/AST/ExternalASTSource.cpp 
b/clang/lib/AST/ExternalASTSource.cpp
index e96a474968511..a5b6f80bde694 100644
--- a/clang/lib/AST/ExternalASTSource.cpp
+++ b/clang/lib/AST/ExternalASTSource.cpp
@@ -15,10 +15,10 @@
 #include "clang/AST/ExternalASTSource.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclarationName.h"
+#include "clang/Basic/ASTSourceDescriptor.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/IdentifierTable.h"
 #include "clang/Basic/LLVM.h"
-#include "clang/Basic/Module.h"
 #include 

[Lldb-commits] [clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-25 Thread David Stone via lldb-commits

https://github.com/davidstone updated 
https://github.com/llvm/llvm-project/pull/93388

>From 0933b8e0f3161c0037516f677f1de2e72811d921 Mon Sep 17 00:00:00 2001
From: David Stone 
Date: Sat, 25 May 2024 14:13:30 -0600
Subject: [PATCH 1/5] [clang][Modules] Move `ASTSourceDescriptor` into its own
 file

---
 .../include/clang/Basic/ASTSourceDescriptor.h | 52 +++
 clang/include/clang/Basic/Module.h| 26 --
 clang/lib/AST/ExternalASTSource.cpp   |  2 +-
 clang/lib/Basic/ASTSourceDescriptor.cpp   | 33 
 clang/lib/Basic/CMakeLists.txt|  1 +
 clang/lib/Basic/Module.cpp| 15 --
 clang/lib/CodeGen/CGDebugInfo.h   |  3 +-
 clang/lib/Serialization/ASTReader.cpp |  1 +
 .../Plugins/ExpressionParser/Clang/ASTUtils.h |  8 ++-
 .../Clang/ClangExternalASTSourceCallbacks.cpp |  1 +
 .../Clang/ClangExternalASTSourceCallbacks.h   |  8 ++-
 11 files changed, 105 insertions(+), 45 deletions(-)
 create mode 100644 clang/include/clang/Basic/ASTSourceDescriptor.h
 create mode 100644 clang/lib/Basic/ASTSourceDescriptor.cpp

diff --git a/clang/include/clang/Basic/ASTSourceDescriptor.h 
b/clang/include/clang/Basic/ASTSourceDescriptor.h
new file mode 100644
index 0..175e0551db765
--- /dev/null
+++ b/clang/include/clang/Basic/ASTSourceDescriptor.h
@@ -0,0 +1,52 @@
+//===- ASTSourceDescriptor.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: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+//
+/// \file
+/// Defines the clang::ASTSourceDescriptor class, which abstracts clang modules
+/// and precompiled header files
+//
+//===--===//
+
+#ifndef LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
+#define LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
+
+#include "clang/Basic/Module.h"
+#include "llvm/ADT/StringRef.h"
+#include 
+#include 
+
+namespace clang {
+
+/// Abstracts clang modules and precompiled header files and holds
+/// everything needed to generate debug info for an imported module
+/// or PCH.
+class ASTSourceDescriptor {
+  StringRef PCHModuleName;
+  StringRef Path;
+  StringRef ASTFile;
+  ASTFileSignature Signature;
+  Module *ClangModule = nullptr;
+
+public:
+  ASTSourceDescriptor() = default;
+  ASTSourceDescriptor(StringRef Name, StringRef Path, StringRef ASTFile,
+  ASTFileSignature Signature)
+  : PCHModuleName(std::move(Name)), Path(std::move(Path)),
+ASTFile(std::move(ASTFile)), Signature(Signature) {}
+  ASTSourceDescriptor(Module );
+
+  std::string getModuleName() const;
+  StringRef getPath() const { return Path; }
+  StringRef getASTFile() const { return ASTFile; }
+  ASTFileSignature getSignature() const { return Signature; }
+  Module *getModuleOrNull() const { return ClangModule; }
+};
+
+} // namespace clang
+
+#endif // LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
diff --git a/clang/include/clang/Basic/Module.h 
b/clang/include/clang/Basic/Module.h
index 2d62d05cd9190..e86f4303d732b 100644
--- a/clang/include/clang/Basic/Module.h
+++ b/clang/include/clang/Basic/Module.h
@@ -868,32 +868,6 @@ class VisibleModuleSet {
   unsigned Generation = 0;
 };
 
-/// Abstracts clang modules and precompiled header files and holds
-/// everything needed to generate debug info for an imported module
-/// or PCH.
-class ASTSourceDescriptor {
-  StringRef PCHModuleName;
-  StringRef Path;
-  StringRef ASTFile;
-  ASTFileSignature Signature;
-  Module *ClangModule = nullptr;
-
-public:
-  ASTSourceDescriptor() = default;
-  ASTSourceDescriptor(StringRef Name, StringRef Path, StringRef ASTFile,
-  ASTFileSignature Signature)
-  : PCHModuleName(std::move(Name)), Path(std::move(Path)),
-ASTFile(std::move(ASTFile)), Signature(Signature) {}
-  ASTSourceDescriptor(Module );
-
-  std::string getModuleName() const;
-  StringRef getPath() const { return Path; }
-  StringRef getASTFile() const { return ASTFile; }
-  ASTFileSignature getSignature() const { return Signature; }
-  Module *getModuleOrNull() const { return ClangModule; }
-};
-
-
 } // namespace clang
 
 #endif // LLVM_CLANG_BASIC_MODULE_H
diff --git a/clang/lib/AST/ExternalASTSource.cpp 
b/clang/lib/AST/ExternalASTSource.cpp
index e96a474968511..a5b6f80bde694 100644
--- a/clang/lib/AST/ExternalASTSource.cpp
+++ b/clang/lib/AST/ExternalASTSource.cpp
@@ -15,10 +15,10 @@
 #include "clang/AST/ExternalASTSource.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclarationName.h"
+#include "clang/Basic/ASTSourceDescriptor.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/IdentifierTable.h"
 #include "clang/Basic/LLVM.h"
-#include "clang/Basic/Module.h"
 #include 

[clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-25 Thread David Stone via cfe-commits

https://github.com/davidstone updated 
https://github.com/llvm/llvm-project/pull/93388

>From 0933b8e0f3161c0037516f677f1de2e72811d921 Mon Sep 17 00:00:00 2001
From: David Stone 
Date: Sat, 25 May 2024 14:13:30 -0600
Subject: [PATCH 1/4] [clang][Modules] Move `ASTSourceDescriptor` into its own
 file

---
 .../include/clang/Basic/ASTSourceDescriptor.h | 52 +++
 clang/include/clang/Basic/Module.h| 26 --
 clang/lib/AST/ExternalASTSource.cpp   |  2 +-
 clang/lib/Basic/ASTSourceDescriptor.cpp   | 33 
 clang/lib/Basic/CMakeLists.txt|  1 +
 clang/lib/Basic/Module.cpp| 15 --
 clang/lib/CodeGen/CGDebugInfo.h   |  3 +-
 clang/lib/Serialization/ASTReader.cpp |  1 +
 .../Plugins/ExpressionParser/Clang/ASTUtils.h |  8 ++-
 .../Clang/ClangExternalASTSourceCallbacks.cpp |  1 +
 .../Clang/ClangExternalASTSourceCallbacks.h   |  8 ++-
 11 files changed, 105 insertions(+), 45 deletions(-)
 create mode 100644 clang/include/clang/Basic/ASTSourceDescriptor.h
 create mode 100644 clang/lib/Basic/ASTSourceDescriptor.cpp

diff --git a/clang/include/clang/Basic/ASTSourceDescriptor.h 
b/clang/include/clang/Basic/ASTSourceDescriptor.h
new file mode 100644
index 0..175e0551db765
--- /dev/null
+++ b/clang/include/clang/Basic/ASTSourceDescriptor.h
@@ -0,0 +1,52 @@
+//===- ASTSourceDescriptor.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: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+//
+/// \file
+/// Defines the clang::ASTSourceDescriptor class, which abstracts clang modules
+/// and precompiled header files
+//
+//===--===//
+
+#ifndef LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
+#define LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
+
+#include "clang/Basic/Module.h"
+#include "llvm/ADT/StringRef.h"
+#include 
+#include 
+
+namespace clang {
+
+/// Abstracts clang modules and precompiled header files and holds
+/// everything needed to generate debug info for an imported module
+/// or PCH.
+class ASTSourceDescriptor {
+  StringRef PCHModuleName;
+  StringRef Path;
+  StringRef ASTFile;
+  ASTFileSignature Signature;
+  Module *ClangModule = nullptr;
+
+public:
+  ASTSourceDescriptor() = default;
+  ASTSourceDescriptor(StringRef Name, StringRef Path, StringRef ASTFile,
+  ASTFileSignature Signature)
+  : PCHModuleName(std::move(Name)), Path(std::move(Path)),
+ASTFile(std::move(ASTFile)), Signature(Signature) {}
+  ASTSourceDescriptor(Module );
+
+  std::string getModuleName() const;
+  StringRef getPath() const { return Path; }
+  StringRef getASTFile() const { return ASTFile; }
+  ASTFileSignature getSignature() const { return Signature; }
+  Module *getModuleOrNull() const { return ClangModule; }
+};
+
+} // namespace clang
+
+#endif // LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
diff --git a/clang/include/clang/Basic/Module.h 
b/clang/include/clang/Basic/Module.h
index 2d62d05cd9190..e86f4303d732b 100644
--- a/clang/include/clang/Basic/Module.h
+++ b/clang/include/clang/Basic/Module.h
@@ -868,32 +868,6 @@ class VisibleModuleSet {
   unsigned Generation = 0;
 };
 
-/// Abstracts clang modules and precompiled header files and holds
-/// everything needed to generate debug info for an imported module
-/// or PCH.
-class ASTSourceDescriptor {
-  StringRef PCHModuleName;
-  StringRef Path;
-  StringRef ASTFile;
-  ASTFileSignature Signature;
-  Module *ClangModule = nullptr;
-
-public:
-  ASTSourceDescriptor() = default;
-  ASTSourceDescriptor(StringRef Name, StringRef Path, StringRef ASTFile,
-  ASTFileSignature Signature)
-  : PCHModuleName(std::move(Name)), Path(std::move(Path)),
-ASTFile(std::move(ASTFile)), Signature(Signature) {}
-  ASTSourceDescriptor(Module );
-
-  std::string getModuleName() const;
-  StringRef getPath() const { return Path; }
-  StringRef getASTFile() const { return ASTFile; }
-  ASTFileSignature getSignature() const { return Signature; }
-  Module *getModuleOrNull() const { return ClangModule; }
-};
-
-
 } // namespace clang
 
 #endif // LLVM_CLANG_BASIC_MODULE_H
diff --git a/clang/lib/AST/ExternalASTSource.cpp 
b/clang/lib/AST/ExternalASTSource.cpp
index e96a474968511..a5b6f80bde694 100644
--- a/clang/lib/AST/ExternalASTSource.cpp
+++ b/clang/lib/AST/ExternalASTSource.cpp
@@ -15,10 +15,10 @@
 #include "clang/AST/ExternalASTSource.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclarationName.h"
+#include "clang/Basic/ASTSourceDescriptor.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/IdentifierTable.h"
 #include "clang/Basic/LLVM.h"
-#include "clang/Basic/Module.h"
 #include 

[Lldb-commits] [clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-25 Thread David Stone via lldb-commits

https://github.com/davidstone updated 
https://github.com/llvm/llvm-project/pull/93388

>From 0933b8e0f3161c0037516f677f1de2e72811d921 Mon Sep 17 00:00:00 2001
From: David Stone 
Date: Sat, 25 May 2024 14:13:30 -0600
Subject: [PATCH 1/4] [clang][Modules] Move `ASTSourceDescriptor` into its own
 file

---
 .../include/clang/Basic/ASTSourceDescriptor.h | 52 +++
 clang/include/clang/Basic/Module.h| 26 --
 clang/lib/AST/ExternalASTSource.cpp   |  2 +-
 clang/lib/Basic/ASTSourceDescriptor.cpp   | 33 
 clang/lib/Basic/CMakeLists.txt|  1 +
 clang/lib/Basic/Module.cpp| 15 --
 clang/lib/CodeGen/CGDebugInfo.h   |  3 +-
 clang/lib/Serialization/ASTReader.cpp |  1 +
 .../Plugins/ExpressionParser/Clang/ASTUtils.h |  8 ++-
 .../Clang/ClangExternalASTSourceCallbacks.cpp |  1 +
 .../Clang/ClangExternalASTSourceCallbacks.h   |  8 ++-
 11 files changed, 105 insertions(+), 45 deletions(-)
 create mode 100644 clang/include/clang/Basic/ASTSourceDescriptor.h
 create mode 100644 clang/lib/Basic/ASTSourceDescriptor.cpp

diff --git a/clang/include/clang/Basic/ASTSourceDescriptor.h 
b/clang/include/clang/Basic/ASTSourceDescriptor.h
new file mode 100644
index 0..175e0551db765
--- /dev/null
+++ b/clang/include/clang/Basic/ASTSourceDescriptor.h
@@ -0,0 +1,52 @@
+//===- ASTSourceDescriptor.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: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+//
+/// \file
+/// Defines the clang::ASTSourceDescriptor class, which abstracts clang modules
+/// and precompiled header files
+//
+//===--===//
+
+#ifndef LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
+#define LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
+
+#include "clang/Basic/Module.h"
+#include "llvm/ADT/StringRef.h"
+#include 
+#include 
+
+namespace clang {
+
+/// Abstracts clang modules and precompiled header files and holds
+/// everything needed to generate debug info for an imported module
+/// or PCH.
+class ASTSourceDescriptor {
+  StringRef PCHModuleName;
+  StringRef Path;
+  StringRef ASTFile;
+  ASTFileSignature Signature;
+  Module *ClangModule = nullptr;
+
+public:
+  ASTSourceDescriptor() = default;
+  ASTSourceDescriptor(StringRef Name, StringRef Path, StringRef ASTFile,
+  ASTFileSignature Signature)
+  : PCHModuleName(std::move(Name)), Path(std::move(Path)),
+ASTFile(std::move(ASTFile)), Signature(Signature) {}
+  ASTSourceDescriptor(Module );
+
+  std::string getModuleName() const;
+  StringRef getPath() const { return Path; }
+  StringRef getASTFile() const { return ASTFile; }
+  ASTFileSignature getSignature() const { return Signature; }
+  Module *getModuleOrNull() const { return ClangModule; }
+};
+
+} // namespace clang
+
+#endif // LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
diff --git a/clang/include/clang/Basic/Module.h 
b/clang/include/clang/Basic/Module.h
index 2d62d05cd9190..e86f4303d732b 100644
--- a/clang/include/clang/Basic/Module.h
+++ b/clang/include/clang/Basic/Module.h
@@ -868,32 +868,6 @@ class VisibleModuleSet {
   unsigned Generation = 0;
 };
 
-/// Abstracts clang modules and precompiled header files and holds
-/// everything needed to generate debug info for an imported module
-/// or PCH.
-class ASTSourceDescriptor {
-  StringRef PCHModuleName;
-  StringRef Path;
-  StringRef ASTFile;
-  ASTFileSignature Signature;
-  Module *ClangModule = nullptr;
-
-public:
-  ASTSourceDescriptor() = default;
-  ASTSourceDescriptor(StringRef Name, StringRef Path, StringRef ASTFile,
-  ASTFileSignature Signature)
-  : PCHModuleName(std::move(Name)), Path(std::move(Path)),
-ASTFile(std::move(ASTFile)), Signature(Signature) {}
-  ASTSourceDescriptor(Module );
-
-  std::string getModuleName() const;
-  StringRef getPath() const { return Path; }
-  StringRef getASTFile() const { return ASTFile; }
-  ASTFileSignature getSignature() const { return Signature; }
-  Module *getModuleOrNull() const { return ClangModule; }
-};
-
-
 } // namespace clang
 
 #endif // LLVM_CLANG_BASIC_MODULE_H
diff --git a/clang/lib/AST/ExternalASTSource.cpp 
b/clang/lib/AST/ExternalASTSource.cpp
index e96a474968511..a5b6f80bde694 100644
--- a/clang/lib/AST/ExternalASTSource.cpp
+++ b/clang/lib/AST/ExternalASTSource.cpp
@@ -15,10 +15,10 @@
 #include "clang/AST/ExternalASTSource.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclarationName.h"
+#include "clang/Basic/ASTSourceDescriptor.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/IdentifierTable.h"
 #include "clang/Basic/LLVM.h"
-#include "clang/Basic/Module.h"
 #include 

[Qemu-commits] [qemu/qemu] c2bf2c: configure: move -mcx16 flag out of CPU_CFLAGS

2024-05-25 Thread Richard Henderson via Qemu-commits
 M ui/meson.build

  Log Message:
  ---
  Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging

Build system and target/i386/translate.c cleanups

# -BEGIN PGP SIGNATURE-
#
# iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmZRy1gUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroMTtQf/ZQskuqZyTrDhB/uVUT8oT5JNKQNS
# GbFSgDK7jDdBeU3UmoYrlx9vfFR/mH5cA88MlusUy0SjQBNo4onD725o6Vvum/LW
# DPe5ZyE34wvOasM7KXqJsD+2SttjaVjCXN4ip+E9WL5By2TWJgrk6IgTtvAhT9cd
# LWb5OEIInaq7ZiWz3EpjmGvZd0M4mxqXi5OeDvmoFyf38xElfbWZWbfhJv+H5L1X
# stivPBtUbXOzh63NL491hUYQtiAWlow8Qcnn7CYRflb6Vdd4QPK+6W8FX5KyU2eC
# bXRXloW7wjEAC9pyiVky1SCvtNg7AVFL+9kxwiGreoZfo+/IMA+NP6pGOg==
# =hpWy
# -END PGP SIGNATURE-
# gpg: Signature made Sat 25 May 2024 04:28:24 AM PDT
# gpg:using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:issuer "pbonz...@redhat.com"
# gpg: Good signature from "Paolo Bonzini " [full]
# gpg: aka "Paolo Bonzini " [full]

* tag 'for-upstream' of https://gitlab.com/bonzini/qemu: (24 commits)
  migration: remove unnecessary zlib dependency
  meson: do not query modules before they are processed
  tcg: include dependencies in static_library()
  meson: remove unnecessary dependency
  meson: remove unnecessary reference to libm
  target/i386: remove aflag argument of gen_lea_v_seg
  target/i386: clean up repeated string operations
  target/i386: introduce gen_lea_ss_ofs
  target/i386: use mo_stacksize more
  target/i386: inline gen_add_A0_ds_seg
  target/i386: split gen_ldst_modrm for load and store
  target/i386: reg in gen_ldst_modrm is always OR_TMP0
  target/i386: raze the gen_eob* jungle
  target/i386: assert that gen_update_eip_cur and gen_update_eip_next are the 
same in tb_stop
  target/i386: avoid calling gen_eob_inhibit_irq before tb_stop
  target/i386: avoid calling gen_eob_syscall before tb_stop
  target/i386: document and group DISAS_* constants
  target/i386: set CC_OP in helpers if they want CC_OP_EFLAGS
  target/i386: cpu_load_eflags already sets cc_op
  target/i386: remove unnecessary gen_update_cc_op before gen_eob*
  ...

Signed-off-by: Richard Henderson 


Compare: https://github.com/qemu/qemu/compare/ffdd099a7825...78ef97c0aa6c

To unsubscribe from these emails, change your notification settings at 
https://github.com/qemu/qemu/settings/notifications



[clang] [webkit.RefCntblBaseVirtualDtor] Allow CRTP classes without a virtual destructor. (PR #92837)

2024-05-25 Thread NAKAMURA Takumi via cfe-commits


@@ -11,16 +11,116 @@
 #include "PtrTypesSemantics.h"
 #include "clang/AST/CXXInheritance.h"
 #include "clang/AST/RecursiveASTVisitor.h"
+#include "clang/AST/StmtVisitor.h"
 #include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
 #include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h"
 #include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
 #include "clang/StaticAnalyzer/Core/Checker.h"
+#include "llvm/ADT/DenseSet.h"
+#include "llvm/ADT/SetVector.h"
 #include 
 
 using namespace clang;
 using namespace ento;
 
 namespace {
+
+class DerefFuncDeleteExprVisitor
+: public ConstStmtVisitor {
+  // Returns true if any of child statements return true.
+  bool VisitChildren(const Stmt *S) {
+for (const Stmt *Child : S->children()) {
+  if (Child && Visit(Child))
+return true;
+}
+return false;
+  }
+
+  bool VisitBody(const Stmt *Body) {
+if (!Body)
+  return false;
+
+auto [It, IsNew] = VisitedBody.insert(Body);
+if (!IsNew) // This body is recursive
+  return false;
+
+return Visit(Body);
+  }
+
+public:
+  DerefFuncDeleteExprVisitor(const TemplateArgumentList ,
+ const CXXRecordDecl *ClassDecl)
+  : ArgList(), ClassDecl(ClassDecl) {}
+
+  DerefFuncDeleteExprVisitor(const CXXRecordDecl *ClassDecl)
+  : ClassDecl(ClassDecl) {}
+
+  std::optional HasSpecializedDelete(CXXMethodDecl *Decl) {
+if (auto *Body = Decl->getBody())
+  return VisitBody(Body);
+if (auto *Tmpl = Decl->getTemplateInstantiationPattern())

chapuni wrote:

This causes a warning.

```
clang/lib/StaticAnalyzer/Checkers/WebKit/RefCntblBaseVirtualDtorChecker.cpp:61:15:
 warning: variable 'Tmpl' set but not used [-Wunused-but-set-variable]
```

https://github.com/llvm/llvm-project/pull/92837
_______
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-25 Thread via cfe-commits
st {
-  print(llvm::errs(), 0, true);
-}
+LLVM_DUMP_METHOD void Module::dump() const { print(llvm::errs(), 0, true); }
 
 void VisibleModuleSet::setVisible(Module *M, SourceLocation Loc,
   VisibleCallback Vis, ConflictCallback Cb) {
@@ -715,7 +714,7 @@ void VisibleModuleSet::setVisible(Module *M, SourceLocation 
Loc,
 
 for (auto  : V.M->Conflicts) {
   if (isVisible(C.Other)) {
-llvm::SmallVector Path;
+llvm::SmallVector Path;
 for (Visiting *I =  I; I = I->ExportedBy)
   Path.push_back(I->M);
 Cb(Path, C.Other, C.Message);
diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h
index 530c5eeedb..7a767508b0 100644
--- a/clang/lib/CodeGen/CGDebugInfo.h
+++ b/clang/lib/CodeGen/CGDebugInfo.h
@@ -20,8 +20,8 @@
 #include "clang/AST/PrettyPrinter.h"
 #include "clang/AST/Type.h"
 #include "clang/AST/TypeOrdering.h"
-#include "clang/Basic/Module/ASTSourceDescriptor.h"
 #include "clang/Basic/CodeGenOptions.h"
+#include "clang/Basic/Module/ASTSourceDescriptor.h"
 #include "clang/Basic/SourceLocation.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/DenseSet.h"
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp
index de930f8dab..ad49de7cde 100644
--- a/clang/lib/Lex/HeaderSearch.cpp
+++ b/clang/lib/Lex/HeaderSearch.cpp
@@ -25,11 +25,11 @@
 #include "clang/Lex/Preprocessor.h"
 #include "llvm/ADT/APInt.h"
 #include "llvm/ADT/Hashing.h"
+#include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/ADT/StringRef.h"
-#include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/Capacity.h"
 #include "llvm/Support/Errc.h"
diff --git a/clang/lib/Serialization/ASTReader.cpp 
b/clang/lib/Serialization/ASTReader.cpp
index d596082d21..95a62095d4 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -40,7 +40,6 @@
 #include "clang/AST/TypeLoc.h"
 #include "clang/AST/TypeLocVisitor.h"
 #include "clang/AST/UnresolvedSet.h"
-#include "clang/Basic/Module/ASTSourceDescriptor.h"
 #include "clang/Basic/CommentOptions.h"
 #include "clang/Basic/Diagnostic.h"
 #include "clang/Basic/DiagnosticError.h"
@@ -52,6 +51,7 @@
 #include "clang/Basic/IdentifierTable.h"
 #include "clang/Basic/LLVM.h"
 #include "clang/Basic/LangOptions.h"
+#include "clang/Basic/Module/ASTSourceDescriptor.h"
 #include "clang/Basic/Module/Module.h"
 #include "clang/Basic/ObjCRuntime.h"
 #include "clang/Basic/OpenACCKinds.h"

``




https://github.com/llvm/llvm-project/pull/93388
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[Lldb-commits] [clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-25 Thread via lldb-commits
st {
-  print(llvm::errs(), 0, true);
-}
+LLVM_DUMP_METHOD void Module::dump() const { print(llvm::errs(), 0, true); }
 
 void VisibleModuleSet::setVisible(Module *M, SourceLocation Loc,
   VisibleCallback Vis, ConflictCallback Cb) {
@@ -715,7 +714,7 @@ void VisibleModuleSet::setVisible(Module *M, SourceLocation 
Loc,
 
 for (auto  : V.M->Conflicts) {
   if (isVisible(C.Other)) {
-llvm::SmallVector Path;
+llvm::SmallVector Path;
 for (Visiting *I =  I; I = I->ExportedBy)
   Path.push_back(I->M);
 Cb(Path, C.Other, C.Message);
diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h
index 530c5eeedb..7a767508b0 100644
--- a/clang/lib/CodeGen/CGDebugInfo.h
+++ b/clang/lib/CodeGen/CGDebugInfo.h
@@ -20,8 +20,8 @@
 #include "clang/AST/PrettyPrinter.h"
 #include "clang/AST/Type.h"
 #include "clang/AST/TypeOrdering.h"
-#include "clang/Basic/Module/ASTSourceDescriptor.h"
 #include "clang/Basic/CodeGenOptions.h"
+#include "clang/Basic/Module/ASTSourceDescriptor.h"
 #include "clang/Basic/SourceLocation.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/DenseSet.h"
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp
index de930f8dab..ad49de7cde 100644
--- a/clang/lib/Lex/HeaderSearch.cpp
+++ b/clang/lib/Lex/HeaderSearch.cpp
@@ -25,11 +25,11 @@
 #include "clang/Lex/Preprocessor.h"
 #include "llvm/ADT/APInt.h"
 #include "llvm/ADT/Hashing.h"
+#include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/ADT/StringRef.h"
-#include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/Capacity.h"
 #include "llvm/Support/Errc.h"
diff --git a/clang/lib/Serialization/ASTReader.cpp 
b/clang/lib/Serialization/ASTReader.cpp
index d596082d21..95a62095d4 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -40,7 +40,6 @@
 #include "clang/AST/TypeLoc.h"
 #include "clang/AST/TypeLocVisitor.h"
 #include "clang/AST/UnresolvedSet.h"
-#include "clang/Basic/Module/ASTSourceDescriptor.h"
 #include "clang/Basic/CommentOptions.h"
 #include "clang/Basic/Diagnostic.h"
 #include "clang/Basic/DiagnosticError.h"
@@ -52,6 +51,7 @@
 #include "clang/Basic/IdentifierTable.h"
 #include "clang/Basic/LLVM.h"
 #include "clang/Basic/LangOptions.h"
+#include "clang/Basic/Module/ASTSourceDescriptor.h"
 #include "clang/Basic/Module/Module.h"
 #include "clang/Basic/ObjCRuntime.h"
 #include "clang/Basic/OpenACCKinds.h"

``




https://github.com/llvm/llvm-project/pull/93388
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-25 Thread David Stone via cfe-commits

https://github.com/davidstone updated 
https://github.com/llvm/llvm-project/pull/93388

>From 0933b8e0f3161c0037516f677f1de2e72811d921 Mon Sep 17 00:00:00 2001
From: David Stone 
Date: Sat, 25 May 2024 14:13:30 -0600
Subject: [PATCH 1/3] [clang][Modules] Move `ASTSourceDescriptor` into its own
 file

---
 .../include/clang/Basic/ASTSourceDescriptor.h | 52 +++
 clang/include/clang/Basic/Module.h| 26 --
 clang/lib/AST/ExternalASTSource.cpp   |  2 +-
 clang/lib/Basic/ASTSourceDescriptor.cpp   | 33 
 clang/lib/Basic/CMakeLists.txt|  1 +
 clang/lib/Basic/Module.cpp| 15 --
 clang/lib/CodeGen/CGDebugInfo.h   |  3 +-
 clang/lib/Serialization/ASTReader.cpp |  1 +
 .../Plugins/ExpressionParser/Clang/ASTUtils.h |  8 ++-
 .../Clang/ClangExternalASTSourceCallbacks.cpp |  1 +
 .../Clang/ClangExternalASTSourceCallbacks.h   |  8 ++-
 11 files changed, 105 insertions(+), 45 deletions(-)
 create mode 100644 clang/include/clang/Basic/ASTSourceDescriptor.h
 create mode 100644 clang/lib/Basic/ASTSourceDescriptor.cpp

diff --git a/clang/include/clang/Basic/ASTSourceDescriptor.h 
b/clang/include/clang/Basic/ASTSourceDescriptor.h
new file mode 100644
index 0..175e0551db765
--- /dev/null
+++ b/clang/include/clang/Basic/ASTSourceDescriptor.h
@@ -0,0 +1,52 @@
+//===- ASTSourceDescriptor.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: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+//
+/// \file
+/// Defines the clang::ASTSourceDescriptor class, which abstracts clang modules
+/// and precompiled header files
+//
+//===--===//
+
+#ifndef LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
+#define LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
+
+#include "clang/Basic/Module.h"
+#include "llvm/ADT/StringRef.h"
+#include 
+#include 
+
+namespace clang {
+
+/// Abstracts clang modules and precompiled header files and holds
+/// everything needed to generate debug info for an imported module
+/// or PCH.
+class ASTSourceDescriptor {
+  StringRef PCHModuleName;
+  StringRef Path;
+  StringRef ASTFile;
+  ASTFileSignature Signature;
+  Module *ClangModule = nullptr;
+
+public:
+  ASTSourceDescriptor() = default;
+  ASTSourceDescriptor(StringRef Name, StringRef Path, StringRef ASTFile,
+  ASTFileSignature Signature)
+  : PCHModuleName(std::move(Name)), Path(std::move(Path)),
+ASTFile(std::move(ASTFile)), Signature(Signature) {}
+  ASTSourceDescriptor(Module );
+
+  std::string getModuleName() const;
+  StringRef getPath() const { return Path; }
+  StringRef getASTFile() const { return ASTFile; }
+  ASTFileSignature getSignature() const { return Signature; }
+  Module *getModuleOrNull() const { return ClangModule; }
+};
+
+} // namespace clang
+
+#endif // LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
diff --git a/clang/include/clang/Basic/Module.h 
b/clang/include/clang/Basic/Module.h
index 2d62d05cd9190..e86f4303d732b 100644
--- a/clang/include/clang/Basic/Module.h
+++ b/clang/include/clang/Basic/Module.h
@@ -868,32 +868,6 @@ class VisibleModuleSet {
   unsigned Generation = 0;
 };
 
-/// Abstracts clang modules and precompiled header files and holds
-/// everything needed to generate debug info for an imported module
-/// or PCH.
-class ASTSourceDescriptor {
-  StringRef PCHModuleName;
-  StringRef Path;
-  StringRef ASTFile;
-  ASTFileSignature Signature;
-  Module *ClangModule = nullptr;
-
-public:
-  ASTSourceDescriptor() = default;
-  ASTSourceDescriptor(StringRef Name, StringRef Path, StringRef ASTFile,
-  ASTFileSignature Signature)
-  : PCHModuleName(std::move(Name)), Path(std::move(Path)),
-ASTFile(std::move(ASTFile)), Signature(Signature) {}
-  ASTSourceDescriptor(Module );
-
-  std::string getModuleName() const;
-  StringRef getPath() const { return Path; }
-  StringRef getASTFile() const { return ASTFile; }
-  ASTFileSignature getSignature() const { return Signature; }
-  Module *getModuleOrNull() const { return ClangModule; }
-};
-
-
 } // namespace clang
 
 #endif // LLVM_CLANG_BASIC_MODULE_H
diff --git a/clang/lib/AST/ExternalASTSource.cpp 
b/clang/lib/AST/ExternalASTSource.cpp
index e96a474968511..a5b6f80bde694 100644
--- a/clang/lib/AST/ExternalASTSource.cpp
+++ b/clang/lib/AST/ExternalASTSource.cpp
@@ -15,10 +15,10 @@
 #include "clang/AST/ExternalASTSource.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclarationName.h"
+#include "clang/Basic/ASTSourceDescriptor.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/IdentifierTable.h"
 #include "clang/Basic/LLVM.h"
-#include "clang/Basic/Module.h"
 #include 

[Lldb-commits] [clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-25 Thread David Stone via lldb-commits

https://github.com/davidstone updated 
https://github.com/llvm/llvm-project/pull/93388

>From 0933b8e0f3161c0037516f677f1de2e72811d921 Mon Sep 17 00:00:00 2001
From: David Stone 
Date: Sat, 25 May 2024 14:13:30 -0600
Subject: [PATCH 1/3] [clang][Modules] Move `ASTSourceDescriptor` into its own
 file

---
 .../include/clang/Basic/ASTSourceDescriptor.h | 52 +++
 clang/include/clang/Basic/Module.h| 26 --
 clang/lib/AST/ExternalASTSource.cpp   |  2 +-
 clang/lib/Basic/ASTSourceDescriptor.cpp   | 33 
 clang/lib/Basic/CMakeLists.txt|  1 +
 clang/lib/Basic/Module.cpp| 15 --
 clang/lib/CodeGen/CGDebugInfo.h   |  3 +-
 clang/lib/Serialization/ASTReader.cpp |  1 +
 .../Plugins/ExpressionParser/Clang/ASTUtils.h |  8 ++-
 .../Clang/ClangExternalASTSourceCallbacks.cpp |  1 +
 .../Clang/ClangExternalASTSourceCallbacks.h   |  8 ++-
 11 files changed, 105 insertions(+), 45 deletions(-)
 create mode 100644 clang/include/clang/Basic/ASTSourceDescriptor.h
 create mode 100644 clang/lib/Basic/ASTSourceDescriptor.cpp

diff --git a/clang/include/clang/Basic/ASTSourceDescriptor.h 
b/clang/include/clang/Basic/ASTSourceDescriptor.h
new file mode 100644
index 0..175e0551db765
--- /dev/null
+++ b/clang/include/clang/Basic/ASTSourceDescriptor.h
@@ -0,0 +1,52 @@
+//===- ASTSourceDescriptor.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: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+//
+/// \file
+/// Defines the clang::ASTSourceDescriptor class, which abstracts clang modules
+/// and precompiled header files
+//
+//===--===//
+
+#ifndef LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
+#define LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
+
+#include "clang/Basic/Module.h"
+#include "llvm/ADT/StringRef.h"
+#include 
+#include 
+
+namespace clang {
+
+/// Abstracts clang modules and precompiled header files and holds
+/// everything needed to generate debug info for an imported module
+/// or PCH.
+class ASTSourceDescriptor {
+  StringRef PCHModuleName;
+  StringRef Path;
+  StringRef ASTFile;
+  ASTFileSignature Signature;
+  Module *ClangModule = nullptr;
+
+public:
+  ASTSourceDescriptor() = default;
+  ASTSourceDescriptor(StringRef Name, StringRef Path, StringRef ASTFile,
+  ASTFileSignature Signature)
+  : PCHModuleName(std::move(Name)), Path(std::move(Path)),
+ASTFile(std::move(ASTFile)), Signature(Signature) {}
+  ASTSourceDescriptor(Module );
+
+  std::string getModuleName() const;
+  StringRef getPath() const { return Path; }
+  StringRef getASTFile() const { return ASTFile; }
+  ASTFileSignature getSignature() const { return Signature; }
+  Module *getModuleOrNull() const { return ClangModule; }
+};
+
+} // namespace clang
+
+#endif // LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
diff --git a/clang/include/clang/Basic/Module.h 
b/clang/include/clang/Basic/Module.h
index 2d62d05cd9190..e86f4303d732b 100644
--- a/clang/include/clang/Basic/Module.h
+++ b/clang/include/clang/Basic/Module.h
@@ -868,32 +868,6 @@ class VisibleModuleSet {
   unsigned Generation = 0;
 };
 
-/// Abstracts clang modules and precompiled header files and holds
-/// everything needed to generate debug info for an imported module
-/// or PCH.
-class ASTSourceDescriptor {
-  StringRef PCHModuleName;
-  StringRef Path;
-  StringRef ASTFile;
-  ASTFileSignature Signature;
-  Module *ClangModule = nullptr;
-
-public:
-  ASTSourceDescriptor() = default;
-  ASTSourceDescriptor(StringRef Name, StringRef Path, StringRef ASTFile,
-  ASTFileSignature Signature)
-  : PCHModuleName(std::move(Name)), Path(std::move(Path)),
-ASTFile(std::move(ASTFile)), Signature(Signature) {}
-  ASTSourceDescriptor(Module );
-
-  std::string getModuleName() const;
-  StringRef getPath() const { return Path; }
-  StringRef getASTFile() const { return ASTFile; }
-  ASTFileSignature getSignature() const { return Signature; }
-  Module *getModuleOrNull() const { return ClangModule; }
-};
-
-
 } // namespace clang
 
 #endif // LLVM_CLANG_BASIC_MODULE_H
diff --git a/clang/lib/AST/ExternalASTSource.cpp 
b/clang/lib/AST/ExternalASTSource.cpp
index e96a474968511..a5b6f80bde694 100644
--- a/clang/lib/AST/ExternalASTSource.cpp
+++ b/clang/lib/AST/ExternalASTSource.cpp
@@ -15,10 +15,10 @@
 #include "clang/AST/ExternalASTSource.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclarationName.h"
+#include "clang/Basic/ASTSourceDescriptor.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/IdentifierTable.h"
 #include "clang/Basic/LLVM.h"
-#include "clang/Basic/Module.h"
 #include 

[clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-25 Thread via cfe-commits
8d..c07936ea2d3e9 100644
--- a/clang/lib/AST/DeclPrinter.cpp
+++ b/clang/lib/AST/DeclPrinter.cpp
@@ -20,7 +20,7 @@
 #include "clang/AST/Expr.h"
 #include "clang/AST/ExprCXX.h"
 #include "clang/AST/PrettyPrinter.h"
-#include "clang/Basic/Module.h"
+#include "clang/Basic/Module/Module.h"
 #include "clang/Basic/SourceManager.h"
 #include "llvm/Support/raw_ostream.h"
 using namespace clang;
diff --git a/clang/lib/AST/ExternalASTSource.cpp 
b/clang/lib/AST/ExternalASTSource.cpp
index e96a474968511..fb16f41ced520 100644
--- a/clang/lib/AST/ExternalASTSource.cpp
+++ b/clang/lib/AST/ExternalASTSource.cpp
@@ -15,10 +15,10 @@
 #include "clang/AST/ExternalASTSource.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclarationName.h"
+#include "clang/Basic/Module/ASTSourceDescriptor.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/IdentifierTable.h"
 #include "clang/Basic/LLVM.h"
-#include "clang/Basic/Module.h"
 #include "clang/Basic/SourceManager.h"
 #include "llvm/Support/ErrorHandling.h"
 #include 
diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp
index ed9e6eeb36c75..4d010b70cd8b4 100644
--- a/clang/lib/AST/ItaniumMangle.cpp
+++ b/clang/lib/AST/ItaniumMangle.cpp
@@ -29,7 +29,7 @@
 #include "clang/AST/TypeLoc.h"
 #include "clang/Basic/ABI.h"
 #include "clang/Basic/DiagnosticAST.h"
-#include "clang/Basic/Module.h"
+#include "clang/Basic/Module/Module.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Basic/TargetInfo.h"
 #include "clang/Basic/Thunk.h"
diff --git a/clang/lib/AST/ODRDiagsEmitter.cpp 
b/clang/lib/AST/ODRDiagsEmitter.cpp
index 37f0f68c92355..d262dd87cfff2 100644
--- a/clang/lib/AST/ODRDiagsEmitter.cpp
+++ b/clang/lib/AST/ODRDiagsEmitter.cpp
@@ -11,7 +11,7 @@
 #include "clang/AST/DeclTemplate.h"
 #include "clang/AST/ODRHash.h"
 #include "clang/Basic/DiagnosticAST.h"
-#include "clang/Basic/Module.h"
+#include "clang/Basic/Module/Module.h"
 
 using namespace clang;
 
diff --git a/clang/lib/AST/TextNodeDumper.cpp b/clang/lib/AST/TextNodeDumper.cpp
index 4a1e94ffe283b..5299ebbfbfb42 100644
--- a/clang/lib/AST/TextNodeDumper.cpp
+++ b/clang/lib/AST/TextNodeDumper.cpp
@@ -19,7 +19,7 @@
 #include "clang/AST/NestedNameSpecifier.h"
 #include "clang/AST/Type.h"
 #include "clang/AST/TypeLocVisitor.h"
-#include "clang/Basic/Module.h"
+#include "clang/Basic/Module/Module.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Basic/Specifiers.h"
 #include "clang/Basic/TypeTraits.h"
diff --git a/clang/lib/Basic/CMakeLists.txt b/clang/lib/Basic/CMakeLists.txt
index 824d4a0e2eee5..fae3ef13b8796 100644
--- a/clang/lib/Basic/CMakeLists.txt
+++ b/clang/lib/Basic/CMakeLists.txt
@@ -55,11 +55,11 @@ if(CLANG_VENDOR)
 endif()
 
 add_clang_library(clangBasic
-  Attributes.cpp
-  Builtins.cpp
-  CLWarnings.cpp
-  CharInfo.cpp
-  CodeGenOptions.cpp
+Attributes.cpp
+Builtins.cpp
+CLWarnings.cpp
+CharInfo.cpp
+CodeGenOptions.cpp
   Cuda.cpp
   DarwinSDKInfo.cpp
   Diagnostic.cpp
@@ -73,7 +73,8 @@ add_clang_library(clangBasic
   LangOptions.cpp
   LangStandards.cpp
   MakeSupport.cpp
-  Module.cpp
+  Module/ASTSourceDescriptor.cpp
+  Module/Module.cpp
   ObjCRuntime.cpp
   OpenCLOptions.cpp
   OpenMPKinds.cpp
diff --git a/clang/lib/Basic/Module.cpp b/clang/lib/Basic/Module.cpp
index 045ef580f9c33..581509b888a5b 100644
--- a/clang/lib/Basic/Module.cpp
+++ b/clang/lib/Basic/Module.cpp
@@ -11,7 +11,7 @@
 //
 
//===--===//
 
-#include "clang/Basic/Module.h"
+#include "clang/Basic/Module/Module.h"
 #include "clang/Basic/CharInfo.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/LangOptions.h"
@@ -724,18 +724,3 @@ void VisibleModuleSet::setVisible(Module *M, 
SourceLocation Loc,
   };
   VisitModule({M, nullptr});
 }
-
-ASTSourceDescriptor::ASTSourceDescriptor(Module )
-: Signature(M.Signature), ClangModule() {
-  if (M.Directory)
-Path = M.Directory->getName();
-  if (auto File = M.getASTFile())
-ASTFile = File->getName();
-}
-
-std::string ASTSourceDescriptor::getModuleName() const {
-  if (ClangModule)
-return ClangModule->Name;
-  else
-return std::string(PCHModuleName);
-}
diff --git a/clang/lib/Basic/Module/ASTSourceDescriptor.cpp 
b/clang/lib/Basic/Module/ASTSourceDescriptor.cpp
new file mode 100644
index 0..b27cd45b4cb74
--- /dev/null
+++ b/clang/lib/Basic/Module/ASTSourceDescriptor.cpp
@@ -0,0 +1,33 @@
+//===- ASTSourceDescriptor.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: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+//
+/// Defines the clang::ASTSourceDescriptor class, which abstracts clang modules
+/// and precompiled header f...
[truncated]

``




https://github.com/llvm/llvm-project/pull/93388
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-25 Thread via cfe-commits
8d..c07936ea2d3e9 100644
--- a/clang/lib/AST/DeclPrinter.cpp
+++ b/clang/lib/AST/DeclPrinter.cpp
@@ -20,7 +20,7 @@
 #include "clang/AST/Expr.h"
 #include "clang/AST/ExprCXX.h"
 #include "clang/AST/PrettyPrinter.h"
-#include "clang/Basic/Module.h"
+#include "clang/Basic/Module/Module.h"
 #include "clang/Basic/SourceManager.h"
 #include "llvm/Support/raw_ostream.h"
 using namespace clang;
diff --git a/clang/lib/AST/ExternalASTSource.cpp 
b/clang/lib/AST/ExternalASTSource.cpp
index e96a474968511..fb16f41ced520 100644
--- a/clang/lib/AST/ExternalASTSource.cpp
+++ b/clang/lib/AST/ExternalASTSource.cpp
@@ -15,10 +15,10 @@
 #include "clang/AST/ExternalASTSource.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclarationName.h"
+#include "clang/Basic/Module/ASTSourceDescriptor.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/IdentifierTable.h"
 #include "clang/Basic/LLVM.h"
-#include "clang/Basic/Module.h"
 #include "clang/Basic/SourceManager.h"
 #include "llvm/Support/ErrorHandling.h"
 #include 
diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp
index ed9e6eeb36c75..4d010b70cd8b4 100644
--- a/clang/lib/AST/ItaniumMangle.cpp
+++ b/clang/lib/AST/ItaniumMangle.cpp
@@ -29,7 +29,7 @@
 #include "clang/AST/TypeLoc.h"
 #include "clang/Basic/ABI.h"
 #include "clang/Basic/DiagnosticAST.h"
-#include "clang/Basic/Module.h"
+#include "clang/Basic/Module/Module.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Basic/TargetInfo.h"
 #include "clang/Basic/Thunk.h"
diff --git a/clang/lib/AST/ODRDiagsEmitter.cpp 
b/clang/lib/AST/ODRDiagsEmitter.cpp
index 37f0f68c92355..d262dd87cfff2 100644
--- a/clang/lib/AST/ODRDiagsEmitter.cpp
+++ b/clang/lib/AST/ODRDiagsEmitter.cpp
@@ -11,7 +11,7 @@
 #include "clang/AST/DeclTemplate.h"
 #include "clang/AST/ODRHash.h"
 #include "clang/Basic/DiagnosticAST.h"
-#include "clang/Basic/Module.h"
+#include "clang/Basic/Module/Module.h"
 
 using namespace clang;
 
diff --git a/clang/lib/AST/TextNodeDumper.cpp b/clang/lib/AST/TextNodeDumper.cpp
index 4a1e94ffe283b..5299ebbfbfb42 100644
--- a/clang/lib/AST/TextNodeDumper.cpp
+++ b/clang/lib/AST/TextNodeDumper.cpp
@@ -19,7 +19,7 @@
 #include "clang/AST/NestedNameSpecifier.h"
 #include "clang/AST/Type.h"
 #include "clang/AST/TypeLocVisitor.h"
-#include "clang/Basic/Module.h"
+#include "clang/Basic/Module/Module.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Basic/Specifiers.h"
 #include "clang/Basic/TypeTraits.h"
diff --git a/clang/lib/Basic/CMakeLists.txt b/clang/lib/Basic/CMakeLists.txt
index 824d4a0e2eee5..fae3ef13b8796 100644
--- a/clang/lib/Basic/CMakeLists.txt
+++ b/clang/lib/Basic/CMakeLists.txt
@@ -55,11 +55,11 @@ if(CLANG_VENDOR)
 endif()
 
 add_clang_library(clangBasic
-  Attributes.cpp
-  Builtins.cpp
-  CLWarnings.cpp
-  CharInfo.cpp
-  CodeGenOptions.cpp
+Attributes.cpp
+Builtins.cpp
+CLWarnings.cpp
+CharInfo.cpp
+CodeGenOptions.cpp
   Cuda.cpp
   DarwinSDKInfo.cpp
   Diagnostic.cpp
@@ -73,7 +73,8 @@ add_clang_library(clangBasic
   LangOptions.cpp
   LangStandards.cpp
   MakeSupport.cpp
-  Module.cpp
+  Module/ASTSourceDescriptor.cpp
+  Module/Module.cpp
   ObjCRuntime.cpp
   OpenCLOptions.cpp
   OpenMPKinds.cpp
diff --git a/clang/lib/Basic/Module.cpp b/clang/lib/Basic/Module.cpp
index 045ef580f9c33..581509b888a5b 100644
--- a/clang/lib/Basic/Module.cpp
+++ b/clang/lib/Basic/Module.cpp
@@ -11,7 +11,7 @@
 //
 
//===--===//
 
-#include "clang/Basic/Module.h"
+#include "clang/Basic/Module/Module.h"
 #include "clang/Basic/CharInfo.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/LangOptions.h"
@@ -724,18 +724,3 @@ void VisibleModuleSet::setVisible(Module *M, 
SourceLocation Loc,
   };
   VisitModule({M, nullptr});
 }
-
-ASTSourceDescriptor::ASTSourceDescriptor(Module )
-: Signature(M.Signature), ClangModule() {
-  if (M.Directory)
-Path = M.Directory->getName();
-  if (auto File = M.getASTFile())
-ASTFile = File->getName();
-}
-
-std::string ASTSourceDescriptor::getModuleName() const {
-  if (ClangModule)
-return ClangModule->Name;
-  else
-return std::string(PCHModuleName);
-}
diff --git a/clang/lib/Basic/Module/ASTSourceDescriptor.cpp 
b/clang/lib/Basic/Module/ASTSourceDescriptor.cpp
new file mode 100644
index 0..b27cd45b4cb74
--- /dev/null
+++ b/clang/lib/Basic/Module/ASTSourceDescriptor.cpp
@@ -0,0 +1,33 @@
+//===- ASTSourceDescriptor.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: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+//
+/// Defines the clang::ASTSourceDescriptor class, which abstracts clang modules
+/// and precompiled header f...
[truncated]

``




https://github.com/llvm/llvm-project/pull/93388
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[Lldb-commits] [clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-25 Thread via lldb-commits
8d..c07936ea2d3e9 100644
--- a/clang/lib/AST/DeclPrinter.cpp
+++ b/clang/lib/AST/DeclPrinter.cpp
@@ -20,7 +20,7 @@
 #include "clang/AST/Expr.h"
 #include "clang/AST/ExprCXX.h"
 #include "clang/AST/PrettyPrinter.h"
-#include "clang/Basic/Module.h"
+#include "clang/Basic/Module/Module.h"
 #include "clang/Basic/SourceManager.h"
 #include "llvm/Support/raw_ostream.h"
 using namespace clang;
diff --git a/clang/lib/AST/ExternalASTSource.cpp 
b/clang/lib/AST/ExternalASTSource.cpp
index e96a474968511..fb16f41ced520 100644
--- a/clang/lib/AST/ExternalASTSource.cpp
+++ b/clang/lib/AST/ExternalASTSource.cpp
@@ -15,10 +15,10 @@
 #include "clang/AST/ExternalASTSource.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclarationName.h"
+#include "clang/Basic/Module/ASTSourceDescriptor.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/IdentifierTable.h"
 #include "clang/Basic/LLVM.h"
-#include "clang/Basic/Module.h"
 #include "clang/Basic/SourceManager.h"
 #include "llvm/Support/ErrorHandling.h"
 #include 
diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp
index ed9e6eeb36c75..4d010b70cd8b4 100644
--- a/clang/lib/AST/ItaniumMangle.cpp
+++ b/clang/lib/AST/ItaniumMangle.cpp
@@ -29,7 +29,7 @@
 #include "clang/AST/TypeLoc.h"
 #include "clang/Basic/ABI.h"
 #include "clang/Basic/DiagnosticAST.h"
-#include "clang/Basic/Module.h"
+#include "clang/Basic/Module/Module.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Basic/TargetInfo.h"
 #include "clang/Basic/Thunk.h"
diff --git a/clang/lib/AST/ODRDiagsEmitter.cpp 
b/clang/lib/AST/ODRDiagsEmitter.cpp
index 37f0f68c92355..d262dd87cfff2 100644
--- a/clang/lib/AST/ODRDiagsEmitter.cpp
+++ b/clang/lib/AST/ODRDiagsEmitter.cpp
@@ -11,7 +11,7 @@
 #include "clang/AST/DeclTemplate.h"
 #include "clang/AST/ODRHash.h"
 #include "clang/Basic/DiagnosticAST.h"
-#include "clang/Basic/Module.h"
+#include "clang/Basic/Module/Module.h"
 
 using namespace clang;
 
diff --git a/clang/lib/AST/TextNodeDumper.cpp b/clang/lib/AST/TextNodeDumper.cpp
index 4a1e94ffe283b..5299ebbfbfb42 100644
--- a/clang/lib/AST/TextNodeDumper.cpp
+++ b/clang/lib/AST/TextNodeDumper.cpp
@@ -19,7 +19,7 @@
 #include "clang/AST/NestedNameSpecifier.h"
 #include "clang/AST/Type.h"
 #include "clang/AST/TypeLocVisitor.h"
-#include "clang/Basic/Module.h"
+#include "clang/Basic/Module/Module.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Basic/Specifiers.h"
 #include "clang/Basic/TypeTraits.h"
diff --git a/clang/lib/Basic/CMakeLists.txt b/clang/lib/Basic/CMakeLists.txt
index 824d4a0e2eee5..fae3ef13b8796 100644
--- a/clang/lib/Basic/CMakeLists.txt
+++ b/clang/lib/Basic/CMakeLists.txt
@@ -55,11 +55,11 @@ if(CLANG_VENDOR)
 endif()
 
 add_clang_library(clangBasic
-  Attributes.cpp
-  Builtins.cpp
-  CLWarnings.cpp
-  CharInfo.cpp
-  CodeGenOptions.cpp
+Attributes.cpp
+Builtins.cpp
+CLWarnings.cpp
+CharInfo.cpp
+CodeGenOptions.cpp
   Cuda.cpp
   DarwinSDKInfo.cpp
   Diagnostic.cpp
@@ -73,7 +73,8 @@ add_clang_library(clangBasic
   LangOptions.cpp
   LangStandards.cpp
   MakeSupport.cpp
-  Module.cpp
+  Module/ASTSourceDescriptor.cpp
+  Module/Module.cpp
   ObjCRuntime.cpp
   OpenCLOptions.cpp
   OpenMPKinds.cpp
diff --git a/clang/lib/Basic/Module.cpp b/clang/lib/Basic/Module.cpp
index 045ef580f9c33..581509b888a5b 100644
--- a/clang/lib/Basic/Module.cpp
+++ b/clang/lib/Basic/Module.cpp
@@ -11,7 +11,7 @@
 //
 
//===--===//
 
-#include "clang/Basic/Module.h"
+#include "clang/Basic/Module/Module.h"
 #include "clang/Basic/CharInfo.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/LangOptions.h"
@@ -724,18 +724,3 @@ void VisibleModuleSet::setVisible(Module *M, 
SourceLocation Loc,
   };
   VisitModule({M, nullptr});
 }
-
-ASTSourceDescriptor::ASTSourceDescriptor(Module )
-: Signature(M.Signature), ClangModule() {
-  if (M.Directory)
-Path = M.Directory->getName();
-  if (auto File = M.getASTFile())
-ASTFile = File->getName();
-}
-
-std::string ASTSourceDescriptor::getModuleName() const {
-  if (ClangModule)
-return ClangModule->Name;
-  else
-return std::string(PCHModuleName);
-}
diff --git a/clang/lib/Basic/Module/ASTSourceDescriptor.cpp 
b/clang/lib/Basic/Module/ASTSourceDescriptor.cpp
new file mode 100644
index 0..b27cd45b4cb74
--- /dev/null
+++ b/clang/lib/Basic/Module/ASTSourceDescriptor.cpp
@@ -0,0 +1,33 @@
+//===- ASTSourceDescriptor.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: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+//
+/// Defines the clang::ASTSourceDescriptor class, which abstracts clang modules
+/// and precompiled header f...
[truncated]

``




https://github.com/llvm/llvm-project/pull/93388
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-25 Thread via lldb-commits
8d..c07936ea2d3e9 100644
--- a/clang/lib/AST/DeclPrinter.cpp
+++ b/clang/lib/AST/DeclPrinter.cpp
@@ -20,7 +20,7 @@
 #include "clang/AST/Expr.h"
 #include "clang/AST/ExprCXX.h"
 #include "clang/AST/PrettyPrinter.h"
-#include "clang/Basic/Module.h"
+#include "clang/Basic/Module/Module.h"
 #include "clang/Basic/SourceManager.h"
 #include "llvm/Support/raw_ostream.h"
 using namespace clang;
diff --git a/clang/lib/AST/ExternalASTSource.cpp 
b/clang/lib/AST/ExternalASTSource.cpp
index e96a474968511..fb16f41ced520 100644
--- a/clang/lib/AST/ExternalASTSource.cpp
+++ b/clang/lib/AST/ExternalASTSource.cpp
@@ -15,10 +15,10 @@
 #include "clang/AST/ExternalASTSource.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclarationName.h"
+#include "clang/Basic/Module/ASTSourceDescriptor.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/IdentifierTable.h"
 #include "clang/Basic/LLVM.h"
-#include "clang/Basic/Module.h"
 #include "clang/Basic/SourceManager.h"
 #include "llvm/Support/ErrorHandling.h"
 #include 
diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp
index ed9e6eeb36c75..4d010b70cd8b4 100644
--- a/clang/lib/AST/ItaniumMangle.cpp
+++ b/clang/lib/AST/ItaniumMangle.cpp
@@ -29,7 +29,7 @@
 #include "clang/AST/TypeLoc.h"
 #include "clang/Basic/ABI.h"
 #include "clang/Basic/DiagnosticAST.h"
-#include "clang/Basic/Module.h"
+#include "clang/Basic/Module/Module.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Basic/TargetInfo.h"
 #include "clang/Basic/Thunk.h"
diff --git a/clang/lib/AST/ODRDiagsEmitter.cpp 
b/clang/lib/AST/ODRDiagsEmitter.cpp
index 37f0f68c92355..d262dd87cfff2 100644
--- a/clang/lib/AST/ODRDiagsEmitter.cpp
+++ b/clang/lib/AST/ODRDiagsEmitter.cpp
@@ -11,7 +11,7 @@
 #include "clang/AST/DeclTemplate.h"
 #include "clang/AST/ODRHash.h"
 #include "clang/Basic/DiagnosticAST.h"
-#include "clang/Basic/Module.h"
+#include "clang/Basic/Module/Module.h"
 
 using namespace clang;
 
diff --git a/clang/lib/AST/TextNodeDumper.cpp b/clang/lib/AST/TextNodeDumper.cpp
index 4a1e94ffe283b..5299ebbfbfb42 100644
--- a/clang/lib/AST/TextNodeDumper.cpp
+++ b/clang/lib/AST/TextNodeDumper.cpp
@@ -19,7 +19,7 @@
 #include "clang/AST/NestedNameSpecifier.h"
 #include "clang/AST/Type.h"
 #include "clang/AST/TypeLocVisitor.h"
-#include "clang/Basic/Module.h"
+#include "clang/Basic/Module/Module.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Basic/Specifiers.h"
 #include "clang/Basic/TypeTraits.h"
diff --git a/clang/lib/Basic/CMakeLists.txt b/clang/lib/Basic/CMakeLists.txt
index 824d4a0e2eee5..fae3ef13b8796 100644
--- a/clang/lib/Basic/CMakeLists.txt
+++ b/clang/lib/Basic/CMakeLists.txt
@@ -55,11 +55,11 @@ if(CLANG_VENDOR)
 endif()
 
 add_clang_library(clangBasic
-  Attributes.cpp
-  Builtins.cpp
-  CLWarnings.cpp
-  CharInfo.cpp
-  CodeGenOptions.cpp
+Attributes.cpp
+Builtins.cpp
+CLWarnings.cpp
+CharInfo.cpp
+CodeGenOptions.cpp
   Cuda.cpp
   DarwinSDKInfo.cpp
   Diagnostic.cpp
@@ -73,7 +73,8 @@ add_clang_library(clangBasic
   LangOptions.cpp
   LangStandards.cpp
   MakeSupport.cpp
-  Module.cpp
+  Module/ASTSourceDescriptor.cpp
+  Module/Module.cpp
   ObjCRuntime.cpp
   OpenCLOptions.cpp
   OpenMPKinds.cpp
diff --git a/clang/lib/Basic/Module.cpp b/clang/lib/Basic/Module.cpp
index 045ef580f9c33..581509b888a5b 100644
--- a/clang/lib/Basic/Module.cpp
+++ b/clang/lib/Basic/Module.cpp
@@ -11,7 +11,7 @@
 //
 
//===--===//
 
-#include "clang/Basic/Module.h"
+#include "clang/Basic/Module/Module.h"
 #include "clang/Basic/CharInfo.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/LangOptions.h"
@@ -724,18 +724,3 @@ void VisibleModuleSet::setVisible(Module *M, 
SourceLocation Loc,
   };
   VisitModule({M, nullptr});
 }
-
-ASTSourceDescriptor::ASTSourceDescriptor(Module )
-: Signature(M.Signature), ClangModule() {
-  if (M.Directory)
-Path = M.Directory->getName();
-  if (auto File = M.getASTFile())
-ASTFile = File->getName();
-}
-
-std::string ASTSourceDescriptor::getModuleName() const {
-  if (ClangModule)
-return ClangModule->Name;
-  else
-return std::string(PCHModuleName);
-}
diff --git a/clang/lib/Basic/Module/ASTSourceDescriptor.cpp 
b/clang/lib/Basic/Module/ASTSourceDescriptor.cpp
new file mode 100644
index 0..b27cd45b4cb74
--- /dev/null
+++ b/clang/lib/Basic/Module/ASTSourceDescriptor.cpp
@@ -0,0 +1,33 @@
+//===- ASTSourceDescriptor.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: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+//
+/// Defines the clang::ASTSourceDescriptor class, which abstracts clang modules
+/// and precompiled header f...
[truncated]

``




https://github.com/llvm/llvm-project/pull/93388
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-25 Thread David Stone via lldb-commits

https://github.com/davidstone created 
https://github.com/llvm/llvm-project/pull/93388

Depends on https://github.com/llvm/llvm-project/pull/67930

>From 0933b8e0f3161c0037516f677f1de2e72811d921 Mon Sep 17 00:00:00 2001
From: David Stone 
Date: Sat, 25 May 2024 14:13:30 -0600
Subject: [PATCH 1/2] [clang][Modules] Move `ASTSourceDescriptor` into its own
 file

---
 .../include/clang/Basic/ASTSourceDescriptor.h | 52 +++
 clang/include/clang/Basic/Module.h| 26 --
 clang/lib/AST/ExternalASTSource.cpp   |  2 +-
 clang/lib/Basic/ASTSourceDescriptor.cpp   | 33 
 clang/lib/Basic/CMakeLists.txt|  1 +
 clang/lib/Basic/Module.cpp| 15 --
 clang/lib/CodeGen/CGDebugInfo.h   |  3 +-
 clang/lib/Serialization/ASTReader.cpp |  1 +
 .../Plugins/ExpressionParser/Clang/ASTUtils.h |  8 ++-
 .../Clang/ClangExternalASTSourceCallbacks.cpp |  1 +
 .../Clang/ClangExternalASTSourceCallbacks.h   |  8 ++-
 11 files changed, 105 insertions(+), 45 deletions(-)
 create mode 100644 clang/include/clang/Basic/ASTSourceDescriptor.h
 create mode 100644 clang/lib/Basic/ASTSourceDescriptor.cpp

diff --git a/clang/include/clang/Basic/ASTSourceDescriptor.h 
b/clang/include/clang/Basic/ASTSourceDescriptor.h
new file mode 100644
index 0..175e0551db765
--- /dev/null
+++ b/clang/include/clang/Basic/ASTSourceDescriptor.h
@@ -0,0 +1,52 @@
+//===- ASTSourceDescriptor.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: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+//
+/// \file
+/// Defines the clang::ASTSourceDescriptor class, which abstracts clang modules
+/// and precompiled header files
+//
+//===--===//
+
+#ifndef LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
+#define LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
+
+#include "clang/Basic/Module.h"
+#include "llvm/ADT/StringRef.h"
+#include 
+#include 
+
+namespace clang {
+
+/// Abstracts clang modules and precompiled header files and holds
+/// everything needed to generate debug info for an imported module
+/// or PCH.
+class ASTSourceDescriptor {
+  StringRef PCHModuleName;
+  StringRef Path;
+  StringRef ASTFile;
+  ASTFileSignature Signature;
+  Module *ClangModule = nullptr;
+
+public:
+  ASTSourceDescriptor() = default;
+  ASTSourceDescriptor(StringRef Name, StringRef Path, StringRef ASTFile,
+  ASTFileSignature Signature)
+  : PCHModuleName(std::move(Name)), Path(std::move(Path)),
+ASTFile(std::move(ASTFile)), Signature(Signature) {}
+  ASTSourceDescriptor(Module );
+
+  std::string getModuleName() const;
+  StringRef getPath() const { return Path; }
+  StringRef getASTFile() const { return ASTFile; }
+  ASTFileSignature getSignature() const { return Signature; }
+  Module *getModuleOrNull() const { return ClangModule; }
+};
+
+} // namespace clang
+
+#endif // LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
diff --git a/clang/include/clang/Basic/Module.h 
b/clang/include/clang/Basic/Module.h
index 2d62d05cd9190..e86f4303d732b 100644
--- a/clang/include/clang/Basic/Module.h
+++ b/clang/include/clang/Basic/Module.h
@@ -868,32 +868,6 @@ class VisibleModuleSet {
   unsigned Generation = 0;
 };
 
-/// Abstracts clang modules and precompiled header files and holds
-/// everything needed to generate debug info for an imported module
-/// or PCH.
-class ASTSourceDescriptor {
-  StringRef PCHModuleName;
-  StringRef Path;
-  StringRef ASTFile;
-  ASTFileSignature Signature;
-  Module *ClangModule = nullptr;
-
-public:
-  ASTSourceDescriptor() = default;
-  ASTSourceDescriptor(StringRef Name, StringRef Path, StringRef ASTFile,
-  ASTFileSignature Signature)
-  : PCHModuleName(std::move(Name)), Path(std::move(Path)),
-ASTFile(std::move(ASTFile)), Signature(Signature) {}
-  ASTSourceDescriptor(Module );
-
-  std::string getModuleName() const;
-  StringRef getPath() const { return Path; }
-  StringRef getASTFile() const { return ASTFile; }
-  ASTFileSignature getSignature() const { return Signature; }
-  Module *getModuleOrNull() const { return ClangModule; }
-};
-
-
 } // namespace clang
 
 #endif // LLVM_CLANG_BASIC_MODULE_H
diff --git a/clang/lib/AST/ExternalASTSource.cpp 
b/clang/lib/AST/ExternalASTSource.cpp
index e96a474968511..a5b6f80bde694 100644
--- a/clang/lib/AST/ExternalASTSource.cpp
+++ b/clang/lib/AST/ExternalASTSource.cpp
@@ -15,10 +15,10 @@
 #include "clang/AST/ExternalASTSource.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclarationName.h"
+#include "clang/Basic/ASTSourceDescriptor.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/IdentifierTable.h"
 #include "clang/Basic/LLVM.h"

[clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-25 Thread David Stone via cfe-commits

https://github.com/davidstone created 
https://github.com/llvm/llvm-project/pull/93388

Depends on https://github.com/llvm/llvm-project/pull/67930

>From 0933b8e0f3161c0037516f677f1de2e72811d921 Mon Sep 17 00:00:00 2001
From: David Stone 
Date: Sat, 25 May 2024 14:13:30 -0600
Subject: [PATCH 1/2] [clang][Modules] Move `ASTSourceDescriptor` into its own
 file

---
 .../include/clang/Basic/ASTSourceDescriptor.h | 52 +++
 clang/include/clang/Basic/Module.h| 26 --
 clang/lib/AST/ExternalASTSource.cpp   |  2 +-
 clang/lib/Basic/ASTSourceDescriptor.cpp   | 33 
 clang/lib/Basic/CMakeLists.txt|  1 +
 clang/lib/Basic/Module.cpp| 15 --
 clang/lib/CodeGen/CGDebugInfo.h   |  3 +-
 clang/lib/Serialization/ASTReader.cpp |  1 +
 .../Plugins/ExpressionParser/Clang/ASTUtils.h |  8 ++-
 .../Clang/ClangExternalASTSourceCallbacks.cpp |  1 +
 .../Clang/ClangExternalASTSourceCallbacks.h   |  8 ++-
 11 files changed, 105 insertions(+), 45 deletions(-)
 create mode 100644 clang/include/clang/Basic/ASTSourceDescriptor.h
 create mode 100644 clang/lib/Basic/ASTSourceDescriptor.cpp

diff --git a/clang/include/clang/Basic/ASTSourceDescriptor.h 
b/clang/include/clang/Basic/ASTSourceDescriptor.h
new file mode 100644
index 0..175e0551db765
--- /dev/null
+++ b/clang/include/clang/Basic/ASTSourceDescriptor.h
@@ -0,0 +1,52 @@
+//===- ASTSourceDescriptor.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: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+//
+/// \file
+/// Defines the clang::ASTSourceDescriptor class, which abstracts clang modules
+/// and precompiled header files
+//
+//===--===//
+
+#ifndef LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
+#define LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
+
+#include "clang/Basic/Module.h"
+#include "llvm/ADT/StringRef.h"
+#include 
+#include 
+
+namespace clang {
+
+/// Abstracts clang modules and precompiled header files and holds
+/// everything needed to generate debug info for an imported module
+/// or PCH.
+class ASTSourceDescriptor {
+  StringRef PCHModuleName;
+  StringRef Path;
+  StringRef ASTFile;
+  ASTFileSignature Signature;
+  Module *ClangModule = nullptr;
+
+public:
+  ASTSourceDescriptor() = default;
+  ASTSourceDescriptor(StringRef Name, StringRef Path, StringRef ASTFile,
+  ASTFileSignature Signature)
+  : PCHModuleName(std::move(Name)), Path(std::move(Path)),
+ASTFile(std::move(ASTFile)), Signature(Signature) {}
+  ASTSourceDescriptor(Module );
+
+  std::string getModuleName() const;
+  StringRef getPath() const { return Path; }
+  StringRef getASTFile() const { return ASTFile; }
+  ASTFileSignature getSignature() const { return Signature; }
+  Module *getModuleOrNull() const { return ClangModule; }
+};
+
+} // namespace clang
+
+#endif // LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H
diff --git a/clang/include/clang/Basic/Module.h 
b/clang/include/clang/Basic/Module.h
index 2d62d05cd9190..e86f4303d732b 100644
--- a/clang/include/clang/Basic/Module.h
+++ b/clang/include/clang/Basic/Module.h
@@ -868,32 +868,6 @@ class VisibleModuleSet {
   unsigned Generation = 0;
 };
 
-/// Abstracts clang modules and precompiled header files and holds
-/// everything needed to generate debug info for an imported module
-/// or PCH.
-class ASTSourceDescriptor {
-  StringRef PCHModuleName;
-  StringRef Path;
-  StringRef ASTFile;
-  ASTFileSignature Signature;
-  Module *ClangModule = nullptr;
-
-public:
-  ASTSourceDescriptor() = default;
-  ASTSourceDescriptor(StringRef Name, StringRef Path, StringRef ASTFile,
-  ASTFileSignature Signature)
-  : PCHModuleName(std::move(Name)), Path(std::move(Path)),
-ASTFile(std::move(ASTFile)), Signature(Signature) {}
-  ASTSourceDescriptor(Module );
-
-  std::string getModuleName() const;
-  StringRef getPath() const { return Path; }
-  StringRef getASTFile() const { return ASTFile; }
-  ASTFileSignature getSignature() const { return Signature; }
-  Module *getModuleOrNull() const { return ClangModule; }
-};
-
-
 } // namespace clang
 
 #endif // LLVM_CLANG_BASIC_MODULE_H
diff --git a/clang/lib/AST/ExternalASTSource.cpp 
b/clang/lib/AST/ExternalASTSource.cpp
index e96a474968511..a5b6f80bde694 100644
--- a/clang/lib/AST/ExternalASTSource.cpp
+++ b/clang/lib/AST/ExternalASTSource.cpp
@@ -15,10 +15,10 @@
 #include "clang/AST/ExternalASTSource.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclarationName.h"
+#include "clang/Basic/ASTSourceDescriptor.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/IdentifierTable.h"
 #include "clang/Basic/LLVM.h"

[jenkinsci/yaml-axis-plugin]

2024-05-25 Thread 'Go Sueyoshi' via Jenkins Commits
  Branch: 
refs/heads/dependabot/maven/org.jenkins-ci.plugins-matrix-project-830.v7ea_da_561b_a_34
  Home:   https://github.com/jenkinsci/yaml-axis-plugin

To unsubscribe from these emails, change your notification settings at 
https://github.com/jenkinsci/yaml-axis-plugin/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-commits/jenkinsci/yaml-axis-plugin/push/refs/heads/dependabot/maven/org.jenkins-ci.plugins-matrix-project-830.v7ea_da_561b_a_34/3aa3d3-00%40github.com.


[clang] [clang-format]: Annotate colons found in inline assembly (PR #92617)

2024-05-25 Thread Gedare Bloom via cfe-commits
N(Tokens[7], tok::colon, TT_InlineASMColon);
 
-  Tokens = annotate("__asm__ volatile (\n"
-"\"a_label:\"\n"
-":\n"
-": x\n"
-":);");
-  ASSERT_EQ(Tokens.size(), 11u) << Tokens;
-  EXPECT_TOKEN(Tokens[0], tok::kw_asm, TT_Unknown);
-  EXPECT_TOKEN(Tokens[4], tok::colon, TT_InlineASMColon);
-  EXPECT_TOKEN(Tokens[5], tok::colon, TT_InlineASMColon);
-  EXPECT_TOKEN(Tokens[7], tok::colon, TT_InlineASMColon);
-
-  Tokens = annotate("__asm (\n"
-"\"a_label:\"\n"
-": x\n"
-":\n"
-": y);");
-  ASSERT_EQ(Tokens.size(), 11u) << Tokens;
-  EXPECT_TOKEN(Tokens[0], tok::kw_asm, TT_Unknown);
-  EXPECT_TOKEN(Tokens[3], tok::colon, TT_InlineASMColon);
-  EXPECT_TOKEN(Tokens[5], tok::colon, TT_InlineASMColon);
-  EXPECT_TOKEN(Tokens[6], tok::colon, TT_InlineASMColon);
-
-  Tokens = annotate("asm (\n"
-"\"a_label:\"\n"
-": x\n"
-":\n"
-": y);");
-  ASSERT_EQ(Tokens.size(), 11u) << Tokens;
-  EXPECT_TOKEN(Tokens[0], tok::kw_asm, TT_Unknown);
-  EXPECT_TOKEN(Tokens[3], tok::colon, TT_InlineASMColon);
-  EXPECT_TOKEN(Tokens[5], tok::colon, TT_InlineASMColon);
-  EXPECT_TOKEN(Tokens[6], tok::colon, TT_InlineASMColon);
-
-  Tokens = annotate("__asm__ (\n"
+  Tokens = annotate("__asm__(\n"
 "\"a_label:\"\n"
 ": x\n"
 ":\n"
@@ -1631,65 +1543,7 @@ TEST_F(TokenAnnotatorTest, UnderstandsAsm) {
   EXPECT_TOKEN(Tokens[6], tok::colon, TT_InlineASMColon);
   EXPECT_TOKEN(Tokens[8], tok::colon, TT_InlineASMColon);
 
-  Tokens = annotate("__asm volatile (\n"
-"\"a_label:\"\n"
-"\"a b c(%%x)\"\n"
-":\n"
-": x\n"
-":);");
-  ASSERT_EQ(Tokens.size(), 12u) << Tokens;
-  EXPECT_TOKEN(Tokens[0], tok::kw_asm, TT_Unknown);
-  EXPECT_TOKEN(Tokens[5], tok::colon, TT_InlineASMColon);
-  EXPECT_TOKEN(Tokens[6], tok::colon, TT_InlineASMColon);
-  EXPECT_TOKEN(Tokens[8], tok::colon, TT_InlineASMColon);
-
-  Tokens = annotate("asm volatile (\n"
-"\"a_label:\"\n"
-"\"a b c(%%x)\"\n"
-":\n"
-": x\n"
-":);");
-  ASSERT_EQ(Tokens.size(), 12u) << Tokens;
-  EXPECT_TOKEN(Tokens[0], tok::kw_asm, TT_Unknown);
-  EXPECT_TOKEN(Tokens[5], tok::colon, TT_InlineASMColon);
-  EXPECT_TOKEN(Tokens[6], tok::colon, TT_InlineASMColon);
-  EXPECT_TOKEN(Tokens[8], tok::colon, TT_InlineASMColon);
-
-  Tokens = annotate("__asm__ volatile (\n"
-"\"a_label:\"\n"
-"\"a b c(%%x)\"\n"
-":\n"
-": x\n"
-":);");
-  ASSERT_EQ(Tokens.size(), 12u) << Tokens;
-  EXPECT_TOKEN(Tokens[0], tok::kw_asm, TT_Unknown);
-  EXPECT_TOKEN(Tokens[5], tok::colon, TT_InlineASMColon);
-  EXPECT_TOKEN(Tokens[6], tok::colon, TT_InlineASMColon);
-  EXPECT_TOKEN(Tokens[8], tok::colon, TT_InlineASMColon);
-
-  Tokens = annotate("__asm (\n"
-"\"insn\"\n"
-": \"=r\" (var1), \"=\" (value)\n"
-    ":\n"
-": \"memory\");");
-  ASSERT_EQ(Tokens.size(), 19u) << Tokens;
-  EXPECT_TOKEN(Tokens[0], tok::kw_asm, TT_Unknown);
-  EXPECT_TOKEN(Tokens[3], tok::colon, TT_InlineASMColon);
-  EXPECT_TOKEN(Tokens[13], tok::colon, TT_InlineASMColon);
-  EXPECT_TOKEN(Tokens[14], tok::colon, TT_InlineASMColon);
-
-  Tokens = annotate("asm (\n"
-"\"insn\"\n"
-": \"=r\" (var1), \"=\" (value)\n"
-":\n"
-": \"memory\");");
-  ASSERT_EQ(Tokens.size(), 19u) << Tokens;
-  EXPECT_TOKEN(Tokens[0], tok::kw_asm, TT_Unknown);
-  EXPECT_TOKEN(Tokens[3], tok::colon, TT_InlineASMColon);
-  EXPECT_TOKEN(Tokens[13], tok::colon, TT_InlineASMColon);
-  EXPECT_TOKEN(Tokens[14], tok::colon, TT_InlineASMColon);
-
-  Tokens = annotate("__asm__ (\n"
+  Tokens = annotate("asm(\n"
 "\"insn\"\n"
 ": \"=r\" (var1), \"=\" (value)\n"
 ":\n"
@@ -1700,26 +1554,6 @@ TEST_F(TokenAnnotatorTest, UnderstandsAsm) {
   EXPECT_TOKEN(Tokens[13], tok::colon, TT_InlineASMColon);
   EXPECT_TOKEN(Tokens[14], tok::colon, TT_InlineASMColon);
 
-  Tokens = annotate("__asm volatile (\n"
-"\"ldr r1, [r0, %%[sym]]\"\n"
-":\n"
-": [sym] \"J\" (a(, ))\n"
-");");
-  ASSERT_EQ(Tokens.size(), 21u) << Tokens;
-  EXPECT_TOKEN(Tokens[0], tok::kw_asm, TT_Unknown);
-  EXPECT_TOKEN(Tokens[4], tok::colon, TT_InlineASMColon);
-  EXPECT_TOKEN(Tokens[5], tok::colon, TT_InlineASMColon);
-
-  Tokens = annotate("asm volatile (\n"
-"\"ldr r1, [r0, %%[sym]]\"\n"
-":\n"
-": [sym] \"J\" (a(, ))\n"
-");");
-  ASSERT_EQ(Tokens.size(), 21u) << Tokens;
-  EXPECT_TOKEN(Tokens[0], tok::kw_asm, TT_Unknown);
-  EXPECT_TOKEN(Tokens[4], tok::colon, TT_InlineASMColon);
-  EXPECT_TOKEN(Tokens[5], tok::colon, TT_InlineASMColon);
-
   Tokens = annotate("__asm__ volatile (\n"
 "\"ldr r1, [r0, %%[sym]]\"\n"
 ":\n"

>From 45806d41ac1b2903e4fb5aade0c58d6aecde60a9 Mon Sep 17 00:00:00 2001
From: Gedare Bloom 
Date: Sat, 25 May 2024 17:08:40 -0600
Subject: [PATCH 6/6] Update clang/unittests/Format/TokenAnnotatorTest.cpp

Co-authored-by: Owen Pan 
---
 clang/unittests/Format/TokenAnnotatorTest.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/clang/unittests/Format/TokenAnnotatorTest.cpp 
b/clang/unittests/Format/TokenAnnotatorTest.cpp
index ad9513b4c52e3..95d0235472f69 100644
--- a/clang/unittests/Format/TokenAnnotatorTest.cpp
+++ b/clang/unittests/Format/TokenAnnotatorTest.cpp
@@ -1563,6 +1563,7 @@ TEST_F(TokenAnnotatorTest, UnderstandsAsm) {
   EXPECT_TOKEN(Tokens[0], tok::kw_asm, TT_Unknown);
   EXPECT_TOKEN(Tokens[4], tok::colon, TT_InlineASMColon);
   EXPECT_TOKEN(Tokens[5], tok::colon, TT_InlineASMColon);
+  EXPECT_TOKEN(Tokens[6], tok::l_square, TT_InlineASMSymbolicNameLSquare);
 }
 
 TEST_F(TokenAnnotatorTest, UnderstandsObjCBlock) {

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-format]: Annotate colons found in inline assembly (PR #92617)

2024-05-25 Thread Gedare Bloom via cfe-commits


@@ -1488,12 +1488,81 @@ TEST_F(TokenAnnotatorTest, 
RequiresDoesNotChangeParsingOfTheRest) {
 
 TEST_F(TokenAnnotatorTest, UnderstandsAsm) {
   auto Tokens = annotate("__asm{\n"
- "a:\n"
- "};");
-  ASSERT_EQ(Tokens.size(), 7u) << Tokens;
+ "\"a\":\n"
+ ": x\n"
+ ":};");
+  ASSERT_EQ(Tokens.size(), 10u) << Tokens;
   EXPECT_TOKEN(Tokens[0], tok::kw_asm, TT_Unknown);
   EXPECT_TOKEN(Tokens[1], tok::l_brace, TT_InlineASMBrace);
-  EXPECT_TOKEN(Tokens[4], tok::r_brace, TT_InlineASMBrace);
+  EXPECT_TOKEN(Tokens[3], tok::colon, TT_InlineASMColon);
+  EXPECT_TOKEN(Tokens[4], tok::colon, TT_InlineASMColon);
+  EXPECT_TOKEN(Tokens[6], tok::colon, TT_InlineASMColon);
+  EXPECT_TOKEN(Tokens[7], tok::r_brace, TT_InlineASMBrace);
+
+  Tokens = annotate("__asm(\n"
+"\"a\":\n"
+": x\n"
+":);");
+  ASSERT_EQ(Tokens.size(), 10u) << Tokens;
+  EXPECT_TOKEN(Tokens[0], tok::kw_asm, TT_Unknown);
+  EXPECT_TOKEN(Tokens[3], tok::colon, TT_InlineASMColon);
+  EXPECT_TOKEN(Tokens[4], tok::colon, TT_InlineASMColon);
+  EXPECT_TOKEN(Tokens[6], tok::colon, TT_InlineASMColon);
+
+  Tokens = annotate("asm volatile (\n"
+"\"a_label:\"\n"
+":\n"
+": x\n"
+":);");
+  ASSERT_EQ(Tokens.size(), 11u) << Tokens;
+  EXPECT_TOKEN(Tokens[0], tok::kw_asm, TT_Unknown);
+  EXPECT_TOKEN(Tokens[4], tok::colon, TT_InlineASMColon);
+  EXPECT_TOKEN(Tokens[5], tok::colon, TT_InlineASMColon);
+  EXPECT_TOKEN(Tokens[7], tok::colon, TT_InlineASMColon);
+
+  Tokens = annotate("__asm__(\n"
+"\"a_label:\"\n"
+": x\n"
+":\n"
+": y);");
+  ASSERT_EQ(Tokens.size(), 11u) << Tokens;
+  EXPECT_TOKEN(Tokens[0], tok::kw_asm, TT_Unknown);
+  EXPECT_TOKEN(Tokens[3], tok::colon, TT_InlineASMColon);
+  EXPECT_TOKEN(Tokens[5], tok::colon, TT_InlineASMColon);
+  EXPECT_TOKEN(Tokens[6], tok::colon, TT_InlineASMColon);
+
+  Tokens = annotate("__asm volatile (\n"
+"\"a_label:\"\n"
+"\"a b c(%%x)\"\n"
+":\n"
+": x\n"
+":);");
+  ASSERT_EQ(Tokens.size(), 12u) << Tokens;
+  EXPECT_TOKEN(Tokens[0], tok::kw_asm, TT_Unknown);
+  EXPECT_TOKEN(Tokens[5], tok::colon, TT_InlineASMColon);
+  EXPECT_TOKEN(Tokens[6], tok::colon, TT_InlineASMColon);
+  EXPECT_TOKEN(Tokens[8], tok::colon, TT_InlineASMColon);
+
+  Tokens = annotate("asm(\n"
+"\"insn\"\n"
+": \"=r\" (var1), \"=\" (value)\n"
+":\n"
+": \"memory\");");
+  ASSERT_EQ(Tokens.size(), 19u) << Tokens;
+  EXPECT_TOKEN(Tokens[0], tok::kw_asm, TT_Unknown);
+  EXPECT_TOKEN(Tokens[3], tok::colon, TT_InlineASMColon);
+  EXPECT_TOKEN(Tokens[13], tok::colon, TT_InlineASMColon);
+  EXPECT_TOKEN(Tokens[14], tok::colon, TT_InlineASMColon);
+
+  Tokens = annotate("__asm__ volatile (\n"
+"\"ldr r1, [r0, %%[sym]]\"\n"
+":\n"
+    ": [sym] \"J\" (a(, ))\n"
+    ");");
+  ASSERT_EQ(Tokens.size(), 21u) << Tokens;
+  EXPECT_TOKEN(Tokens[0], tok::kw_asm, TT_Unknown);
+  EXPECT_TOKEN(Tokens[4], tok::colon, TT_InlineASMColon);
+  EXPECT_TOKEN(Tokens[5], tok::colon, TT_InlineASMColon);
 }

gedare wrote:

Nice. I shouldn't review comments on my phone.

https://github.com/llvm/llvm-project/pull/92617
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang-tools-extra] [llvm] [clang-tools-extra] Revise IDE folder structure (PR #89744)

2024-05-25 Thread Michael Kruse via cfe-commits

Meinersbur wrote:

> This is basically names passed as FOLDER property are very generic. 

They are a little more specific than before (especially when considering 
Compiler-RT which put everything into "Compiler-RT/Misc"). Being more 
contextual would also require more maintenance, e.g. adding the right folder 
name for new artifacts. Only users of CMake's XCode or Visual Studio generators 
even see then, other would not even know something is off when this is not 
done. Hence the goal was to reduce maintenance, i.e. `add_clang_library` 
selects the folder name itself. It only has the type of the target available 
(here: library), so that's what it is restricted to.

> Then this change is +- fine.

Thank you


https://github.com/llvm/llvm-project/pull/89744
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang-tools-extra] [llvm] [clang-tools-extra] Revise IDE folder structure (PR #89744)

2024-05-25 Thread Michael Kruse via cfe-commits

https://github.com/Meinersbur closed 
https://github.com/llvm/llvm-project/pull/89744
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang-tools-extra] c87a7b3 - [clang-tools-extra] Revise IDE folder structure (#89744)

2024-05-25 Thread via cfe-commits
DER "Clang Tools 
Extra/Docs")
 
 if (LLVM_BUILD_DOCS)
   add_dependencies(doxygen doxygen-clang-tools)

diff  --git a/clang-tools-extra/include-cleaner/unittests/CMakeLists.txt 
b/clang-tools-extra/include-cleaner/unittests/CMakeLists.txt
index 1e89534b51116..416535649f622 100644
--- a/clang-tools-extra/include-cleaner/unittests/CMakeLists.txt
+++ b/clang-tools-extra/include-cleaner/unittests/CMakeLists.txt
@@ -4,6 +4,7 @@ set(LLVM_LINK_COMPONENTS
   )
 
 add_custom_target(ClangIncludeCleanerUnitTests)
+set_target_properties(ClangIncludeCleanerUnitTests PROPERTIES FOLDER "Clang 
Tools Extra/Tests")
 add_unittest(ClangIncludeCleanerUnitTests ClangIncludeCleanerTests
   AnalysisTest.cpp
   FindHeadersTest.cpp

diff  --git a/clang-tools-extra/pseudo/include/CMakeLists.txt 
b/clang-tools-extra/pseudo/include/CMakeLists.txt
index 2334cfa12e337..619b00f34a5ca 100644
--- a/clang-tools-extra/pseudo/include/CMakeLists.txt
+++ b/clang-tools-extra/pseudo/include/CMakeLists.txt
@@ -29,3 +29,4 @@ add_custom_command(OUTPUT ${cxx_bnf_inc}
 add_custom_target(cxx_gen
 DEPENDS ${cxx_symbols_inc} ${cxx_bnf_inc}
 VERBATIM)
+set_target_properties(cxx_gen PROPERTIES FOLDER "Clang Tools 
Extra/Sourcegenning")

diff  --git a/clang-tools-extra/pseudo/tool/CMakeLists.txt 
b/clang-tools-extra/pseudo/tool/CMakeLists.txt
index 49e1dc29a5a4e..bead383228396 100644
--- a/clang-tools-extra/pseudo/tool/CMakeLists.txt
+++ b/clang-tools-extra/pseudo/tool/CMakeLists.txt
@@ -26,4 +26,5 @@ add_custom_command(OUTPUT HTMLForestResources.inc
   DEPENDS ${CLANG_SOURCE_DIR}/utils/bundle_resources.py HTMLForest.css 
HTMLForest.js HTMLForest.html
   VERBATIM)
 add_custom_target(clang-pseudo-resources DEPENDS HTMLForestResources.inc)
+set_target_properties(clang-pseudo-resources PROPERTIES FOLDER "Clang Tools 
Extra/Resources")
 add_dependencies(clang-pseudo clang-pseudo-resources)

diff  --git a/clang-tools-extra/pseudo/unittests/CMakeLists.txt 
b/clang-tools-extra/pseudo/unittests/CMakeLists.txt
index 821ca4d0652e1..53583ceb61864 100644
--- a/clang-tools-extra/pseudo/unittests/CMakeLists.txt
+++ b/clang-tools-extra/pseudo/unittests/CMakeLists.txt
@@ -3,6 +3,7 @@ set(LLVM_LINK_COMPONENTS
   )
 
 add_custom_target(ClangPseudoUnitTests)
+set_target_properties(ClangPseudoUnitTests PROPERTIES FOLDER "Clang Tools 
Extra/Tests")
 add_unittest(ClangPseudoUnitTests ClangPseudoTests
   BracketTest.cpp
   CXXTest.cpp

diff  --git a/clang-tools-extra/test/CMakeLists.txt 
b/clang-tools-extra/test/CMakeLists.txt
index 7a1c168e22f97..50546f62259ca 100644
--- a/clang-tools-extra/test/CMakeLists.txt
+++ b/clang-tools-extra/test/CMakeLists.txt
@@ -97,7 +97,6 @@ add_lit_testsuite(check-clang-extra "Running 
clang-tools-extra/test"
${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${CLANG_TOOLS_TEST_DEPS}
)
-set_target_properties(check-clang-extra PROPERTIES FOLDER "Clang extra tools' 
tests")
 
 add_lit_testsuites(CLANG-EXTRA ${CMAKE_CURRENT_SOURCE_DIR}
   DEPENDS ${CLANG_TOOLS_TEST_DEPS}

diff  --git a/clang-tools-extra/unittests/CMakeLists.txt 
b/clang-tools-extra/unittests/CMakeLists.txt
index 086a68e638307..77311540e719f 100644
--- a/clang-tools-extra/unittests/CMakeLists.txt
+++ b/clang-tools-extra/unittests/CMakeLists.txt
@@ -1,5 +1,5 @@
 add_custom_target(ExtraToolsUnitTests)
-set_target_properties(ExtraToolsUnitTests PROPERTIES FOLDER "Extra Tools Unit 
Tests")
+set_target_properties(ExtraToolsUnitTests PROPERTIES FOLDER "Clang Tools 
Extra/Tests")
 
 function(add_extra_unittest test_dirname)
   add_unittest(ExtraToolsUnitTests ${test_dirname} ${ARGN})



___
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   >