[clang] [Clang] Only non-overloaded dereference expressions are lvalues (PR #93457)

2024-05-27 Thread via cfe-commits
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]

[clang] [clang-tools-extra] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-05-27 Thread Kim Gräsman via cfe-commits
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

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

2024-05-27 Thread via cfe-commits
@@ -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

[clang] [clang-tools-extra] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-05-27 Thread Krystian Stasiowski via cfe-commits
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).

[clang] [llvm] [IR] Add getelementptr nusw and nuw flags (PR #90824)

2024-05-27 Thread Nikita Popov via cfe-commits
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 ---

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-27 Thread kadir çetinkaya via cfe-commits
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

[clang] 7a28a5b - [clang][Sema] Fix crash when diagnosing candidates with parameter packs (#93079)

2024-05-27 Thread via 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:

[clang] [llvm] [AMDGPU] Add amdgpu-as MMRA for fences (PR #78572)

2024-05-27 Thread Pierre van Houtryve via cfe-commits
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

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-27 Thread kadir çetinkaya via 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

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

2024-05-27 Thread via cfe-commits
@@ -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:

[clang] [cmake] Respect CLANG_LINK_CLANG_DYLIB for objlibs (PR #93454)

2024-05-27 Thread via cfe-commits
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

[clang] [cmake] Respect CLANG_LINK_CLANG_DYLIB for objlibs (PR #93454)

2024-05-27 Thread Nikita Popov via cfe-commits
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

[clang] [Sema] Fix an out-of-bounds crash when diagnosing bad conversion for a function with a parameter pack. (PR #92721)

2024-05-27 Thread via cfe-commits
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 --

[clang] [Sema] Fix an out-of-bounds crash when diagnosing bad conversion for a function with a parameter pack. (PR #92721)

2024-05-27 Thread Haojian Wu via cfe-commits
@@ -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 ?

[clang] [Sema] Fix an out-of-bounds crash when diagnosing bad conversion for a function with a parameter pack. (PR #92721)

2024-05-27 Thread Haojian Wu via cfe-commits
@@ -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 ?

[clang] [Sema] Fix an out-of-bounds crash when diagnosing bad conversion for a function with a parameter pack. (PR #92721)

2024-05-27 Thread Haojian Wu via cfe-commits
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

[clang] [Sema] Fix an out-of-bounds crash when diagnosing bad conversion for a function with a parameter pack. (PR #92721)

2024-05-27 Thread Haojian Wu via cfe-commits
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

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

2024-05-27 Thread Matheus Izvekov via 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

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
@@ -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

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
@@ -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

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
@@ -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

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
@@ -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

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-05-27 Thread Sebastian Kreutzer via cfe-commits
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

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-05-27 Thread Nick Zavaritsky via cfe-commits
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

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-27 Thread kadir çetinkaya via 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

[clang] [llvm] [llvm] Add triples for managarm (PR #87845)

2024-05-27 Thread via cfe-commits
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

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

2024-05-27 Thread Matheus Izvekov via cfe-commits
@@ -1086,45 +1106,100 @@ void TextNodeDumper::VisitNullTemplateArgument(const TemplateArgument &) { void TextNodeDumper::VisitTypeTemplateArgument(const TemplateArgument ) { OS << " type"; - dumpType(TA.getAsType()); + dumpTemplateArgument(TA); } void

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

2024-05-27 Thread Matheus Izvekov via cfe-commits
@@ -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,

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

2024-05-27 Thread Matheus Izvekov via cfe-commits
@@ -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,

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

2024-05-27 Thread Mariya Podchishchaeva via cfe-commits
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

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

2024-05-27 Thread Mariya Podchishchaeva 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"

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

2024-05-27 Thread Mariya Podchishchaeva via cfe-commits
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

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

2024-05-27 Thread via cfe-commits
@@ -1086,45 +1106,100 @@ void TextNodeDumper::VisitNullTemplateArgument(const TemplateArgument &) { void TextNodeDumper::VisitTypeTemplateArgument(const TemplateArgument ) { OS << " type"; - dumpType(TA.getAsType()); + dumpTemplateArgument(TA); } void

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

2024-05-27 Thread via cfe-commits
@@ -1086,45 +1106,100 @@ void TextNodeDumper::VisitNullTemplateArgument(const TemplateArgument &) { void TextNodeDumper::VisitTypeTemplateArgument(const TemplateArgument ) { OS << " type"; - dumpType(TA.getAsType()); + dumpTemplateArgument(TA); } void

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

2024-05-27 Thread via cfe-commits
@@ -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,

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

2024-05-27 Thread via cfe-commits
@@ -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,

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

2024-05-27 Thread via cfe-commits
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

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

2024-05-27 Thread via 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

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

2024-05-27 Thread Younan Zhang via cfe-commits
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

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

2024-05-27 Thread via 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

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

2024-05-27 Thread Balázs Kéri via cfe-commits
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

[clang] 76b9d38 - [clang][analyzer] PutenvStackArrayChecker: No warning from 'main' (#93299)

2024-05-27 Thread via 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

[clang] 0f85b25 - [clang] NFC: add a test case for TemplateName canonical type print issue

2024-05-27 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2024-05-27T04:45:20-03:00 New Revision: 0f85b25f51a3e06c48b3fe8042a3de1cf0e635d7 URL: https://github.com/llvm/llvm-project/commit/0f85b25f51a3e06c48b3fe8042a3de1cf0e635d7 DIFF:

[clang] [analyzer] Fix a test issue in mingw configurations (PR #92737)

2024-05-27 Thread Martin Storsjö via cfe-commits
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

[clang] f31b197 - [analyzer] Fix a test issue in mingw configurations (#92737)

2024-05-27 Thread via 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:

[clang] [llvm] [AMDGPU][WIP] Extend permlane16, permlanex16 and permlane64 intrinsic lowering for generic types (PR #92725)

2024-05-27 Thread Vikram Hegde via cfe-commits
@@ -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()) {

[clang] [llvm] [AMDGPU][WIP] Extend permlane16, permlanex16 and permlane64 intrinsic lowering for generic types (PR #92725)

2024-05-27 Thread Vikram Hegde via cfe-commits
@@ -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

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

2024-05-27 Thread Younan Zhang via cfe-commits
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)

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

2024-05-27 Thread Younan Zhang via cfe-commits
@@ -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() ==

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

2024-05-27 Thread Younan Zhang via cfe-commits
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

[clang] [serialization] no transitive decl change (PR #92083)

2024-05-27 Thread Chuanqi Xu via cfe-commits
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

[clang] [serialization] no transitive decl change (PR #92083)

2024-05-27 Thread Chuanqi Xu via 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);

[clang] [serialization] no transitive decl change (PR #92083)

2024-05-27 Thread Chuanqi Xu via cfe-commits
@@ -7802,20 +7800,31 @@ Decl *ASTReader::GetDecl(GlobalDeclID ID) { LocalDeclID ASTReader::mapGlobalIDToModuleFileGlobalID(ModuleFile , GlobalDeclID GlobalID) { - DeclID ID = GlobalID.get(); - if (ID <

[clang] [serialization] no transitive decl change (PR #92083)

2024-05-27 Thread Chuanqi Xu via cfe-commits
@@ -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

[clang] [serialization] no transitive decl change (PR #92083)

2024-05-27 Thread Chuanqi Xu via cfe-commits
@@ -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

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

2024-05-27 Thread Nathan Ridge via cfe-commits
@@ -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() ==

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

2024-05-27 Thread Nathan Ridge via cfe-commits
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

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

2024-05-27 Thread Nathan Ridge via cfe-commits
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

[clang] [serialization] no transitive decl change (PR #92083)

2024-05-27 Thread Chuanqi Xu via 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 ---

<    1   2   3