https://github.com/cor3ntin created
https://github.com/llvm/llvm-project/pull/93457
Fix a regression introduced by #88740
Fixes #92275
>From 437558af94c8e59a98b26f23fabd4850c2da7131 Mon Sep 17 00:00:00 2001
From: Corentin Jabot
Date: Mon, 27 May 2024 13:07:50 +0200
Subject: [PATCH] [Clang]
kimgr wrote:
@sdkrystian Thank you! I think there's some more subtleties to it, but I don't
really have my head around it yet. I'll first try to understand what we're
trying to achieve and then ping back of I need help with something concrete.
https://github.com/llvm/llvm-project/pull/81642
@@ -0,0 +1,330 @@
+// RUN: %check_clang_tidy %s bugprone-null-check-after-dereference %t
+
+struct S {
+ int a;
+};
+
+int warning_deref(int *p) {
+ *p = 42;
+
+ if (p) {
+// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: pointer value is checked even
though it cannot be null
sdkrystian wrote:
@kimgr The linked code seems to only be concerned with the `SourceLocation` of
the `Decl` (which should be the same `SourceLocation` returned by
`Decl::getLocation`), and the template arguments as written (which can be
accessed via `getTemplateArgsAsWritten` per this patch).
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/90824
>From ff4658cf7661003d940452251147ee58315c774c Mon Sep 17 00:00:00 2001
From: Nikita Popov
Date: Thu, 2 May 2024 12:11:18 +0900
Subject: [PATCH 1/7] Add support for getelementptr nusw and nuw
---
https://github.com/kadircet closed
https://github.com/llvm/llvm-project/pull/93079
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: kadir çetinkaya
Date: 2024-05-27T12:18:15+02:00
New Revision: 7a28a5b3fee6c78ad59af79a3d03c00db153c49f
URL:
https://github.com/llvm/llvm-project/commit/7a28a5b3fee6c78ad59af79a3d03c00db153c49f
DIFF:
https://github.com/Pierre-vh closed
https://github.com/llvm/llvm-project/pull/78572
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kadircet updated
https://github.com/llvm/llvm-project/pull/93079
From 98ae27a0d303252a23891b204df18112a846f661 Mon Sep 17 00:00:00 2001
From: Kadir Cetinkaya
Date: Wed, 22 May 2024 19:37:18 +0200
Subject: [PATCH] [clang][Sema] Fix crash when diagnosing candidates with
@@ -0,0 +1,171 @@
+//===--- NullCheckAfterDereferenceCheck.cpp -
clang-tidy---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Nikita Popov (nikic)
Changes
add_clang_library() will create a library clangFoo that depends on objlib
obj.clangFoo. Then clang_target_link_libraries() will add a clang-cpp
dependency to clangFoo, but obj.clangFoo will instead get
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/93454
add_clang_library() will create a library clangFoo that depends on objlib
obj.clangFoo. Then clang_target_link_libraries() will add a clang-cpp
dependency to clangFoo, but obj.clangFoo will instead get
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 7429950d840b8fec3d9a48d00e612a3240c2be83
4358b43e283cb13dbe4d32fcce3c68b6da15b12a --
@@ -11298,8 +11298,14 @@ static void DiagnoseBadConversion(Sema ,
OverloadCandidate *Cand,
Expr *FromExpr = Conv.Bad.FromExpr;
QualType FromTy = Conv.Bad.getFromType();
QualType ToTy = Conv.Bad.getToType();
- SourceRange ToParamRange =
- !isObjectArgument ?
@@ -11298,8 +11298,14 @@ static void DiagnoseBadConversion(Sema ,
OverloadCandidate *Cand,
Expr *FromExpr = Conv.Bad.FromExpr;
QualType FromTy = Conv.Bad.getFromType();
QualType ToTy = Conv.Bad.getToType();
- SourceRange ToParamRange =
- !isObjectArgument ?
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/92721
>From e2dc2cecee5891b88ff4c2e473220cc9fd36df34 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Sun, 19 May 2024 22:47:14 +0200
Subject: [PATCH 1/2] [Sema] Fix an out-of-bounds crash when diagnosing bad
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/92721
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/93431
>From 86e3852d0501bd24738c094359799c72781ad808 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Fri, 24 May 2024 12:22:55 -0300
Subject: [PATCH] [clang] Improve ast-dumper text printing of TemplateArgument
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -std=c++23 %s -ast-dump | FileCheck --check-prefixes=CXX23
%s
+
+namespace cwg2771 { // cwg2771: 18
+
+struct A{
+int a;
+void cwg2771(){
+ int* r =
+}
+};
+// CXX23: CXXMethodDecl{{.+}}cwg2771
+// CXX23-NEXT: CompoundStmt
@@ -240,3 +240,29 @@ void test() {
}
}
#endif
+
+
+#if __cplusplus >= 202302L
Endilll wrote:
Move `#if` inside `namespace`.
https://github.com/llvm/llvm-project/pull/93430
___
cfe-commits mailing list
@@ -240,3 +240,29 @@ void test() {
}
}
#endif
+
+
+#if __cplusplus >= 202302L
+namespace cwg2692 { // cwg2692: 19
+
+ struct A {
+static void f(A); // #cwg2692-1
+void f(this A); // #cwg2692-2
+
+void g();
+ };
+
+ void A::g() {
+(::f)(A()); // expected-error
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -std=c++23 %s -ast-dump | FileCheck --check-prefixes=CXX23
%s
+
+namespace cwg2771 { // cwg2771: 18
+
+struct A{
+int a;
+void cwg2771(){
+ int* r =
Endilll wrote:
You can use `#pragma clang __debug dump ` to
sebastiankreutzer wrote:
> @sebastiankreutzer hey, were you able to reach the maintainers of llvm-xray
> and probe them about its dev status? If yes, can you pls share how to reach
> them and what did they say?
Unfortunately no, I have no direct contact. It was my impression that none of
the
mejedi wrote:
Ping.
https://github.com/llvm/llvm-project/pull/91310
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kadircet updated
https://github.com/llvm/llvm-project/pull/93079
From d133b1bf63ab8c5408497ef4c2d2d629ebcff8eb Mon Sep 17 00:00:00 2001
From: Kadir Cetinkaya
Date: Wed, 22 May 2024 19:37:18 +0200
Subject: [PATCH] [clang][Sema] Fix crash when diagnosing candidates with
no92 wrote:
Ping
https://github.com/llvm/llvm-project/pull/87845
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1086,45 +1106,100 @@ void TextNodeDumper::VisitNullTemplateArgument(const
TemplateArgument &) {
void TextNodeDumper::VisitTypeTemplateArgument(const TemplateArgument ) {
OS << " type";
- dumpType(TA.getAsType());
+ dumpTemplateArgument(TA);
}
void
@@ -947,6 +947,26 @@ void TextNodeDumper::dumpDeclRef(const Decl *D, StringRef
Label) {
});
}
+void TextNodeDumper::dumpTemplateArgument(const TemplateArgument ) {
+ llvm::SmallString<128> Str;
+ {
+llvm::raw_svector_ostream SS(Str);
+TA.print(PrintPolicy, SS,
@@ -947,6 +947,26 @@ void TextNodeDumper::dumpDeclRef(const Decl *D, StringRef
Label) {
});
}
+void TextNodeDumper::dumpTemplateArgument(const TemplateArgument ) {
+ llvm::SmallString<128> Str;
+ {
+llvm::raw_svector_ostream SS(Str);
+TA.print(PrintPolicy, SS,
https://github.com/Fznamznon commented:
Could you please add a release note?
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
@@ -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"
https://github.com/Fznamznon 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
@@ -1086,45 +1106,100 @@ void TextNodeDumper::VisitNullTemplateArgument(const
TemplateArgument &) {
void TextNodeDumper::VisitTypeTemplateArgument(const TemplateArgument ) {
OS << " type";
- dumpType(TA.getAsType());
+ dumpTemplateArgument(TA);
}
void
@@ -1086,45 +1106,100 @@ void TextNodeDumper::VisitNullTemplateArgument(const
TemplateArgument &) {
void TextNodeDumper::VisitTypeTemplateArgument(const TemplateArgument ) {
OS << " type";
- dumpType(TA.getAsType());
+ dumpTemplateArgument(TA);
}
void
@@ -947,6 +947,26 @@ void TextNodeDumper::dumpDeclRef(const Decl *D, StringRef
Label) {
});
}
+void TextNodeDumper::dumpTemplateArgument(const TemplateArgument ) {
+ llvm::SmallString<128> Str;
+ {
+llvm::raw_svector_ostream SS(Str);
+TA.print(PrintPolicy, SS,
@@ -947,6 +947,26 @@ void TextNodeDumper::dumpDeclRef(const Decl *D, StringRef
Label) {
});
}
+void TextNodeDumper::dumpTemplateArgument(const TemplateArgument ) {
+ llvm::SmallString<128> Str;
+ {
+llvm::raw_svector_ostream SS(Str);
+TA.print(PrintPolicy, SS,
https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/93431
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cor3ntin commented:
Thanks!
I think this is an improvement but we probably want to find a better syntax
than quotes
https://github.com/llvm/llvm-project/pull/93431
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/zyn0217 closed
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
Author: Younan Zhang
Date: 2024-05-27T15:56:37+08:00
New Revision: 7429950d840b8fec3d9a48d00e612a3240c2be83
URL:
https://github.com/llvm/llvm-project/commit/7429950d840b8fec3d9a48d00e612a3240c2be83
DIFF:
https://github.com/llvm/llvm-project/commit/7429950d840b8fec3d9a48d00e612a3240c2be83.diff
https://github.com/balazske closed
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
Author: Balázs Kéri
Date: 2024-05-27T09:55:10+02:00
New Revision: 76b9d38934572909ffc8c8ef4cd45407f22e6ea7
URL:
https://github.com/llvm/llvm-project/commit/76b9d38934572909ffc8c8ef4cd45407f22e6ea7
DIFF:
https://github.com/llvm/llvm-project/commit/76b9d38934572909ffc8c8ef4cd45407f22e6ea7.diff
Author: Matheus Izvekov
Date: 2024-05-27T04:45:20-03:00
New Revision: 0f85b25f51a3e06c48b3fe8042a3de1cf0e635d7
URL:
https://github.com/llvm/llvm-project/commit/0f85b25f51a3e06c48b3fe8042a3de1cf0e635d7
DIFF:
https://github.com/mstorsjo closed
https://github.com/llvm/llvm-project/pull/92737
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Martin Storsjö
Date: 2024-05-27T10:18:03+03:00
New Revision: f31b197d9df141effd439de8be51ce24f3e8f200
URL:
https://github.com/llvm/llvm-project/commit/f31b197d9df141effd439de8be51ce24f3e8f200
DIFF:
@@ -5433,7 +5450,16 @@ bool AMDGPULegalizerInfo::legalizeLaneOp(LegalizerHelper
,
? Src0
: B.buildBitcast(LLT::scalar(Size),
Src0).getReg(0);
Src0 = B.buildAnyExt(S32, Src0Cast).getReg(0);
-if (Src2.isValid()) {
@@ -18479,6 +18479,25 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned
BuiltinID,
CGM.getIntrinsic(Intrinsic::amdgcn_update_dpp, Args[0]->getType());
return Builder.CreateCall(F, Args);
}
+ case AMDGPU::BI__builtin_amdgcn_permlane16:
+ case
zyn0217 wrote:
(I'll merge it shortly if CI turns green because I encountered the bug the
other day in our codebase. Apologies I didn't point it out in my review for
https://github.com/llvm/llvm-project/commit/bc31be7949a3d5382be0e15e3957fa957da9de45)
@@ -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() ==
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/93404
>From 7639cb738dfb876c7abdf7337fad3aa80e912736 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Sun, 26 May 2024 15:52:31 +0800
Subject: [PATCH 1/2] [clang][CodeComplete] Recurse into the subexpression of
ChuanqiXu9 wrote:
Thanks for reviewing : )
https://github.com/llvm/llvm-project/pull/92083
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -111,6 +109,28 @@ void *Decl::operator new(std::size_t Size, const
ASTContext ,
return ::operator new(Size + Extra, Ctx);
}
+GlobalDeclID Decl::getGlobalID() const {
+ if (!isFromASTFile())
+return GlobalDeclID();
+ uint64_t ID = *((const uint64_t *)this - 1);
@@ -7802,20 +7800,31 @@ Decl *ASTReader::GetDecl(GlobalDeclID ID) {
LocalDeclID ASTReader::mapGlobalIDToModuleFileGlobalID(ModuleFile ,
GlobalDeclID GlobalID) {
- DeclID ID = GlobalID.get();
- if (ID <
@@ -255,6 +255,12 @@ class DeclOffset {
}
};
+// The unaligned decl ID used in the Blobs of bistreams.
+using unalighed_decl_id_t =
ChuanqiXu9 wrote:
Nice catch! Done in
https://github.com/llvm/llvm-project/commit/e73e4951b20c70f24354e2a2820876c818dcaee3
@@ -124,6 +130,15 @@ class DeclIDBase {
bool isInvalid() const { return ID == PREDEF_DECL_NULL_ID; }
+ unsigned getModuleFileIndex() const { return ID >> 32; }
+
+ unsigned getLocalDeclIndex() const {
+// Implement it directly instead of calling
@@ -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() ==
https://github.com/HighCommander4 approved this pull request.
Thank you! Looks good with one suggested change.
https://github.com/llvm/llvm-project/pull/93404
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/HighCommander4 edited
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
https://github.com/ChuanqiXu9 updated
https://github.com/llvm/llvm-project/pull/92083
>From 8b7a650e128d6f2bfec9b0768169cf4aaa4af337 Mon Sep 17 00:00:00 2001
From: Chuanqi Xu
Date: Fri, 10 May 2024 15:36:31 +0800
Subject: [PATCH] [serialization] no transitive decl change
---
201 - 259 of 259 matches
Mail list logo