llvmbot wrote:
@llvm/pr-subscribers-clang
Author: None (NagyDonat)
Changes
Reverts llvm/llvm-project#84469 because it causes buildbot failures.
I'll examine them and re-submit the change.
---
Full diff: https://github.com/llvm/llvm-project/pull/84926.diff
5 Files Affected:
-
llvmbot wrote:
@llvm/pr-subscribers-backend-x86
@llvm/pr-subscribers-llvm-ir
@llvm/pr-subscribers-clang-codegen
Author: Farzon Lotfi (farzonl)
Changes
This change implements part 1 of 2 for #70095
- `hlsl_intrinsics.h` - add the `isinf` api
- `Builtins.td` - add an hlsl builtin for
https://github.com/NagyDonat closed
https://github.com/llvm/llvm-project/pull/84926
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: NagyDonat
Date: 2024-03-12T16:01:04+01:00
New Revision: f32b04d4ea91ad1018c25a1d4178cc4392d34968
URL:
https://github.com/llvm/llvm-project/commit/f32b04d4ea91ad1018c25a1d4178cc4392d34968
DIFF:
https://github.com/llvm/llvm-project/commit/f32b04d4ea91ad1018c25a1d4178cc4392d34968.diff
https://github.com/farzonl created
https://github.com/llvm/llvm-project/pull/84927
This change implements part 1 of 2 for #70095
- `hlsl_intrinsics.h` - add the `isinf` api
- `Builtins.td` - add an hlsl builtin for `isinf`.
- `CGBuiltin.cpp` add the ir generation for `isinf` intrinsic.
-
https://github.com/NagyDonat created
https://github.com/llvm/llvm-project/pull/84926
Reverts llvm/llvm-project#84469 because it causes buildbot failures. I'll
examine them and re-submit the change.
>From b6a29f40aebde93977368979710ca1903482d4b4 Mon Sep 17 00:00:00 2001
From: NagyDonat
Date:
@@ -0,0 +1,18 @@
+// RUN: %clang_dxc -T lib_6_4 -HV 2016 %s 2>&1 -### | FileCheck
-check-prefix=2016 %s
+// RUN: %clang_dxc -T lib_6_4 -HV 2017 %s 2>&1 -### | FileCheck
-check-prefix=2017 %s
+// RUN: %clang_dxc -T lib_6_4 /HV 2018 %s 2>&1 -### | FileCheck
@@ -226,6 +226,7 @@ HLSLToolChain::TranslateArgs(const DerivedArgList ,
StringRef BoundArch,
A->claim();
continue;
}
+
llvm-beanz wrote:
Unnecessary whitespace change.
https://github.com/llvm/llvm-project/pull/83938
@@ -139,6 +139,7 @@ struct LangStandard {
bool isOpenCL() const { return Flags & OpenCL; }
static Kind getLangKind(StringRef Name);
+ static Kind getHLSLLangKind(StringRef Name);
llvm-beanz wrote:
This either.
@@ -753,6 +753,9 @@ def err_drv_hlsl_bad_shader_required_in_target : Error<
def err_drv_hlsl_bad_shader_unsupported : Error<
"%select{shader model|Vulkan environment|shader stage}0 '%1' in target '%2'
is invalid for HLSL code generation">;
+def
@@ -8549,7 +8549,10 @@ def dxc_hlsl_version : Option<["/", "-"], "HV",
KIND_JOINED_OR_SEPARATE>,
Group,
Visibility<[DXCOption]>,
HelpText<"HLSL Version">,
- NormalizedValues<["2016", "2017",
@@ -116,6 +116,12 @@ New checks
Replaces certain conditional statements with equivalent calls to
``std::min`` or ``std::max``.
+- New :doc:`bugprone-null-check-after-dereference
EugeneZelenko wrote:
Please keep alphabetical order (by check name) in this
@@ -0,0 +1,162 @@
+.. title:: clang-tidy - bugprone-null-check-after-dereference
+
+bugprone-null-check-after-dereference
+=
+
+.. note::
+
+ This check uses a flow-sensitive static analysis to produce its
+ results. Therefore, it may be
https://github.com/diego-est updated
https://github.com/llvm/llvm-project/pull/84638
>From 114e22388508cd1ef5174bdda041564691b58032 Mon Sep 17 00:00:00 2001
From: Sunglas
Date: Sat, 9 Mar 2024 12:23:43 -0400
Subject: [PATCH 1/4] [analyzer] Turn NodeBuilderContext into a class
---
llvmbot wrote:
@llvm/pr-subscribers-clang-tools-extra
@llvm/pr-subscribers-clang-tidy
Author: Congcong Cai (HerrCai0907)
Changes
Fixes: #84705
---
Full diff: https://github.com/llvm/llvm-project/pull/84922.diff
2 Files Affected:
- (modified)
https://github.com/HerrCai0907 created
https://github.com/llvm/llvm-project/pull/84922
Fixes: #84705
>From d760b280a79be973642a0549db0e5a8838c397fd Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Tue, 12 Mar 2024 22:33:18 +0800
Subject: [PATCH] [clang-tidy]bugprone-unused-return-value
diego-est wrote:
Seems like it wasn't as easy as just making them private. I think I found all
the places where there were private member accesses. The tests passed on my
side again and the github-pull-requests action. The code_formatter action keeps
failing because of the documentation on
https://github.com/michaelmaitland approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/84877
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/DavidSpickett updated
https://github.com/llvm/llvm-project/pull/81869
>From 72bbd9d38cb6e292d92391fcf04154cfbc336192 Mon Sep 17 00:00:00 2001
From: David Spickett
Date: Thu, 15 Feb 2024 09:52:22 +
Subject: [PATCH 1/8] [flang][clang] Add Visibility specific help text for
@@ -102,23 +104,24 @@ struct llvm::TimeTraceProfiler {
llvm::get_thread_name(ThreadName);
}
- void begin(std::string Name, llvm::function_ref Detail) {
-Stack.emplace_back(ClockType::now(), TimePointType(), std::move(Name),
- Detail());
+
https://github.com/AaronBallman closed
https://github.com/llvm/llvm-project/pull/84068
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Kupa-Martin
Date: 2024-03-12T10:21:34-04:00
New Revision: f8fab2126ffab713f4ab4619360b6941be6d4e35
URL:
https://github.com/llvm/llvm-project/commit/f8fab2126ffab713f4ab4619360b6941be6d4e35
DIFF:
https://github.com/llvm/llvm-project/commit/f8fab2126ffab713f4ab4619360b6941be6d4e35.diff
Timm =?utf-8?q?Bäder?= ,
Timm =?utf-8?q?Bäder?=
Message-ID:
In-Reply-To:
AaronBallman wrote:
> Ping
Sorry, I thought you were still doing some investigation.
I can live with either approach; the CRTP way doesn't seem too awful to me and
retains the separation. But the unified interface
https://github.com/Keenuts updated
https://github.com/llvm/llvm-project/pull/80680
From 818ccfd0258602fdd0630823bb2b8af0507749d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nathan=20Gau=C3=ABr?=
Date: Fri, 2 Feb 2024 16:38:46 +0100
Subject: [PATCH 1/4] [clang][HLSL][SPRI-V] Add convergence
@@ -5686,6 +5686,10 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo
,
if (!CI->getType()->isVoidTy())
CI->setName("call");
+ if (getTarget().getTriple().isSPIRVLogical() &&
+ CI->getCalledFunction()->isConvergent())
Keenuts wrote:
Yes,
@@ -1130,8 +1130,96 @@ struct BitTest {
static BitTest decodeBitTestBuiltin(unsigned BuiltinID);
};
+
+// Returns the first convergence entry/loop/anchor instruction found in |BB|.
+// std::nullopt otherwise.
+std::optional getConvergenceToken(llvm::BasicBlock *BB)
{
+
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/84913
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
OCHyams wrote:
> Maybe wants someone with more frontend knowledge to chime in, but all SGTM.
@adrian-prantl are you able to suggest anyone that might be able to take a look
at this (part of this touches some Objective-C code+test) - we're not overly
familiar with front end code.
@@ -1130,8 +1130,96 @@ struct BitTest {
static BitTest decodeBitTestBuiltin(unsigned BuiltinID);
};
+
+// Returns the first convergence entry/loop/anchor instruction found in |BB|.
+// std::nullopt otherwise.
+std::optional getConvergenceToken(llvm::BasicBlock *BB)
{
+
llvmbot wrote:
@llvm/pr-subscribers-libcxx
Author: Martin Storsjö (mstorsjo)
Changes
27ce26b06655cfece3d54b30e442ef93d3e78ac7 added the new option
`-fvisibility-global-new-delete=`, where
`-fvisibility-global-new-delete=force-hidden` is equivalent to the old option
https://github.com/mstorsjo created
https://github.com/llvm/llvm-project/pull/84917
27ce26b06655cfece3d54b30e442ef93d3e78ac7 added the new option
`-fvisibility-global-new-delete=`, where
`-fvisibility-global-new-delete=force-hidden` is equivalent to the old option
https://github.com/DavidSpickett updated
https://github.com/llvm/llvm-project/pull/81869
>From 72bbd9d38cb6e292d92391fcf04154cfbc336192 Mon Sep 17 00:00:00 2001
From: David Spickett
Date: Thu, 15 Feb 2024 09:52:22 +
Subject: [PATCH 1/7] [flang][clang] Add Visibility specific help text for
https://github.com/OCHyams updated
https://github.com/llvm/llvm-project/pull/84756
>From 8b37020a48b8145ad9d7deb288b9f8a3ee3a9a9b Mon Sep 17 00:00:00 2001
From: Orlando Cazalet-Hyams
Date: Sat, 9 Mar 2024 13:10:05 +
Subject: [PATCH 1/3] clang: insertbefore non-debug for removeDIs stability
https://github.com/DavidSpickett updated
https://github.com/llvm/llvm-project/pull/81869
>From 72bbd9d38cb6e292d92391fcf04154cfbc336192 Mon Sep 17 00:00:00 2001
From: David Spickett
Date: Thu, 15 Feb 2024 09:52:22 +
Subject: [PATCH 1/6] [flang][clang] Add Visibility specific help text for
https://github.com/JonPsson1 closed
https://github.com/llvm/llvm-project/pull/83446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Jonas Paulsson
Date: 2024-03-12T09:53:11-04:00
New Revision: 9f7ed36f92c304050d401f00b013186de15130e8
URL:
https://github.com/llvm/llvm-project/commit/9f7ed36f92c304050d401f00b013186de15130e8
DIFF:
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -std=c++20 -verify %s
+// RUN: %clang_cc1 -std=c++23 -verify %s
+// expected-no-diagnostics
+
+template concept IsOk = requires() { typename T::Float; };
+
+template struct Thing;
+
+template struct Foobar {
erichkeane wrote:
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/84671
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/84671
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1130,8 +1130,96 @@ struct BitTest {
static BitTest decodeBitTestBuiltin(unsigned BuiltinID);
};
+
+// Returns the first convergence entry/loop/anchor instruction found in |BB|.
+// std::nullopt otherwise.
+std::optional getConvergenceToken(llvm::BasicBlock *BB)
{
+
@@ -1130,8 +1130,96 @@ struct BitTest {
static BitTest decodeBitTestBuiltin(unsigned BuiltinID);
};
+
+// Returns the first convergence entry/loop/anchor instruction found in |BB|.
+// std::nullopt otherwise.
+std::optional getConvergenceToken(llvm::BasicBlock *BB)
{
+
@@ -194,11 +194,12 @@ class CoreEngine {
};
// TODO: Turn into a class.
diego-est wrote:
Done.
https://github.com/llvm/llvm-project/pull/84638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
Author: Stefan Gränitz
Date: 2024-03-12T14:47:23+01:00
New Revision: ffd31c5e92da9da37cf57ca653e22db38b5af9a3
URL:
https://github.com/llvm/llvm-project/commit/ffd31c5e92da9da37cf57ca653e22db38b5af9a3
DIFF:
@@ -2454,7 +2481,14 @@ usual build cycle when using sample profilers for
optimization:
.. code-block:: console
- $ llvm-profgen --binary=./code --output=code.prof--perfdata=perf.data
+ $ llvm-profgen --binary=./code --output=code.prof --perfdata=perf.data
+
+
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Tim Creech (tcreech-intel)
Changes
This change:
- Updates the existing Clang User's Manual section on SPGO so that it describes
how to use llvm-profgen to perform SPGO on Windows. This is new functionality
implemented in #83972.
- Fixes
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Haojian Wu (hokein)
Changes
for the synthesized deduction guide.
We ignored the require-clause of the original template when building the
deduction guide for type-alias CTAD, this resulted in accepting code which
should be rejected (see
@@ -1130,8 +1130,96 @@ struct BitTest {
static BitTest decodeBitTestBuiltin(unsigned BuiltinID);
};
+
+// Returns the first convergence entry/loop/anchor instruction found in |BB|.
+// std::nullopt otherwise.
+std::optional getConvergenceToken(llvm::BasicBlock *BB)
{
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 4fdf10faf2b45f4bbbd2ddfb07272d19a47cc531
0d4adf0600c1a86b092fec52749bd781e0ecfd6d --
https://github.com/tcreech-intel ready_for_review
https://github.com/llvm/llvm-project/pull/84864
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/84913
for the synthesized deduction guide.
We ignored the require-clause of the original template when building the
deduction guide for type-alias CTAD, this resulted in accepting code which
should be rejected (see
@@ -2410,20 +2410,35 @@ usual build cycle when using sample profilers for
optimization:
1. Build the code with source line table information. You can use all the
usual build flags that you always build your application with. The only
- requirement is that you add
@@ -2410,20 +2410,35 @@ usual build cycle when using sample profilers for
optimization:
1. Build the code with source line table information. You can use all the
usual build flags that you always build your application with. The only
- requirement is that you add
@@ -3382,10 +3382,19 @@ def fopenmp : Flag<["-"], "fopenmp">, Group,
HelpText<"Parse OpenMP pragmas and generate parallel code.">;
def fno_openmp : Flag<["-"], "fno-openmp">, Group,
Flags<[NoArgumentUnused]>;
+class OpenMPVersionHelp {
+ string str = !strconcat(
+"Set
https://github.com/diego-est updated
https://github.com/llvm/llvm-project/pull/84638
>From 114e22388508cd1ef5174bdda041564691b58032 Mon Sep 17 00:00:00 2001
From: Sunglas
Date: Sat, 9 Mar 2024 12:23:43 -0400
Subject: [PATCH 1/3] [analyzer] Turn NodeBuilderContext into a class
---
@@ -2410,20 +2410,35 @@ usual build cycle when using sample profilers for
optimization:
1. Build the code with source line table information. You can use all the
usual build flags that you always build your application with. The only
- requirement is that you add
https://github.com/DavidSpickett edited
https://github.com/llvm/llvm-project/pull/81869
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2434,6 +2449,15 @@ usual build cycle when using sample profilers for
optimization:
it provides better call information, which improves the accuracy of
the profile data.
+ When using SEP:
+
+ .. code-block:: console
+
+ $ sep -start -ec
https://github.com/tcreech-intel updated
https://github.com/llvm/llvm-project/pull/84864
>From 4dc108d0d290ee5fd6a73c029c051fdb2215d00a Mon Sep 17 00:00:00 2001
From: Tim Creech
Date: Mon, 11 Mar 2024 22:35:59 -0400
Subject: [PATCH 1/4] Update documentation and release notes for llvm-profgen
https://github.com/DavidSpickett updated
https://github.com/llvm/llvm-project/pull/81869
>From 72bbd9d38cb6e292d92391fcf04154cfbc336192 Mon Sep 17 00:00:00 2001
From: David Spickett
Date: Thu, 15 Feb 2024 09:52:22 +
Subject: [PATCH 1/5] [flang][clang] Add Visibility specific help text for
weliveindetail wrote:
Build bot https://lab.llvm.org/buildbot/#/builders/196/builds/46799 detected an
issue with the test -- I will try and push a fix quickly:
```
https://github.com/AaronBallman approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/84887
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -857,8 +881,13 @@ void CXXRecordDecl::addedMember(Decl *D) {
data().HasDeclaredCopyAssignmentWithConstParam = true;
}
-if (Method->isMoveAssignmentOperator())
+if (Method->isMoveAssignmentOperator()) {
SMKind |= SMF_MoveAssignment;
+}
@@ -826,6 +842,14 @@ void CXXRecordDecl::addedMember(Decl *D) {
? !Constructor->isImplicit()
: (Constructor->isUserProvided() || Constructor->isExplicit()))
data().Aggregate = false;
+
+ // A trivially relocatable class is a class:
+
@@ -189,6 +189,11 @@ FIELD(DeclaredNonTrivialSpecialMembers, 6, MERGE_OR)
/// SMF_MoveConstructor, and SMF_Destructor are meaningful here.
FIELD(DeclaredNonTrivialSpecialMembersForCall, 6, MERGE_OR)
+/// True when this class's bases and fields are all trivially relocatable
@@ -857,8 +881,13 @@ void CXXRecordDecl::addedMember(Decl *D) {
data().HasDeclaredCopyAssignmentWithConstParam = true;
}
-if (Method->isMoveAssignmentOperator())
+if (Method->isMoveAssignmentOperator()) {
SMKind |= SMF_MoveAssignment;
+}
+
+
@@ -1953,13 +1966,22 @@ void CodeGenFunction::EmitAtomicStore(RValue rvalue,
LValue dest,
}
// Okay, we're doing this natively.
-llvm::Value *intValue = atomics.convertRValueToInt(rvalue);
+llvm::Value *ValToStore =
+atomics.convertRValueToInt(rvalue,
@@ -337,12 +347,58 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(uint64_t ) const {
+ llvm::Type *ElemTy;
+ unsigned RegsNeeded; // Registers Needed for
https://github.com/AMP999 updated
https://github.com/llvm/llvm-project/pull/84621
>From 6e127e5794efafaabf82b6c3d5e0634ddcfee977 Mon Sep 17 00:00:00 2001
From: Amirreza Ashouri
Date: Sat, 2 Mar 2024 15:37:33 +0330
Subject: [PATCH 1/3] [clang][Sema] Track trivial-relocatability as a type
trait
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5121,11 +5142,12 @@ AST_POLYMORPHIC_MATCHER_P2(forEachArgumentWithParamType,
// argument of the method which should not be matched against a parameter, so
// we skip over it here.
BoundNodesTreeBuilder Matches;
- unsigned ArgIndex =
https://github.com/PiotrZSL edited
https://github.com/llvm/llvm-project/pull/84887
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/PiotrZSL approved this pull request.
Overall looks fine.
https://github.com/llvm/llvm-project/pull/84887
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Jie Fu
Date: 2024-03-12T21:24:37+08:00
New Revision: f03aaa3c0cca77c15adfbb4544f296bc0441f6fc
URL:
https://github.com/llvm/llvm-project/commit/f03aaa3c0cca77c15adfbb4544f296bc0441f6fc
DIFF:
https://github.com/llvm/llvm-project/commit/f03aaa3c0cca77c15adfbb4544f296bc0441f6fc.diff
LOG:
https://github.com/weliveindetail edited
https://github.com/llvm/llvm-project/pull/84461
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/weliveindetail updated
https://github.com/llvm/llvm-project/pull/84461
From 88271c39b30b84041b4b7fb8b8f34c211d8190d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?=
Date: Thu, 7 Mar 2024 23:04:22 +0100
Subject: [PATCH] [clang-repl] Add CreateJITBuilder() for
erichkeane wrote:
> > There are currently over 200 separate unions using the work-around.
>
> Specifically, this is what Linux uses for getting C99 flexible arrays in
> unions and alone in structs:
>
> ```
> #define DECLARE_FLEX_ARRAY(TYPE, NAME)\
> struct { \
>
@@ -2434,6 +2449,15 @@ usual build cycle when using sample profilers for
optimization:
it provides better call information, which improves the accuracy of
the profile data.
+ When using SEP:
+
+ .. code-block:: console
+
+ $ sep -start -ec
@@ -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:
@@ -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:
@@ -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
@@ -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:
@@ -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:
@@ -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
@@ -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
@@ -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:
@@ -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
@@ -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:
@@ -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:
@@ -0,0 +1,162 @@
+.. title:: clang-tidy - bugprone-null-check-after-dereference
+
+bugprone-null-check-after-dereference
+=
+
+.. note::
+
+ This check uses a flow-sensitive static analysis to produce its
+ results. Therefore, it may be
@@ -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:
@@ -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:
https://github.com/Discookie commented:
Thanks for the reviews! Fixed a lot of the comments, and I have a few more
things to test for the rest.
@gribozavr Thank you for the thorough introduction to your approaches, and the
links to related works as well! Templated types are something I didn't
https://github.com/Discookie 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
Author: Stefan Gränitz
Date: 2024-03-12T13:55:38+01:00
New Revision: bde7a6b791872b63456cb4e50e63046728a65196
URL:
https://github.com/llvm/llvm-project/commit/bde7a6b791872b63456cb4e50e63046728a65196
DIFF:
https://github.com/weliveindetail closed
https://github.com/llvm/llvm-project/pull/84460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Sven van Haastregt
Date: 2024-03-12T12:53:22Z
New Revision: c7f1a987a66a1ba0865ecc18adbe4dc8dbc0c788
URL:
https://github.com/llvm/llvm-project/commit/c7f1a987a66a1ba0865ecc18adbe4dc8dbc0c788
DIFF:
https://github.com/llvm/llvm-project/commit/c7f1a987a66a1ba0865ecc18adbe4dc8dbc0c788.diff
https://github.com/zahiraam closed
https://github.com/llvm/llvm-project/pull/84567
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Zahira Ammarguellat
Date: 2024-03-12T08:51:38-04:00
New Revision: 0b2c24e0b33236c1dec39fe8b007b4c6aeb170b3
URL:
https://github.com/llvm/llvm-project/commit/0b2c24e0b33236c1dec39fe8b007b4c6aeb170b3
DIFF:
=?utf-8?q?Donát?= Nagy ,
=?utf-8?q?Donát?= Nagy ,Balazs Benics
,NagyDonat
Message-ID:
In-Reply-To:
https://github.com/NagyDonat closed
https://github.com/llvm/llvm-project/pull/84469
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
Author: NagyDonat
Date: 2024-03-12T13:51:12+01:00
New Revision: 80ab8234ac309418637488b97e0a62d8377b2ecf
URL:
https://github.com/llvm/llvm-project/commit/80ab8234ac309418637488b97e0a62d8377b2ecf
DIFF:
https://github.com/llvm/llvm-project/commit/80ab8234ac309418637488b97e0a62d8377b2ecf.diff
301 - 400 of 477 matches
Mail list logo