[clang] [InstallAPI] Verify that declarations in headers map to exports found in dylib (PR #85348)

2024-03-18 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 f2794ccede6d32a6b5ef7a376ced420331e2be27 4a44bf9825d86326b24848c62135966d8a85158d --

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-18 Thread via cfe-commits
https://github.com/T-Gruber updated https://github.com/llvm/llvm-project/pull/85104 >From 0f964127ed91e23f8e969e08ce680535cfeb8906 Mon Sep 17 00:00:00 2001 From: Andreas Steinhausen Date: Wed, 13 Mar 2024 17:07:53 +0100 Subject: [PATCH 01/12] Adapted MemRegion::getDescriptiveName to handle

[clang] [InstallAPI] Verify that declarations in headers map to exports found in dylib (PR #85348)

2024-03-18 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/85348 >From d45081b0270f20a1313a35bd4ae12343e265ce7b Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 13 Mar 2024 18:57:14 -0700 Subject: [PATCH 1/2] [InstallAPI] Verify that declarations in header map to

[clang] [llvm] [CodeGen][LLVM] Make the `va_list` related intrinsics generic. (PR #85460)

2024-03-18 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > Doesn’t AutoUpgrade automatically infer overloads? You can see a bunch of > tests in this patch where the output references the overloaded intrinsics but > the input is unchanged. OK it seems to be handled already and test covered. Thanks.

[clang-tools-extra] [clang-tidy][NFC] Remove unnecessary nullptr check on cast subexpr (PR #85473)

2024-03-18 Thread Mike Rice via cfe-commits
mikerice1969 wrote: I mentioned the assert just to make the point that setSubExpr is written so it doesn't return a nullptr. So it is not expected and the deference is ok. I went ahead with this change but feel free to update if you like. But adding a return when nullptr is seen here would

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-18 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/84014 >From bdefe754c14c5e050ebf2b9c82eca458041564a4 Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Tue, 5 Mar 2024 05:35:16 -0800 Subject: [PATCH 1/9] [clang-cl] Fix value of __FUNCTION__ in MSVC mode.

[clang] [llvm] [CodeGen][LLVM] Make the `va_list` related intrinsics generic. (PR #85460)

2024-03-18 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: Doesn’t AutoUpgrade automatically infer overloads? You can see a bunch of tests in this patch where the output references the overloaded intrinsics but the input is unchanged. https://github.com/llvm/llvm-project/pull/85460 ___

[clang-tools-extra] [clang-tidy][NFC] Remove unnecessary nullptr check on cast subexpr (PR #85473)

2024-03-18 Thread Mike Rice via cfe-commits
https://github.com/mikerice1969 closed https://github.com/llvm/llvm-project/pull/85473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 57914f6 - [clang-tidy][NFC] Remove unnecessary nullptr check on cast subexpr (#85473)

2024-03-18 Thread via cfe-commits
Author: Mike Rice Date: 2024-03-18T08:44:55-07:00 New Revision: 57914f647e2551ea19758038345bb8bc2c4762c1 URL: https://github.com/llvm/llvm-project/commit/57914f647e2551ea19758038345bb8bc2c4762c1 DIFF: https://github.com/llvm/llvm-project/commit/57914f647e2551ea19758038345bb8bc2c4762c1.diff

[clang] [Driver] -fsanitize=undefined: don't expand to signed-integer-overflow if -fwrapv (PR #85501)

2024-03-18 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: What's up with the commit message on this PR? Why is it so different from the PR description? https://github.com/llvm/llvm-project/pull/85501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Catch missing format attributes (PR #70024)

2024-03-18 Thread Budimir Aranđelović via cfe-commits
@@ -6849,6 +6849,71 @@ static void handleSwiftAsyncAttr(Sema , Decl *D, const ParsedAttr ) { checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr); } +// Warn if parent function misses format attribute. Parent function misses +// format attribute if there is an argument

[clang] [dataflow] CXXForRangeStmt should extend flow condition (PR #80989)

2024-03-18 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 1b87ebce924e507cbc27c2e0dc623941d16388c9 9cbe0ef60f0154cbbefaa7d3092d65e4a4ab4d2a --

[clang] [llvm] [CodeGen][LLVM] Make the `va_list` related intrinsics generic. (PR #85460)

2024-03-18 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: Is LLVM IR using the old vaarg intrinsics still consumable? Should we update AutoUpgrade.cpp to auto upgrade the old vaarg intrinsics and add a test for them? https://github.com/llvm/llvm-project/pull/85460 ___ cfe-commits mailing

[clang] [dataflow] CXXForRangeStmt should extend flow condition (PR #80989)

2024-03-18 Thread Paul Semel via cfe-commits
@@ -1710,4 +1710,25 @@ TEST_F(TopTest, ForRangeStmtConverges) { // analysis converged. }); } + +TEST_F(TopTest, ForRangeStmtHasFlowCondition) { + std::string Code = R"( +#include +void target(bool Foo) { + std::array t; + for

[clang] [dataflow] CXXForRangeStmt should extend flow condition (PR #80989)

2024-03-18 Thread Paul Semel via cfe-commits
https://github.com/paulsemel updated https://github.com/llvm/llvm-project/pull/80989 >From 9cbe0ef60f0154cbbefaa7d3092d65e4a4ab4d2a Mon Sep 17 00:00:00 2001 From: Paul Semel Date: Wed, 7 Feb 2024 13:06:40 + Subject: [PATCH] [dataflow] CXXForRangeStmt should extend flow condition This is

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-18 Thread Zahira Ammarguellat via cfe-commits
@@ -855,7 +868,17 @@ void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) { Out << Proto << " -> "; Proto.clear(); } - AFT->getReturnType().print(Out, Policy, Proto); + if (!Policy.SuppressTagKeyword && Policy.SuppressScope && +

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-18 Thread via cfe-commits
https://github.com/T-Gruber updated https://github.com/llvm/llvm-project/pull/85104 >From 0f964127ed91e23f8e969e08ce680535cfeb8906 Mon Sep 17 00:00:00 2001 From: Andreas Steinhausen Date: Wed, 13 Mar 2024 17:07:53 +0100 Subject: [PATCH 01/12] Adapted MemRegion::getDescriptiveName to handle

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-18 Thread via cfe-commits
https://github.com/NagyDonat approved this pull request. LGTM. Using this unit test framework is significantly cleaner than my suggestion that tries to work around the limitations of ArrayBoundV2. https://github.com/llvm/llvm-project/pull/85104 ___

[clang] [clang-format] Add Options to break inside the TableGen DAGArg. (PR #83149)

2024-03-18 Thread Hirofumi Nakamura via cfe-commits
hnakamura5 wrote: Thank you very much! I really appreciate you for reviewing up to such a complicated option. https://github.com/llvm/llvm-project/pull/83149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-18 Thread via cfe-commits
T-Gruber wrote: Alright, I added a test case which leads to an incorrect index due to the use of getOriginRegion. I also added a FIXME comment to document that this case is not covered currently. https://github.com/llvm/llvm-project/pull/85104 ___

[clang] [clang][dataflow][NFC] Rename `ControlFlowContext` to `AdornedCFG`. (PR #85640)

2024-03-18 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/85640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-18 Thread via cfe-commits
https://github.com/T-Gruber updated https://github.com/llvm/llvm-project/pull/85104 >From 0f964127ed91e23f8e969e08ce680535cfeb8906 Mon Sep 17 00:00:00 2001 From: Andreas Steinhausen Date: Wed, 13 Mar 2024 17:07:53 +0100 Subject: [PATCH 01/11] Adapted MemRegion::getDescriptiveName to handle

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

2024-03-18 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/84050 >From 67d9b107a1e5dde52769f6e7d9dc41b1d777cb60 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 1 Mar 2024 08:08:52 -0500 Subject: [PATCH 01/14] [Clang][Sema] Earlier resolution of class member

[clang] [clang-format] Add Options to break inside the TableGen DAGArg. (PR #83149)

2024-03-18 Thread Hirofumi Nakamura via cfe-commits
https://github.com/hnakamura5 closed https://github.com/llvm/llvm-project/pull/83149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0c423af - [clang-format] Add Options to break inside the TableGen DAGArg. (#83149)

2024-03-18 Thread via cfe-commits
Author: Hirofumi Nakamura Date: 2024-03-19T00:13:59+09:00 New Revision: 0c423af59c971ddf1aa12d94529edf8293608157 URL: https://github.com/llvm/llvm-project/commit/0c423af59c971ddf1aa12d94529edf8293608157 DIFF:

[clang] [clang][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-03-18 Thread Daniel Anderson via cfe-commits
DanielLiamAnderson wrote: This would be really useful for [ParlayLib](https://github.com/cmuparlay/parlaylib). We implement our own is_trivially_relocatable which is not nearly as reliable as having the compiler do it. I support this PR's semantics; types with non-defaulted assignment

[clang] nolock/noalloc attributes (PR #84983)

2024-03-18 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos edited https://github.com/llvm/llvm-project/pull/84983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nolock/noalloc attributes (PR #84983)

2024-03-18 Thread via cfe-commits
@@ -3922,6 +3922,42 @@ bool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *, Scope *S, return true; } + const auto OldFX = Old->getFunctionEffects(); + const auto NewFX = New->getFunctionEffects(); + if (OldFX != NewFX) { +const auto Diffs =

[clang] nolock/noalloc attributes (PR #84983)

2024-03-18 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos edited https://github.com/llvm/llvm-project/pull/84983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d56110f - [clang][Interp] Fix _Complex comma operators

2024-03-18 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-03-18T16:02:40+01:00 New Revision: d56110fa025b58e57602a254c841e6e41ea46a42 URL: https://github.com/llvm/llvm-project/commit/d56110fa025b58e57602a254c841e6e41ea46a42 DIFF: https://github.com/llvm/llvm-project/commit/d56110fa025b58e57602a254c841e6e41ea46a42.diff

[clang] nolock/noalloc attributes (PR #84983)

2024-03-18 Thread Doug Wyatt via cfe-commits
@@ -3922,6 +3922,42 @@ bool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *, Scope *S, return true; } + const auto OldFX = Old->getFunctionEffects(); + const auto NewFX = New->getFunctionEffects(); + if (OldFX != NewFX) { +const auto Diffs =

[clang] [clang][dataflow] Model assignment to derived class from base. (PR #85064)

2024-03-18 Thread via cfe-commits
@@ -14,18 +14,52 @@ #define DEBUG_TYPE "dataflow" -void clang::dataflow::copyRecord(RecordStorageLocation , - RecordStorageLocation , Environment ) { +namespace clang::dataflow { + +static void copyField(const ValueDecl *Field,

[clang] [clang][dataflow] Model assignment to derived class from base. (PR #85064)

2024-03-18 Thread via cfe-commits
@@ -212,8 +212,23 @@ TEST(TransferTest, CopyRecordFromDerivedToBase) { // [[p]] } )"; + auto SyntheticFieldCallback = [](QualType Ty) -> llvm::StringMap { +CXXRecordDecl *ADecl = nullptr; +if (Ty.getAsString() == "A") + ADecl =

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-18 Thread via cfe-commits
@@ -226,6 +226,20 @@ ProgramStateRef ProgramState::killBinding(Loc LV) const { return makeWithStore(newStore); } +/// FieldRegions are expected to be wrapped by an ElementRegion as a canonical +/// representation. See f8643a9b31c4029942f67d4534c9139b45173504 why.

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-18 Thread via cfe-commits
@@ -226,6 +226,20 @@ ProgramStateRef ProgramState::killBinding(Loc LV) const { return makeWithStore(newStore); } +/// FieldRegions are expected to be wrapped by an ElementRegion as a canonical +/// representation. See f8643a9b31c4029942f67d4534c9139b45173504 why. +SVal

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-18 Thread via cfe-commits
https://github.com/NagyDonat approved this pull request. Thanks for the update! Unfortunately I have some additional minor remarks (sorry for not catching them in the first round). https://github.com/llvm/llvm-project/pull/85211 ___ cfe-commits

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-18 Thread via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/85211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Model assignment to derived class from base. (PR #85064)

2024-03-18 Thread via cfe-commits
https://github.com/martinboehme edited https://github.com/llvm/llvm-project/pull/85064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Model assignment to derived class from base. (PR #85064)

2024-03-18 Thread via cfe-commits
@@ -35,45 +69,27 @@ void clang::dataflow::copyRecord(RecordStorageLocation , }); assert(compatibleTypes); - for (auto [Field, DstFieldLoc] : Dst.children()) { -StorageLocation *SrcFieldLoc = Src.getChild(*Field); - -assert(Field->getType()->isReferenceType() || -

[clang] [clang][dataflow][NFC] Rename `ControlFlowContext` to `AdornedCFG`. (PR #85640)

2024-03-18 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/85640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Model assignment to derived class from base. (PR #85064)

2024-03-18 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/85064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Model assignment to derived class from base. (PR #85064)

2024-03-18 Thread Gábor Horváth via cfe-commits
@@ -212,8 +212,23 @@ TEST(TransferTest, CopyRecordFromDerivedToBase) { // [[p]] } )"; + auto SyntheticFieldCallback = [](QualType Ty) -> llvm::StringMap { +CXXRecordDecl *ADecl = nullptr; +if (Ty.getAsString() == "A") + ADecl =

[clang] [clang][dataflow] Model assignment to derived class from base. (PR #85064)

2024-03-18 Thread Gábor Horváth via cfe-commits
@@ -35,45 +69,27 @@ void clang::dataflow::copyRecord(RecordStorageLocation , }); assert(compatibleTypes); - for (auto [Field, DstFieldLoc] : Dst.children()) { -StorageLocation *SrcFieldLoc = Src.getChild(*Field); - -assert(Field->getType()->isReferenceType() || -

[clang] [clang][dataflow] Model assignment to derived class from base. (PR #85064)

2024-03-18 Thread Gábor Horváth via cfe-commits
@@ -14,18 +14,52 @@ #define DEBUG_TYPE "dataflow" -void clang::dataflow::copyRecord(RecordStorageLocation , - RecordStorageLocation , Environment ) { +namespace clang::dataflow { + +static void copyField(const ValueDecl *Field,

[libclc] [libclc] Convert tabs to spaces in CMake (PR #85634)

2024-03-18 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: > > FWIW I don't think the build bots are actually building `libclc`. > > Locally, at least, it's not sufficient to specify > > `LLVM_ENABLE_PROJECTS=libclc` - you _also_ need > > `LLVM_EXTERNAL_PROJECTS=libclc`. Even then, it doesn't build for me > > in-tree, because it

[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-03-18 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > > There is a Windows failure that I can't reproduce: > > https://buildkite.com/llvm-project/github-pull-requests/builds/46331 Can > > someone help me to figure out what is wrong? > > I'm not certain what's going on yet, but it smells a bit like the interpreter > needs to

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-18 Thread Aaron Ballman via cfe-commits
@@ -679,6 +679,19 @@ static void printExplicitSpecifier(ExplicitSpecifier ES, llvm::raw_ostream , Out << Proto; } +static void AddPrefix(PrintingPolicy , QualType T, + llvm::raw_ostream ) { + if (!Policy.SuppressTagKeyword && Policy.SuppressScope && +

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-18 Thread Aaron Ballman via cfe-commits
@@ -855,7 +868,17 @@ void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) { Out << Proto << " -> "; Proto.clear(); } - AFT->getReturnType().print(Out, Policy, Proto); + if (!Policy.SuppressTagKeyword && Policy.SuppressScope && +

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-18 Thread Aaron Ballman via cfe-commits
@@ -679,6 +679,19 @@ static void printExplicitSpecifier(ExplicitSpecifier ES, llvm::raw_ostream , Out << Proto; } +static void AddPrefix(PrintingPolicy , QualType T, AaronBallman wrote: This is a pretty non-descriptive function name; the caller will have

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-18 Thread Aaron Ballman via cfe-commits
@@ -1635,6 +1635,17 @@ void TypePrinter::printElaboratedBefore(const ElaboratedType *T, if (T->getKeyword() != ElaboratedTypeKeyword::None) OS << " "; NestedNameSpecifier *Qualifier = T->getQualifier(); +if (!Policy.SuppressTagKeyword && Policy.SuppressScope

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-18 Thread Aaron Ballman via cfe-commits
@@ -855,7 +868,17 @@ void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) { Out << Proto << " -> "; Proto.clear(); } - AFT->getReturnType().print(Out, Policy, Proto); + if (!Policy.SuppressTagKeyword && Policy.SuppressScope && +

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-18 Thread Aaron Ballman via cfe-commits
@@ -1022,7 +1045,17 @@ void DeclPrinter::VisitVarDecl(VarDecl *D) { ? D->getIdentifier()->deuglifiedName() : D->getName(); - printDeclType(T, Name); + if (!Policy.SuppressTagKeyword && Policy.SuppressScope && + !Policy.SuppressUnwrittenScope)

[libclc] 9253950 - [libclc] Convert tabs to spaces in CMake (#85634)

2024-03-18 Thread via cfe-commits
Author: Fraser Cormack Date: 2024-03-18T14:37:04Z New Revision: 9253950ec1690e786ba1cdaaf3234fb30b633eab URL: https://github.com/llvm/llvm-project/commit/9253950ec1690e786ba1cdaaf3234fb30b633eab DIFF: https://github.com/llvm/llvm-project/commit/9253950ec1690e786ba1cdaaf3234fb30b633eab.diff

[libclc] [libclc] Convert tabs to spaces in CMake (PR #85634)

2024-03-18 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/85634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e2e3624 - [clang][test] Try to fix constexpr-void-cast test

2024-03-18 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-03-18T15:35:39+01:00 New Revision: e2e3624fae669f85de1445bf7037ff29feb30905 URL: https://github.com/llvm/llvm-project/commit/e2e3624fae669f85de1445bf7037ff29feb30905 DIFF: https://github.com/llvm/llvm-project/commit/e2e3624fae669f85de1445bf7037ff29feb30905.diff

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-18 Thread via cfe-commits
NagyDonat wrote: Since suggesting that "matrix" testcase I realized that it won't work, because `ArrayBoundV2` doesn't perform bounds checking for the lower-dimensional sub-arrays of a multidimensional array (it only checks that the accessed memory location is within the full array). For

[clang] add some missing Kinds to libclang python bindings (PR #85571)

2024-03-18 Thread via cfe-commits
github-actions[bot] wrote: @16bit-ykiko Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a

[clang] add some missing Kinds to libclang python bindings (PR #85571)

2024-03-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/85571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] eb264d8 - Add some missing Kinds to libclang python bindings (#85571)

2024-03-18 Thread via cfe-commits
Author: ykiko Date: 2024-03-18T10:13:10-04:00 New Revision: eb264d825beb048c6e673ddaf5aca069511fcfb3 URL: https://github.com/llvm/llvm-project/commit/eb264d825beb048c6e673ddaf5aca069511fcfb3 DIFF: https://github.com/llvm/llvm-project/commit/eb264d825beb048c6e673ddaf5aca069511fcfb3.diff LOG:

[clang] add some missing Kinds to libclang python bindings (PR #85571)

2024-03-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/85571 >From e61c6511b274c2503c02a8eb6c2c1d8bf902c106 Mon Sep 17 00:00:00 2001 From: ykiko <486685...@qq.com> Date: Mon, 18 Mar 2024 00:01:47 +0800 Subject: [PATCH 1/4] add some missing CursorKinds in libclang

[clang] add some missing Kinds to libclang python bindings (PR #85571)

2024-03-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Nit, I'll fix when landing. https://github.com/llvm/llvm-project/pull/85571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] add some missing Kinds to libclang python bindings (PR #85571)

2024-03-18 Thread Aaron Ballman via cfe-commits
@@ -544,6 +544,8 @@ Python Binding Changes -- - Exposed `CXRewriter` API as `class Rewriter`. +- Add some missing kinds from Index.h (CursorKind: 149-156, 272-320, 420-437. + TemplateArgumentKind: 5-9. TypeKind: 161-175 and 178).

[clang] add some missing Kinds to libclang python bindings (PR #85571)

2024-03-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/85571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] add some missing Kinds to libclang python bindings (PR #85571)

2024-03-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/85571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/85211 >From bde85e0d145049a6661afba6f4585865c5630792 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Thu, 14 Mar 2024 12:38:12 +0100 Subject: [PATCH 1/3] [analyzer] Wrap SymbolicRegions by ElementRegions before

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-18 Thread Balazs Benics via cfe-commits
steakhal wrote: > Hi @steakhal, just to be sure. We are talking about a test case that covers > that the index is "recognised" as a wrong variable (the matrix example above)? Exactly! https://github.com/llvm/llvm-project/pull/85104 ___ cfe-commits

[clang] [analyzer] Allow egraph rewriter not to open the generated HTML directly (PR #85515)

2024-03-18 Thread Balazs Benics via cfe-commits
@@ -1186,6 +1192,14 @@ def main(): "displaying it, dump the rewritten dot file " "to stdout", ) +dump_conflict.add_argument( +"--dump-html-only", +action="store_const", +dest="dump_html_only", +const=True, +

[clang] [analyzer] Allow egraph rewriter not to open the generated HTML directly (PR #85515)

2024-03-18 Thread Balazs Benics via cfe-commits
@@ -479,12 +479,15 @@ def add_raw_line(self, raw_line): # A visitor that dumps the ExplodedGraph into a DOT file with fancy HTML-based # syntax highlighing. class DotDumpVisitor: -def __init__(self, do_diffs, dark_mode, gray_mode, topo_mode, dump_dot_only): +def

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-18 Thread via cfe-commits
T-Gruber wrote: Hi @steakhal, just to be sure. We are talking about a test case that covers that the index is "recognised" as a wrong variable (the matrix example above)? https://github.com/llvm/llvm-project/pull/85104 ___ cfe-commits mailing list

[clang] [clang][ExprConst] Can't be past an invalid LValue designator (PR #84293)

2024-03-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/84293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4294841 - [clang][ExprConst] Can't be past an invalid LValue designator (#84293)

2024-03-18 Thread via cfe-commits
Author: Timm Baeder Date: 2024-03-18T14:56:16+01:00 New Revision: 4294841ebcbb22076a24267cdf5164c7aeed9941 URL: https://github.com/llvm/llvm-project/commit/4294841ebcbb22076a24267cdf5164c7aeed9941 DIFF: https://github.com/llvm/llvm-project/commit/4294841ebcbb22076a24267cdf5164c7aeed9941.diff

[clang] add some missing Kinds to libclang python bindings (PR #85571)

2024-03-18 Thread via cfe-commits
16bit-ykiko wrote: Sure, I have added the releasenote. https://github.com/llvm/llvm-project/pull/85571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-18 Thread Balazs Benics via cfe-commits
steakhal wrote: @T-Gruber Could you please add that test case with a FIXME? https://github.com/llvm/llvm-project/pull/85104 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] add some missing Kinds to libclang python bindings (PR #85571)

2024-03-18 Thread via cfe-commits
https://github.com/16bit-ykiko updated https://github.com/llvm/llvm-project/pull/85571 >From e61c6511b274c2503c02a8eb6c2c1d8bf902c106 Mon Sep 17 00:00:00 2001 From: ykiko <486685...@qq.com> Date: Mon, 18 Mar 2024 00:01:47 +0800 Subject: [PATCH 1/3] add some missing CursorKinds in libclang

[clang] 1d9fb2e - [clang][Interp] Disable CFStringMakeConstantString test on AIX

2024-03-18 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-03-18T14:53:04+01:00 New Revision: 1d9fb2ee612f0ccf588d40dc4b5445cffd36e8af URL: https://github.com/llvm/llvm-project/commit/1d9fb2ee612f0ccf588d40dc4b5445cffd36e8af DIFF: https://github.com/llvm/llvm-project/commit/1d9fb2ee612f0ccf588d40dc4b5445cffd36e8af.diff

[clang] [clang][dataflow][NFC] Rename `ControlFlowContext` to `AdornedCFG`. (PR #85640)

2024-03-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-analysis Author: None (martinboehme) Changes This expresses better what the class actually does, and it reduces the number of `Context`s that we have in the codebase. A deprecated alias `ControlFlowContext` is available

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-18 Thread Balazs Benics via cfe-commits
steakhal wrote: > I think it's good that we're moving towards establishing the invariant that > the parent of a FieldRegion should always be a typed value region (of a > suitable type) for the sake of consistency. Do I understand it correctly that > this is not too far away? Would it be

[clang] [clang][dataflow][NFC] Rename `ControlFlowContext` to `AdornedCFG`. (PR #85640)

2024-03-18 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/85640 This expresses better what the class actually does, and it reduces the number of `Context`s that we have in the codebase. A deprecated alias `ControlFlowContext` is available from the old header. >From

[libclc] [libclc] Convert tabs to spaces in CMake (PR #85634)

2024-03-18 Thread Tom Stellard via cfe-commits
tstellar wrote: > FWIW I don't think the build bots are actually building `libclc`. > > Locally, at least, it's not sufficient to specify > `LLVM_ENABLE_PROJECTS=libclc` - you _also_ need > `LLVM_EXTERNAL_PROJECTS=libclc`. Even then, it doesn't build for me in-tree, > because it assumes

[clang] nolock/noalloc attributes (PR #84983)

2024-03-18 Thread via cfe-commits
@@ -3922,6 +3922,42 @@ bool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *, Scope *S, return true; } + const auto OldFX = Old->getFunctionEffects(); + const auto NewFX = New->getFunctionEffects(); + if (OldFX != NewFX) { +const auto Diffs =

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-18 Thread Balazs Benics via cfe-commits
@@ -451,6 +451,38 @@ void ProgramState::setStore(const StoreRef ) { store = newStoreStore; } +/// FieldRegions are expected to be wrapped by an ElementRegion as a canonical +/// representation. See f8643a9b31c4029942f67d4534c9139b45173504 why. +static SVal

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/85211 >From bde85e0d145049a6661afba6f4585865c5630792 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Thu, 14 Mar 2024 12:38:12 +0100 Subject: [PATCH 1/2] [analyzer] Wrap SymbolicRegions by ElementRegions before

[libclc] [libclc] Convert tabs to spaces in CMake (PR #85634)

2024-03-18 Thread Tom Stellard via cfe-commits
https://github.com/tstellar approved this pull request. https://github.com/llvm/llvm-project/pull/85634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] add some missing Kinds to libclang python bindings (PR #85571)

2024-03-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Code changes LGTM (we don't require test coverage for bindings, so that's fine), but can you add a release note to `clang/docs/ReleaseNotes.rst` under `Python Binding Changes` so others know about the improvement?

[clang] [Clang] Ignore assumptions with side effects at compile time (PR #85534)

2024-03-18 Thread via cfe-commits
Sirraide wrote: > I think this is also https://eel.is/c++draft/expr.const#6.4, the note is a > bit more clear than the standard wording. That’s also a good point; I sort of forgot about that one. Either way, I’ll wait for a review next time seeing as this was perhaps not that ‘obvious’ of a

[clang] [Clang][Sema] Fix a crash in lambda instantiation (PR #85565)

2024-03-18 Thread via cfe-commits
@@ -13714,6 +13714,12 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { // Capturing 'this' is trivial. if (C->capturesThis()) { + // We need ThisType when build capture in CheckCXXThisCapture. Sirraide wrote: ```suggestion // If

[clang] [Clang][Sema] Fix a crash in lambda instantiation (PR #85565)

2024-03-18 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/85565 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix a crash in lambda instantiation (PR #85565)

2024-03-18 Thread via cfe-commits
https://github.com/Sirraide requested changes to this pull request. LGTM except that the comment could still be worded a bit better—especially since I had to take another look at how this here works exactly, but I believe that this is correct: `CXXThisScopeRAII` does nothing if the context

[clang] [Clang] Ignore assumptions with side effects at compile time (PR #85534)

2024-03-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: LGTM as well. https://github.com/llvm/llvm-project/pull/85534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Ignore assumptions with side effects at compile time (PR #85534)

2024-03-18 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: I think this is also https://eel.is/c++draft/expr.const#6.4, the note is a bit more clear than the standard wording. https://github.com/llvm/llvm-project/pull/85534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][ExprConst] Can't be past an invalid LValue designator (PR #84293)

2024-03-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/84293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland Print library module manifest path again (PR #84881)

2024-03-18 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > > The file we're looking for is `modules.json`; Renaming it > > > `libc++.modules.json` like `.so` / `.a` file might be a better idea which > > > could avoid name clashes when installed in `/usr/lib`. > > > > > > but i didn't rename it, it was with the libc++ prefix

[clang] [llvm] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)

2024-03-18 Thread Matt Arsenault via cfe-commits
@@ -3616,6 +3617,12 @@ unsigned FunctionDecl::getBuiltinID(bool ConsiderWrapperFunctions) const { if (!ConsiderWrapperFunctions && getStorageClass() == SC_Static) return 0; + // AMDGCN implementation supports printf as a builtin + // for OpenCL + if

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-03-18 Thread Zahira Ammarguellat via cfe-commits
@@ -287,9 +288,47 @@ class ComplexExprEmitter ComplexPairTy EmitComplexBinOpLibCall(StringRef LibCallName, const BinOpInfo ); - QualType getPromotionType(QualType Ty) { + QualType GetHigherPrecisionFPType(QualType ElementType) { +

[clang] [Clang][Sema] Fix a crash in lambda instantiation (PR #85565)

2024-03-18 Thread Qizhi Hu via cfe-commits
jcsxky wrote: @Sirraide Very thankful for your comments and it really makes the description more clear and easy to be understood! I have updated this patch following your suggestion and please take another look. https://github.com/llvm/llvm-project/pull/85565

[clang] Reland Print library module manifest path again (PR #84881)

2024-03-18 Thread Mark de Wever via cfe-commits
mordante wrote: > > The file we're looking for is `modules.json`; Renaming it > > `libc++.modules.json` like `.so` / `.a` file might be a better idea which > > could avoid name clashes when installed in `/usr/lib`. > > but i didn't rename it, it was with the libc++ prefix directly :/ Good

[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-03-18 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > There is a Windows failure that I can't reproduce: > https://buildkite.com/llvm-project/github-pull-requests/builds/46331 Can > someone help me to figure out what is wrong? I'm not certain what's going on yet, but it smells a bit like the interpreter needs to know about

[clang] [Sema] Allow -Wno-main to suppress the arg wrong error (PR #85494)

2024-03-18 Thread Aaron Ballman via cfe-commits
@@ -250,6 +250,9 @@ Improvements to Clang's diagnostics such as attempting to call ``free`` on an unallocated object. Fixes `#79443 `_. +- The ``XXX parameter of 'main' must be of type`` error can now be disabled via

[clang] [Sema] Allow -Wno-main to suppress the arg wrong error (PR #85494)

2024-03-18 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > There is a use case to pass customized arguments to main without using > -ffreestanding. This is not motivating for C++ because that's not actually valid to do (https://eel.is/c++draft/basic.start.main#3.sentence-1), and it's only barely motivating for C (you can call

[clang] [Clang][Sema] Fix a crash in lambda instantiation (PR #85565)

2024-03-18 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/85565 >From e94505fa77155cb0bbdf3ef92a426ef070cb3833 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 17 Mar 2024 17:48:05 +0800 Subject: [PATCH] [Clang][Sema] Fix a crash in lambda instantiation ---

<    1   2   3   4   >