[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-27 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. One last minor comment, but other than that I think we’re good. This is a comparatively large pr, so while it’s possible that I missed something, I don’t think there is much to be gained from me staring at this for any longer than I

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-27 Thread via cfe-commits
@@ -7525,25 +7525,21 @@ static Attr *getCCTypeAttr(ASTContext , ParsedAttr ) { std::optional Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) { - auto BadExpr = [&]() { -Diag(CondExpr->getExprLoc(), diag::err_attribute_argument_type) -<< ("'"

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-27 Thread via cfe-commits
https://github.com/Sirraide 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] [analyzer] Adding taint analysis capability to unix.Malloc checker (PR #92420)

2024-05-27 Thread Daniel Krupp via cfe-commits
dkrupp wrote: > @NagyDonat , @steakhal I fixed the additional remarks. Is there anything else > that's need to be done before merging? Thanks. I see now, that there is still one unaddressed remark from @NagyDonat regarding a new testcase for array new allocations. I will be adding it

[clang] 4b5e0a1 - [Clang] [Sema] Diagnose unexpanded parameter packs in attributes (#93482)

2024-05-27 Thread via cfe-commits
Author: Sirraide Date: 2024-05-27T18:17:07+02:00 New Revision: 4b5e0a1d12f0d624852c6d7c82207647ed5282aa URL: https://github.com/llvm/llvm-project/commit/4b5e0a1d12f0d624852c6d7c82207647ed5282aa DIFF: https://github.com/llvm/llvm-project/commit/4b5e0a1d12f0d624852c6d7c82207647ed5282aa.diff

[clang] [Clang] [Sema] Diagnose unexpanded parameter packs in attributes (PR #93482)

2024-05-27 Thread via cfe-commits
https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/93482 ___ 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-27 Thread Daniel Krupp via cfe-commits
dkrupp wrote: @NagyDonat , @steakhal I fixed the additional remarks. Is there anything else that's need to be done before merging? Thanks. https://github.com/llvm/llvm-project/pull/92420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-05-27 Thread Daniel Krupp via cfe-commits
dkrupp wrote: > 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. I will check C++ > The patch makes sense to

[clang] [clang-tools-extra] [libcxx] [clang][Modules] Remove unnecessary includes of `Module.h` (PR #93417)

2024-05-27 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. https://github.com/llvm/llvm-project/pull/93417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [clang][Modules] Remove unnecessary includes of `Module.h` (PR #93417)

2024-05-27 Thread kadir çetinkaya via cfe-commits
@@ -42,7 +41,11 @@ #include #include -namespace clang::clangd { +namespace clang { + +class Module; kadircet wrote: this is not an "unnecessary" include, clangd requires a declaration of `clang::Module` in this file (even if incomplete) and we try not to

[clang] [clang-tools-extra] [libcxx] [clang][Modules] Remove unnecessary includes of `Module.h` (PR #93417)

2024-05-27 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/93417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Macro for constant rounding mode (PR #92699)

2024-05-27 Thread Serge Pavlov via cfe-commits
spavloff wrote: Thanks! I will commit it in a couple of day, if no additional feedback is provided. https://github.com/llvm/llvm-project/pull/92699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [compiler-rt] [lldb] [llvm] [Support] Remove terminfo dependency (PR #92865)

2024-05-27 Thread Aaron Siddhartha Mondal via cfe-commits
aaronmondal wrote: @gulfemsavrun The file `terminal.c` that is causing this linker error is not in LLVM but in `libedit`. The configure step doesn't find `libedit`: ``` Not searching for unused variables given on the command line. -- Could NOT find LibEdit (missing: LibEdit_INCLUDE_DIRS

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

2024-05-27 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > Have you considered applying the same heuristic to C++ array new allocations? Actually, I'm almost certain that this patch already affects the C++ array new allocations, because `MallocMemAux` is called from the callback which handles the array new operator. @dkrupp Please

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

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -1730,6 +1721,21 @@ def UnixAPIPortabilityChecker : Checker<"UnixAPI">, } // end optin.portability + +//===--===// +// Taint checkers.

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

2024-05-27 Thread via cfe-commits
Author: cor3ntin Date: 2024-05-27T17:46:01+02:00 New Revision: 48c988cfcbb25243700178bad43d106ae7ef2cb4 URL: https://github.com/llvm/llvm-project/commit/48c988cfcbb25243700178bad43d106ae7ef2cb4 DIFF: https://github.com/llvm/llvm-project/commit/48c988cfcbb25243700178bad43d106ae7ef2cb4.diff

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

2024-05-27 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/93457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Diagnose unexpanded parameter packs in attributes (PR #93482)

2024-05-27 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/93482 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 5fb3830 - [clang-tools-extra] Remove redundant FOLDER property. NFC.

2024-05-27 Thread Michael Kruse via cfe-commits
Author: Michael Kruse Date: 2024-05-27T17:42:32+02:00 New Revision: 5fb38307f372555cd22fd09ace86c3b1ccd2abb9 URL: https://github.com/llvm/llvm-project/commit/5fb38307f372555cd22fd09ace86c3b1ccd2abb9 DIFF: https://github.com/llvm/llvm-project/commit/5fb38307f372555cd22fd09ace86c3b1ccd2abb9.diff

[clang] [llvm] [EntryExitInstrumenter] Move passes out of clang into LLVM default pipelines (PR #92171)

2024-05-27 Thread Egor Pasko via cfe-commits
@@ -1030,6 +1036,12 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, Phase != ThinOrFullLTOPhase::ThinLTOPostLink) MPM.addPass(SampleProfileProbePass(TM)); + // Instrument function entry and exit before all inlining. + if

[clang] [Clang] [Sema] Diagnose unexpanded parameter packs in attributes (PR #93482)

2024-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes Call `DiagnoseUnexpandedParameterPack` when we parse an expression argument to an attribute and check for implicit code in the `CollectUnexpandedParameterPacksVisitor` so we can actually find unexpanded packs in

[clang] [Clang] [Sema] Diagnose unexpanded parameter packs in attributes (PR #93482)

2024-05-27 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/93482 Call `DiagnoseUnexpandedParameterPack` when we parse an expression argument to an attribute and check for implicit code in the `CollectUnexpandedParameterPacksVisitor` so we can actually find unexpanded packs

[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
hokein wrote: The crash is already fixed by https://github.com/llvm/llvm-project/commit/7a28a5b3fee6c78ad59af79a3d03c00db153c49f https://github.com/llvm/llvm-project/pull/92721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[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 closed 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] [analyzer] Adding taint analysis capability to unix.Malloc checker (PR #92420)

2024-05-27 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp updated https://github.com/llvm/llvm-project/pull/92420 >From 80767176cbe8e5717c5f42b113f305d81b635cb9 Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Tue, 30 Apr 2024 15:20:52 +0200 Subject: [PATCH 1/3] [analyzer] Adding taint analysis capability to unix.Malloc

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-05-27 Thread Alex Voicu via cfe-commits
AlexVlx wrote: @bader @asudarsa @michalpaszkowski any opinions from the SPIRV side? I would like to merge this so as to be able to progress some related work, but I'd rather not squat on SPIRV real-estate without an ACK from the landlords:) https://github.com/llvm/llvm-project/pull/89796

[clang] [clang] Fix loss of `dllexport` for exported template specialization (PR #93302)

2024-05-27 Thread via cfe-commits
https://github.com/zmodem commented: > In commit > https://github.com/llvm/llvm-project/commit/0a20f5417c9d241f4774a49da6c7ca8123686671, > "Better codegen support for DLL attributes being dropped after the first > declaration (PR20792)", code was added to enable "dropping" of DLL attributes.

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-27 Thread Fanbo Meng via cfe-commits
fanbo-meng wrote: @uweigand ping for review :) https://github.com/llvm/llvm-project/pull/91384 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [NFC] Clarify assume diagnostic (PR #93077)

2024-05-27 Thread Dana Jansens via cfe-commits
danakj wrote: Thanks, this is very good https://github.com/llvm/llvm-project/pull/93077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-05-27 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/90824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-05-27 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/90824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 49b760f - [clang][Interp] Fix calling virtual CXXOperatorCallExprs

2024-05-27 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-05-27T16:01:30+02:00 New Revision: 49b760ff2c7da60f4308708f56688ca99874605f URL: https://github.com/llvm/llvm-project/commit/49b760ff2c7da60f4308708f56688ca99874605f DIFF: https://github.com/llvm/llvm-project/commit/49b760ff2c7da60f4308708f56688ca99874605f.diff

[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)

2024-05-27 Thread via cfe-commits
Sirraide wrote: ping https://github.com/llvm/llvm-project/pull/89078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [NFC] Clarify assume diagnostic (PR #93077)

2024-05-27 Thread via cfe-commits
https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/93077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5e140c8 - [Clang] [NFC] Clarify assume diagnostic (#93077)

2024-05-27 Thread via cfe-commits
Author: Sirraide Date: 2024-05-27T15:58:58+02:00 New Revision: 5e140c8a17889a4cc677edee9f5db618dca70535 URL: https://github.com/llvm/llvm-project/commit/5e140c8a17889a4cc677edee9f5db618dca70535 DIFF: https://github.com/llvm/llvm-project/commit/5e140c8a17889a4cc677edee9f5db618dca70535.diff

[clang] [Clang] Throw error when calling atomic with pointer to zero size object (PR #91057)

2024-05-27 Thread via cfe-commits
github-actions[bot] wrote: @HendrikHuebner 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

[clang] [Clang] Throw error when calling atomic with pointer to zero size object (PR #91057)

2024-05-27 Thread via cfe-commits
https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/91057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 21ee278 - [Clang] Issue an error when an atomic builtin is called with a pointer to a zero-size object (#91057)

2024-05-27 Thread via cfe-commits
Author: Hendrik Hübner Date: 2024-05-27T15:49:28+02:00 New Revision: 21ee27877a87185199d150f9a49f2d3337bad86e URL: https://github.com/llvm/llvm-project/commit/21ee27877a87185199d150f9a49f2d3337bad86e DIFF:

[clang] [Clang] Throw error when calling atomic with pointer to zero size object (PR #91057)

2024-05-27 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/91057 >From 487ec3df346924f71b66e5753c844c97991e Mon Sep 17 00:00:00 2001 From: hhuebner Date: Sat, 4 May 2024 13:49:38 +0200 Subject: [PATCH 1/2] [Clang] Throw error when calling atomic with pointer to zero

[clang] 6a197b3 - [clang][Interp] Fix returning references to functions

2024-05-27 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-05-27T15:43:12+02:00 New Revision: 6a197b35db0805e77d5103382b5b516ca0c2db1d URL: https://github.com/llvm/llvm-project/commit/6a197b35db0805e77d5103382b5b516ca0c2db1d DIFF: https://github.com/llvm/llvm-project/commit/6a197b35db0805e77d5103382b5b516ca0c2db1d.diff

[clang] b1e329a - [clang][Interp][NFC] Explicitly define PrimType values

2024-05-27 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-05-27T15:43:11+02:00 New Revision: b1e329a3f54fbe55fa61c124f94cc6c8509e5423 URL: https://github.com/llvm/llvm-project/commit/b1e329a3f54fbe55fa61c124f94cc6c8509e5423 DIFF: https://github.com/llvm/llvm-project/commit/b1e329a3f54fbe55fa61c124f94cc6c8509e5423.diff

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

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -717,18 +717,71 @@ const ExplodedNode *StreamChecker::getAcquisitionSite(const ExplodedNode *N, return nullptr; } +/// Invalidate only the requested elements instead of the whole buffer. +/// This is basically a refinement of the more generic 'escapeArgs' or +/// the

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-05-27 Thread via cfe-commits
@@ -1329,6 +1341,100 @@ bool Preprocessor::LexAfterModuleImport(Token ) { return true; } +/// Lex a token following the 'module' contextual keyword. +/// +/// [cpp.module]/p2: +/// The pp-tokens, if any, of a pp-module shall be of the form: +/// pp-module-name

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

2024-05-27 Thread Balázs Kéri via cfe-commits
@@ -937,8 +990,21 @@ void StreamChecker::evalFreadFwrite(const FnDescription *Desc, // At read, invalidate the buffer in any case of error or success, // except if EOF was already present. - if (IsFread && !E.isStreamEof()) -State = escapeArgs(State, C, Call, {0});

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

2024-05-27 Thread Balázs Kéri via cfe-commits
@@ -717,18 +717,71 @@ const ExplodedNode *StreamChecker::getAcquisitionSite(const ExplodedNode *N, return nullptr; } +/// Invalidate only the requested elements instead of the whole buffer. +/// This is basically a refinement of the more generic 'escapeArgs' or +/// the

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

2024-05-27 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > The problem here is the loss of the qualification on the TemplateNames > > This patch fixes the problem, without taking any workarounds: #93433 > > It also doesn't cause any change in diagnostics in > `clang/test/SemaTemplate/typename-specifier-3.cpp`. I think we should

[clang-tools-extra] Update identifier-length.rst (PR #93467)

2024-05-27 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. https://github.com/llvm/llvm-project/pull/93467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeComplete] Omit ExplicitObject when completing code (PR #92743)

2024-05-27 Thread via cfe-commits
zyctree wrote: @kadircet ok, i added a test in [clang/test/CodeCompletion/member-access.cpp](https://github.com/llvm/llvm-project/pull/92743/files#diff-cf5f20cb8625bb041565f64089a94ed2b89363464b1c55ba31730fe6bf4a9c4f) https://github.com/llvm/llvm-project/pull/92743

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

2024-05-27 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/93457 ___ 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-27 Thread Balázs Kéri via cfe-commits
@@ -717,18 +717,71 @@ const ExplodedNode *StreamChecker::getAcquisitionSite(const ExplodedNode *N, return nullptr; } +/// Invalidate only the requested elements instead of the whole buffer. +/// This is basically a refinement of the more generic 'escapeArgs' or +/// the

[clang-tools-extra] Update identifier-length.rst (PR #93467)

2024-05-27 Thread Mattan Elkaim via cfe-commits
https://github.com/mattanelkaim edited https://github.com/llvm/llvm-project/pull/93467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Update identifier-length.rst (PR #93467)

2024-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang-tidy Author: Mattan Elkaim (mattanelkaim) Changes Swapped code blocks of parameter and variable, which have been confused --- Full diff: https://github.com/llvm/llvm-project/pull/93467.diff 1 Files

[clang-tools-extra] Update identifier-length.rst (PR #93467)

2024-05-27 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you,

[clang-tools-extra] Update identifier-length.rst (PR #93467)

2024-05-27 Thread Mattan Elkaim via cfe-commits
https://github.com/mattanelkaim created https://github.com/llvm/llvm-project/pull/93467 Swapped code blocks of parameter and variable, which have been confused >From ec5fb34d5df2b82d0fef468b413fb0422311ecc5 Mon Sep 17 00:00:00 2001 From: Mattan Elkaim

[clang] [clang][CodeComplete] Omit ExplicitObject when completing code (PR #92743)

2024-05-27 Thread via cfe-commits
https://github.com/zyctree updated https://github.com/llvm/llvm-project/pull/92743 >From 7fe1ea0dd38d70515bd2075d572539823931b692 Mon Sep 17 00:00:00 2001 From: zyctree Date: Mon, 27 May 2024 20:44:13 +0800 Subject: [PATCH] [clang][CodeComplete] Omit ExplicitObject when completing code Fixes

[clang] [clang][CodeComplete] Omit ExplicitObject when completing code (PR #92743)

2024-05-27 Thread via cfe-commits
https://github.com/zyctree updated https://github.com/llvm/llvm-project/pull/92743 >From 5441c0cc74c3f75e732a797701a894877057df4c Mon Sep 17 00:00:00 2001 From: zyctree Date: Mon, 27 May 2024 20:38:34 +0800 Subject: [PATCH] [clang][CodeComplete] Omit ExplicitObject when completing code Fixes

[clang] [llvm] [EntryExitInstrumenter] Move passes out of clang into LLVM default pipelines (PR #92171)

2024-05-27 Thread Egor Pasko via cfe-commits
https://github.com/pasko updated https://github.com/llvm/llvm-project/pull/92171 >From df3f8dfc47cd8d7b220ed712dc7c2cab1c563f50 Mon Sep 17 00:00:00 2001 From: Egor Pasko Date: Mon, 6 May 2024 19:48:59 +0200 Subject: [PATCH 01/12] wip: Move instrumentation passes This change is not ready for

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

2024-05-27 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/4] [clang][Sema] Don't emit 'declared here' note for builtin

[clang] [llvm] [EntryExitInstrumenter] Move passes out of clang into LLVM default pipelines (PR #92171)

2024-05-27 Thread Egor Pasko via cfe-commits
@@ -1,25 +1,13 @@ // RUN: %clang_cc1 -pg -triple powerpc-ibm-aix7.2.0.0 -emit-llvm %s -o - | FileCheck %s pasko wrote: Done. https://github.com/llvm/llvm-project/pull/92171 ___ cfe-commits mailing list

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

2024-05-27 Thread Youngsuk Kim 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] [llvm] [EntryExitInstrumenter] Move passes out of clang into LLVM default pipelines (PR #92171)

2024-05-27 Thread Egor Pasko via cfe-commits
@@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -debug-info-kind=standalone -emit-llvm -o - %s -finstrument-functions | FileCheck %s pasko wrote: Done. https://github.com/llvm/llvm-project/pull/92171

[clang] [Clang] Correctly diagnose a static function overloading a non-static function (PR #93460)

2024-05-27 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/93460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0183b58 - [Clang] Correctly diagnose a static function overloading a non-static function (#93460)

2024-05-27 Thread via cfe-commits
Author: cor3ntin Date: 2024-05-27T14:17:10+02:00 New Revision: 0183b58e292d9d7004fabc92bd0da10eba5666db URL: https://github.com/llvm/llvm-project/commit/0183b58e292d9d7004fabc92bd0da10eba5666db DIFF: https://github.com/llvm/llvm-project/commit/0183b58e292d9d7004fabc92bd0da10eba5666db.diff

[clang] [clang][dataflow] Rewrite `getReferencedDecls()` with a `RecursiveASTVisitor`. (PR #93461)

2024-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis @llvm/pr-subscribers-clang Author: None (martinboehme) Changes We previously had a hand-rolled recursive traversal here that was exactly what `RecursiveASTVistor` does anyway. Using the visitor not only eliminates the explicit traversal

[clang] [clang][dataflow] Rewrite `getReferencedDecls()` with a `RecursiveASTVisitor`. (PR #93461)

2024-05-27 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/93461 We previously had a hand-rolled recursive traversal here that was exactly what `RecursiveASTVistor` does anyway. Using the visitor not only eliminates the explicit traversal logic but also allows us to

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

2024-05-27 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat 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

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

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,328 @@ +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \ +// RUN: -analyzer-checker=debug.ExprInspection + +#define EOF (-1) + +extern "C" { +typedef __typeof(sizeof(int)) size_t; +typedef struct _FILE FILE;

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

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,328 @@ +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \ +// RUN: -analyzer-checker=debug.ExprInspection + +#define EOF (-1) + +extern "C" { +typedef __typeof(sizeof(int)) size_t; +typedef struct _FILE FILE;

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

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -717,18 +717,71 @@ const ExplodedNode *StreamChecker::getAcquisitionSite(const ExplodedNode *N, return nullptr; } +/// Invalidate only the requested elements instead of the whole buffer. +/// This is basically a refinement of the more generic 'escapeArgs' or +/// the

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

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -937,8 +990,21 @@ void StreamChecker::evalFreadFwrite(const FnDescription *Desc, // At read, invalidate the buffer in any case of error or success, // except if EOF was already present. - if (IsFread && !E.isStreamEof()) -State = escapeArgs(State, C, Call, {0});

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

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,328 @@ +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \ +// RUN: -analyzer-checker=debug.ExprInspection + +#define EOF (-1) + +extern "C" { +typedef __typeof(sizeof(int)) size_t; +typedef struct _FILE FILE;

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

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -717,18 +717,71 @@ const ExplodedNode *StreamChecker::getAcquisitionSite(const ExplodedNode *N, return nullptr; } +/// Invalidate only the requested elements instead of the whole buffer. +/// This is basically a refinement of the more generic 'escapeArgs' or +/// the

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

2024-05-27 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: Thanks for publishing this commit, it's a nice refinement of the modelling capabilities, and mostly LGTM. In the inline comments I added some very minor remarks and one question about the handling of a `fread` that reads into the beginning of an array

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

2024-05-27 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat 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

[clang] [llvm] [EntryExitInstrumenter] Move passes out of clang into LLVM default pipelines (PR #92171)

2024-05-27 Thread Egor Pasko via cfe-commits
https://github.com/pasko edited https://github.com/llvm/llvm-project/pull/92171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correctly diagnose a static function overloading a non-static function (PR #93460)

2024-05-27 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/93460 >From 3da162c93cbb75025e8283132fdcd20d740982a9 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 27 May 2024 13:30:50 +0200 Subject: [PATCH 1/2] [Clang] Correctly diagnose a static function overloading

[clang] 4447461 - [clang][Interp] Don't try to dereference a null type

2024-05-27 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-05-27T12:59:25+02:00 New Revision: 4447461bc4802d4ead02db61c5276c142df3fd0c URL: https://github.com/llvm/llvm-project/commit/4447461bc4802d4ead02db61c5276c142df3fd0c DIFF: https://github.com/llvm/llvm-project/commit/4447461bc4802d4ead02db61c5276c142df3fd0c.diff

[clang] [Clang] Correctly diagnose a static function overloading a non-static function (PR #93460)

2024-05-27 Thread Younan Zhang via cfe-commits
@@ -797,6 +797,8 @@ Bug Fixes to C++ Support in dependent contexts. Fixes (#GH92680). - Fixed a crash when diagnosing failed conversions involving template parameter packs. (#GH93076) +- Fixed a regression introduced in Clang 18 causing a static function overloading a

[clang] [Clang] Correctly diagnose a static function overloading a non-static function (PR #93460)

2024-05-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Thanks! LG modulo one nit. https://github.com/llvm/llvm-project/pull/93460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correctly diagnose a static function overloading a non-static function (PR #93460)

2024-05-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/93460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correctly diagnose a static function overloading a non-static function (PR #93460)

2024-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes Regression in clang 18 introduced by af4751738db89a1 Fixes #93456 --- Full diff: https://github.com/llvm/llvm-project/pull/93460.diff 3 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+2) -

[clang] [Clang] Correctly diagnose a static function overloading a non-static function (PR #93460)

2024-05-27 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/93460 Regression in clang 18 introduced by af4751738db89a1 Fixes #93456 >From 3da162c93cbb75025e8283132fdcd20d740982a9 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 27 May 2024 13:30:50 +0200 Subject:

[clang] [C++20] [Modules] Don't record implicitly declarations to BMI by default (PR #93459)

2024-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Chuanqi Xu (ChuanqiXu9) Changes I found we may insert unused implciit declarations like AArch SVE declarations by default on AArch64 due to we will insert that by default. But it should be completely redundant and this patch

[clang] [C++20] [Modules] Don't record implicitly declarations to BMI by default (PR #93459)

2024-05-27 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/93459 I found we may insert unused implciit declarations like AArch SVE declarations by default on AArch64 due to we will insert that by default. But it should be completely redundant and this patch tries to

[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,786 @@ +//===-- NullPointerAnalysisModel.cpp *- 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:

[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,112 @@ +//===-- NullPointerAnalysisModel.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:

[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,112 @@ +//===-- NullPointerAnalysisModel.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:

[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,625 @@ +//===-- NullPointerAnalysisModel.cpp *- 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:

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

2024-05-27 Thread via cfe-commits
https://github.com/martinboehme requested changes to this pull request. https://github.com/llvm/llvm-project/pull/84166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

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

2024-05-27 Thread via cfe-commits
martinboehme wrote: > gentle ping @martinboehme @gribozavr Sorry, I didn't notice your original comment that this is ready for review again. I've added a few individual comments, but I haven't reviewed the whole PR in depth because I see that there are still quite a number of old comments

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

2024-05-27 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited 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] [analyzer] Adding taint analysis capability to unix.Malloc checker (PR #92420)

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -625,6 +628,16 @@ def BlockInCriticalSectionChecker : Checker<"BlockInCriticalSection">, } // end "alpha.unix" +let ParentPackage = TaintOptIn in { NagyDonat wrote: Is this the right place for this? I'd guess that this should be placed next to other

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

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -452,6 +454,7 @@ def EnumCastOutOfRangeChecker : Checker<"EnumCastOutOfRange">, } // end "optin.core" + NagyDonat wrote: Remove this irrelevant empty line. https://github.com/llvm/llvm-project/pull/92420 ___

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

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -36,6 +36,8 @@ def CoreAlpha : Package<"core">, ParentPackage; // Note: OptIn is *not* intended for checkers that are too noisy to be on by // default. Such checkers belong in the alpha package. def OptIn : Package<"optin">; +def TaintOptIn : Package<"taint">,

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

2024-05-27 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: Oops, I noticed that I had some minor review commits that were left in a "Pending" state for at least a week. Anyway, I'm publishing them now. https://github.com/llvm/llvm-project/pull/92420 ___ cfe-commits

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

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -599,7 +599,47 @@ Warns when a nullable pointer is returned from a function that has _Nonnull retu optin ^ -Checkers for portability, performance or coding style specific rules. +Checkers for portability, performance, optional security and coding style specific

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

2024-05-27 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited 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] 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] Only non-overloaded dereference expressions are lvalues (PR #93457)

2024-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes Fix a regression introduced by #88740 Fixes #92275 --- Full diff: https://github.com/llvm/llvm-project/pull/93457.diff 2 Files Affected: - (modified) clang/lib/Sema/SemaOverload.cpp (+1-1) - (modified)

<    1   2   3   >