Skip to content

Commit 2293393

Browse files
author
Vyacheslav Zakharin
committed
Merge from 'main' to 'sycl-web' (#1)
CONFLICT (content): Merge conflict in clang/tools/clang-offload-wrapper/ClangOffloadWrapper.cpp CONFLICT (content): Merge conflict in clang/test/Driver/clang-offload-wrapper.c
2 parents a0a9861 + 93d08ac commit 2293393

File tree

677 files changed

+54133
-29251
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

677 files changed

+54133
-29251
lines changed

.mailmap

+2-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@
2828
2929
3030
31-
Jon Roelofs <[email protected]> Jon Roelofs <[email protected]>
32-
Jon Roelofs <[email protected]> Jonathan Roelofs <[email protected]>
33-
Jon Roelofs <[email protected]> Jonathan Roelofs <[email protected]>
31+
32+
3433
LLVM GN Syncbot <[email protected]>
3534
Martin Storsjö <[email protected]>
3635
Saleem Abdulrasool <[email protected]> <[email protected]>

clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp

+12-4
Original file line numberDiff line numberDiff line change
@@ -433,17 +433,25 @@ void ProTypeMemberInitCheck::checkMissingMemberInitializer(
433433
[&](const FieldDecl *F) { OrderedFields.push_back(F); });
434434

435435
// Collect all the fields we need to initialize, including indirect fields.
436+
// It only includes fields that have not been fixed
436437
SmallPtrSet<const FieldDecl *, 16> AllFieldsToInit;
437-
forEachField(ClassDecl, FieldsToInit,
438-
[&](const FieldDecl *F) { AllFieldsToInit.insert(F); });
439-
if (AllFieldsToInit.empty())
438+
forEachField(ClassDecl, FieldsToInit, [&](const FieldDecl *F) {
439+
if (!HasRecordClassMemberSet.contains(F)) {
440+
AllFieldsToInit.insert(F);
441+
HasRecordClassMemberSet.insert(F);
442+
}
443+
});
444+
if (FieldsToInit.empty())
440445
return;
441446

442447
DiagnosticBuilder Diag =
443448
diag(Ctor ? Ctor->getBeginLoc() : ClassDecl.getLocation(),
444449
"%select{|union }0constructor %select{does not|should}0 initialize "
445450
"%select{|one of }0these fields: %1")
446-
<< IsUnion << toCommaSeparatedString(OrderedFields, AllFieldsToInit);
451+
<< IsUnion << toCommaSeparatedString(OrderedFields, FieldsToInit);
452+
453+
if (AllFieldsToInit.empty())
454+
return;
447455

448456
// Do not propose fixes for constructors in macros since we cannot place them
449457
// correctly.

clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_MEMBER_INIT_H
1111

1212
#include "../ClangTidyCheck.h"
13+
#include "llvm/ADT/DenseSet.h"
1314

1415
namespace clang {
1516
namespace tidy {
@@ -72,6 +73,10 @@ class ProTypeMemberInitCheck : public ClangTidyCheck {
7273
// instead of brace initialization. Only effective in C++11 mode. Default is
7374
// false.
7475
bool UseAssignment;
76+
77+
// Record the member variables that have been initialized to prevent repeated
78+
// initialization.
79+
llvm::DenseSet<const FieldDecl *> HasRecordClassMemberSet;
7580
};
7681

7782
} // namespace cppcoreguidelines

clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ BracesAroundStatementsCheck::findRParenLoc(const IfOrWhileStmt *S,
186186
bool BracesAroundStatementsCheck::checkStmt(
187187
const MatchFinder::MatchResult &Result, const Stmt *S,
188188
SourceLocation InitialLoc, SourceLocation EndLocHint) {
189+
190+
while (const auto *AS = dyn_cast<AttributedStmt>(S))
191+
S = AS->getSubStmt();
192+
189193
// 1) If there's a corresponding "else" or "while", the check inserts "} "
190194
// right before that token.
191195
// 2) If there's a multi-line block comment starting on the same line after

clang-tools-extra/clangd/InlayHints.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "clang/AST/ExprCXX.h"
1414
#include "clang/AST/RecursiveASTVisitor.h"
1515
#include "clang/Basic/SourceManager.h"
16+
#include "llvm/Support/raw_ostream.h"
1617

1718
namespace clang {
1819
namespace clangd {
@@ -314,6 +315,10 @@ class InlayHintVisitor : public RecursiveASTVisitor<InlayHintVisitor> {
314315
toHalfOpenFileRange(AST.getSourceManager(), AST.getLangOpts(), R);
315316
if (!FileRange)
316317
return;
318+
// The hint may be in a file other than the main file (for example, a header
319+
// file that was included after the preamble), do not show in that case.
320+
if (!AST.getSourceManager().isWrittenInMainFile(FileRange->getBegin()))
321+
return;
317322
Results.push_back(InlayHint{
318323
Range{
319324
sourceLocToPosition(AST.getSourceManager(), FileRange->getBegin()),

clang-tools-extra/clangd/unittests/InlayHintTests.cpp

+23
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "InlayHints.h"
1010
#include "Protocol.h"
1111
#include "TestTU.h"
12+
#include "TestWorkspace.h"
1213
#include "XRefs.h"
1314
#include "gmock/gmock.h"
1415
#include "gtest/gtest.h"
@@ -398,6 +399,28 @@ TEST(ParameterHints, SetterFunctions) {
398399
ExpectedHint{"timeout_millis: ", "timeout_millis"});
399400
}
400401

402+
TEST(ParameterHints, IncludeAtNonGlobalScope) {
403+
Annotations FooInc(R"cpp(
404+
void bar() { foo(42); }
405+
)cpp");
406+
Annotations FooCC(R"cpp(
407+
struct S {
408+
void foo(int param);
409+
#include "foo.inc"
410+
};
411+
)cpp");
412+
413+
TestWorkspace Workspace;
414+
Workspace.addSource("foo.inc", FooInc.code());
415+
Workspace.addMainFile("foo.cc", FooCC.code());
416+
417+
auto AST = Workspace.openFile("foo.cc");
418+
ASSERT_TRUE(bool(AST));
419+
420+
// Ensure the hint for the call in foo.inc is NOT materialized in foo.cc.
421+
EXPECT_EQ(hintsOfKind(*AST, InlayHintKind::ParameterHint).size(), 0u);
422+
}
423+
401424
TEST(TypeHints, Smoke) {
402425
assertTypeHints(R"cpp(
403426
auto $waldo[[waldo]] = 42;

clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-pro-type-member-init.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,8 @@ struct PositiveMultipleConstructors {
208208
PositiveMultipleConstructors(const PositiveMultipleConstructors &) {}
209209
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: constructor does not initialize these fields: A, B
210210

211-
// FIXME: The fix-its here collide providing an erroneous fix
212211
int A, B;
213-
// CHECK-FIXES: int A{}{}{}, B{}{}{};
212+
// CHECK-FIXES: int A{}, B{};
214213
};
215214

216215
typedef struct {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// RUN: %check_clang_tidy -std=c++20-or-later %s readability-braces-around-statements %t
2+
3+
void test(bool b) {
4+
if (b) {
5+
return;
6+
}
7+
if (b) [[likely]] {
8+
// CHECK-FIXES-NOT: if (b) { {{[[][[]}}likely{{[]][]]}} {
9+
return;
10+
}
11+
if (b) [[unlikely]] {
12+
// CHECK-FIXES-NOT: if (b) { {{[[][[]}}unlikely{{[]][]]}} {
13+
return;
14+
}
15+
16+
if (b) [[likely]]
17+
// CHECK-FIXES: if (b) {{[[][[]}}likely{{[]][]]}} {
18+
return;
19+
// CHECK-FIXES: }
20+
if (b) [[unlikely]]
21+
// CHECK-FIXES: if (b) {{[[][[]}}unlikely{{[]][]]}} {
22+
return;
23+
// CHECK-FIXES: }
24+
}

clang/docs/ClangFormatStyleOptions.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -741,8 +741,7 @@ the configuration (without a prefix: ``Auto``).
741741
enum { A, B } myEnum;
742742

743743
false:
744-
enum
745-
{
744+
enum {
746745
A,
747746
B
748747
} myEnum;

clang/include/clang/AST/Type.h

-4
Original file line numberDiff line numberDiff line change
@@ -3465,10 +3465,6 @@ class ConstantMatrixType final : public MatrixType {
34653465
protected:
34663466
friend class ASTContext;
34673467

3468-
/// The element type of the matrix.
3469-
// FIXME: Appears to be unused? There is also MatrixType::ElementType...
3470-
QualType ElementType;
3471-
34723468
/// Number of rows and columns.
34733469
unsigned NumRows;
34743470
unsigned NumColumns;

clang/include/clang/Basic/BuiltinsX86.def

+35
Original file line numberDiff line numberDiff line change
@@ -1850,6 +1850,29 @@ TARGET_BUILTIN(__builtin_ia32_vp2intersect_d_256, "vV8iV8iUc*Uc*", "nV:256:", "a
18501850
TARGET_BUILTIN(__builtin_ia32_vp2intersect_d_128, "vV4iV4iUc*Uc*", "nV:128:", "avx512vp2intersect,avx512vl")
18511851

18521852
// AVX512 fp16 intrinsics
1853+
TARGET_BUILTIN(__builtin_ia32_vcomish, "iV8xV8xIiIi", "ncV:128:", "avx512fp16")
1854+
TARGET_BUILTIN(__builtin_ia32_addph512, "V32xV32xV32xIi", "ncV:512:", "avx512fp16")
1855+
TARGET_BUILTIN(__builtin_ia32_subph512, "V32xV32xV32xIi", "ncV:512:", "avx512fp16")
1856+
TARGET_BUILTIN(__builtin_ia32_mulph512, "V32xV32xV32xIi", "ncV:512:", "avx512fp16")
1857+
TARGET_BUILTIN(__builtin_ia32_divph512, "V32xV32xV32xIi", "ncV:512:", "avx512fp16")
1858+
TARGET_BUILTIN(__builtin_ia32_maxph512, "V32xV32xV32xIi", "ncV:512:", "avx512fp16")
1859+
TARGET_BUILTIN(__builtin_ia32_minph512, "V32xV32xV32xIi", "ncV:512:", "avx512fp16")
1860+
1861+
TARGET_BUILTIN(__builtin_ia32_minph256, "V16xV16xV16x", "ncV:256:", "avx512fp16,avx512vl")
1862+
TARGET_BUILTIN(__builtin_ia32_minph128, "V8xV8xV8x", "ncV:128:", "avx512fp16,avx512vl")
1863+
TARGET_BUILTIN(__builtin_ia32_maxph256, "V16xV16xV16x", "ncV:256:", "avx512fp16,avx512vl")
1864+
TARGET_BUILTIN(__builtin_ia32_maxph128, "V8xV8xV8x", "ncV:128:", "avx512fp16,avx512vl")
1865+
1866+
TARGET_BUILTIN(__builtin_ia32_addsh_round_mask, "V8xV8xV8xV8xUcIi", "ncV:128:", "avx512fp16")
1867+
TARGET_BUILTIN(__builtin_ia32_divsh_round_mask, "V8xV8xV8xV8xUcIi", "ncV:128:", "avx512fp16")
1868+
TARGET_BUILTIN(__builtin_ia32_mulsh_round_mask, "V8xV8xV8xV8xUcIi", "ncV:128:", "avx512fp16")
1869+
TARGET_BUILTIN(__builtin_ia32_subsh_round_mask, "V8xV8xV8xV8xUcIi", "ncV:128:", "avx512fp16")
1870+
TARGET_BUILTIN(__builtin_ia32_maxsh_round_mask, "V8xV8xV8xV8xUcIi", "ncV:128:", "avx512fp16")
1871+
TARGET_BUILTIN(__builtin_ia32_minsh_round_mask, "V8xV8xV8xV8xUcIi", "ncV:128:", "avx512fp16")
1872+
TARGET_BUILTIN(__builtin_ia32_cmpph512_mask, "UiV32xV32xIiUiIi", "ncV:512:", "avx512fp16")
1873+
TARGET_BUILTIN(__builtin_ia32_cmpph256_mask, "UsV16xV16xIiUs", "ncV:256:", "avx512fp16,avx512vl")
1874+
TARGET_BUILTIN(__builtin_ia32_cmpph128_mask, "UcV8xV8xIiUc", "ncV:128:", "avx512fp16,avx512vl")
1875+
TARGET_BUILTIN(__builtin_ia32_cmpsh_mask, "UcV8xV8xIiUcIi", "ncV:128:", "avx512fp16")
18531876
TARGET_BUILTIN(__builtin_ia32_loadsh128_mask, "V8xV8x*V8xUc", "nV:128:", "avx512fp16")
18541877
TARGET_BUILTIN(__builtin_ia32_storesh128_mask, "vV8x*V8xUc", "nV:128:", "avx512fp16")
18551878

@@ -1886,12 +1909,24 @@ TARGET_BUILTIN(__builtin_ia32_reduce_and_d512, "iV16i", "ncV:512:", "avx512f")
18861909
TARGET_BUILTIN(__builtin_ia32_reduce_and_q512, "OiV8Oi", "ncV:512:", "avx512f")
18871910
TARGET_BUILTIN(__builtin_ia32_reduce_fadd_pd512, "ddV8d", "ncV:512:", "avx512f")
18881911
TARGET_BUILTIN(__builtin_ia32_reduce_fadd_ps512, "ffV16f", "ncV:512:", "avx512f")
1912+
TARGET_BUILTIN(__builtin_ia32_reduce_fadd_ph512, "xxV32x", "ncV:512:", "avx512fp16")
1913+
TARGET_BUILTIN(__builtin_ia32_reduce_fadd_ph256, "xxV16x", "ncV:256:", "avx512fp16,avx512vl")
1914+
TARGET_BUILTIN(__builtin_ia32_reduce_fadd_ph128, "xxV8x", "ncV:128:", "avx512fp16,avx512vl")
18891915
TARGET_BUILTIN(__builtin_ia32_reduce_fmax_pd512, "dV8d", "ncV:512:", "avx512f")
18901916
TARGET_BUILTIN(__builtin_ia32_reduce_fmax_ps512, "fV16f", "ncV:512:", "avx512f")
1917+
TARGET_BUILTIN(__builtin_ia32_reduce_fmax_ph512, "xV32x", "ncV:512:", "avx512fp16")
1918+
TARGET_BUILTIN(__builtin_ia32_reduce_fmax_ph256, "xV16x", "ncV:256:", "avx512fp16,avx512vl")
1919+
TARGET_BUILTIN(__builtin_ia32_reduce_fmax_ph128, "xV8x", "ncV:128:", "avx512fp16,avx512vl")
18911920
TARGET_BUILTIN(__builtin_ia32_reduce_fmin_pd512, "dV8d", "ncV:512:", "avx512f")
18921921
TARGET_BUILTIN(__builtin_ia32_reduce_fmin_ps512, "fV16f", "ncV:512:", "avx512f")
1922+
TARGET_BUILTIN(__builtin_ia32_reduce_fmin_ph512, "xV32x", "ncV:512:", "avx512fp16")
1923+
TARGET_BUILTIN(__builtin_ia32_reduce_fmin_ph256, "xV16x", "ncV:256:", "avx512fp16,avx512vl")
1924+
TARGET_BUILTIN(__builtin_ia32_reduce_fmin_ph128, "xV8x", "ncV:128:", "avx512fp16,avx512vl")
18931925
TARGET_BUILTIN(__builtin_ia32_reduce_fmul_pd512, "ddV8d", "ncV:512:", "avx512f")
18941926
TARGET_BUILTIN(__builtin_ia32_reduce_fmul_ps512, "ffV16f", "ncV:512:", "avx512f")
1927+
TARGET_BUILTIN(__builtin_ia32_reduce_fmul_ph512, "xxV32x", "ncV:512:", "avx512fp16")
1928+
TARGET_BUILTIN(__builtin_ia32_reduce_fmul_ph256, "xxV16x", "ncV:256:", "avx512fp16,avx512vl")
1929+
TARGET_BUILTIN(__builtin_ia32_reduce_fmul_ph128, "xxV8x", "ncV:128:", "avx512fp16,avx512vl")
18951930
TARGET_BUILTIN(__builtin_ia32_reduce_mul_d512, "iV16i", "ncV:512:", "avx512f")
18961931
TARGET_BUILTIN(__builtin_ia32_reduce_mul_q512, "OiV8Oi", "ncV:512:", "avx512f")
18971932
TARGET_BUILTIN(__builtin_ia32_reduce_or_d512, "iV16i", "ncV:512:", "avx512f")

clang/include/clang/Basic/DiagnosticGroups.td

+2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def StringConversion : DiagGroup<"string-conversion">;
6464
def SignConversion : DiagGroup<"sign-conversion">;
6565
def PointerBoolConversion : DiagGroup<"pointer-bool-conversion">;
6666
def UndefinedBoolConversion : DiagGroup<"undefined-bool-conversion">;
67+
def BoolOperation : DiagGroup<"bool-operation">;
6768
def BoolConversion : DiagGroup<"bool-conversion", [PointerBoolConversion,
6869
UndefinedBoolConversion]>;
6970
def IntConversion : DiagGroup<"int-conversion">;
@@ -946,6 +947,7 @@ def Extra : DiagGroup<"extra", [
946947
]>;
947948

948949
def Most : DiagGroup<"most", [
950+
BoolOperation,
949951
CharSubscript,
950952
Comment,
951953
DeleteNonVirtualDtor,

clang/include/clang/Basic/DiagnosticSemaKinds.td

+1-1
Original file line numberDiff line numberDiff line change
@@ -7472,7 +7472,7 @@ def note_member_first_declared_here : Note<
74727472
def warn_bitwise_negation_bool : Warning<
74737473
"bitwise negation of a boolean expression%select{;| always evaluates to 'true';}0 "
74747474
"did you mean logical negation?">,
7475-
InGroup<DiagGroup<"bool-operation">>;
7475+
InGroup<BoolOperation>, DefaultIgnore;
74767476
def err_decrement_bool : Error<"cannot decrement expression of type bool">;
74777477
def warn_increment_bool : Warning<
74787478
"incrementing expression of type bool is deprecated and "

clang/include/clang/Driver/Distro.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class Distro {
3737
DebianStretch,
3838
DebianBuster,
3939
DebianBullseye,
40+
DebianBookworm,
4041
Exherbo,
4142
RHEL5,
4243
RHEL6,
@@ -119,7 +120,7 @@ class Distro {
119120
bool IsOpenSUSE() const { return DistroVal == OpenSUSE; }
120121

121122
bool IsDebian() const {
122-
return DistroVal >= DebianLenny && DistroVal <= DebianBullseye;
123+
return DistroVal >= DebianLenny && DistroVal <= DebianBookworm;
123124
}
124125

125126
bool IsUbuntu() const {

clang/include/clang/StaticAnalyzer/Checkers/Checkers.td

+11-1
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,17 @@ def DynamicMemoryModeling: Checker<"DynamicMemoryModeling">,
485485
"allocating and deallocating functions are annotated with "
486486
"ownership_holds, ownership_takes and ownership_returns.",
487487
"false",
488-
InAlpha>
488+
InAlpha>,
489+
CmdLineOption<Boolean,
490+
"AddNoOwnershipChangeNotes",
491+
"Add an additional note to the bug report for leak-like "
492+
"bugs. Dynamically allocated objects passed to functions "
493+
"that neither deallocated it, or have taken responsibility "
494+
"of the ownership are noted, similarly to "
495+
"NoStoreFuncVisitor.",
496+
"false",
497+
InAlpha,
498+
Hide>
489499
]>,
490500
Dependencies<[CStringModeling]>,
491501
Documentation<NotDocumented>,

clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h

+79
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "llvm/ADT/FoldingSet.h"
2222
#include "llvm/ADT/IntrusiveRefCntPtr.h"
2323
#include "llvm/ADT/STLExtras.h"
24+
#include "llvm/ADT/SmallPtrSet.h"
2425
#include "llvm/ADT/StringRef.h"
2526
#include <list>
2627
#include <memory>
@@ -622,6 +623,84 @@ class TagVisitor : public BugReporterVisitor {
622623
PathSensitiveBugReport &R) override;
623624
};
624625

626+
class ObjCMethodCall;
627+
class CXXConstructorCall;
628+
629+
/// Put a diagnostic on return statement (or on } in its absence) of all inlined
630+
/// functions for which some property remained unchanged.
631+
/// Resulting diagnostics may read such as "Returning without writing to X".
632+
///
633+
/// Descendants can define what a "state change is", like a change of value
634+
/// to a memory region, liveness, etc. For function calls where the state did
635+
/// not change as defined, a custom note may be constructed.
636+
class NoStateChangeFuncVisitor : public BugReporterVisitor {
637+
private:
638+
/// Frames modifying the state as defined in \c wasModifiedBeforeCallExit.
639+
/// This visitor generates a note only if a function does *not* change the
640+
/// state that way. This information is not immediately available
641+
/// by looking at the node associated with the exit from the function
642+
/// (usually the return statement). To avoid recomputing the same information
643+
/// many times (going up the path for each node and checking whether the
644+
/// region was written into) we instead lazily compute the stack frames
645+
/// along the path.
646+
llvm::SmallPtrSet<const StackFrameContext *, 32> FramesModifying;
647+
llvm::SmallPtrSet<const StackFrameContext *, 32> FramesModifyingCalculated;
648+
649+
/// Check and lazily calculate whether the state is modified in the stack
650+
/// frame to which \p CallExitBeginN belongs.
651+
/// The calculation is cached in FramesModifying.
652+
bool isModifiedInFrame(const ExplodedNode *CallExitBeginN);
653+
654+
/// Write to \c FramesModifying all stack frames along the path in the current
655+
/// stack frame which modifies the state.
656+
void findModifyingFrames(const ExplodedNode *const CallExitBeginN);
657+
658+
protected:
659+
bugreporter::TrackingKind TKind;
660+
661+
/// \return Whether the state was modified from the current node, \CurrN, to
662+
/// the end of the stack fram, at \p CallExitBeginN.
663+
virtual bool
664+
wasModifiedBeforeCallExit(const ExplodedNode *CurrN,
665+
const ExplodedNode *CallExitBeginN) = 0;
666+
667+
/// Consume the information on the non-modifying stack frame in order to
668+
/// either emit a note or not. May suppress the report entirely.
669+
/// \return Diagnostics piece for the unmodified state in the current
670+
/// function, if it decides to emit one. A good description might start with
671+
/// "Returning without...".
672+
virtual PathDiagnosticPieceRef
673+
maybeEmitNoteForObjCSelf(PathSensitiveBugReport &R,
674+
const ObjCMethodCall &Call,
675+
const ExplodedNode *N) = 0;
676+
677+
/// Consume the information on the non-modifying stack frame in order to
678+
/// either emit a note or not. May suppress the report entirely.
679+
/// \return Diagnostics piece for the unmodified state in the current
680+
/// function, if it decides to emit one. A good description might start with
681+
/// "Returning without...".
682+
virtual PathDiagnosticPieceRef
683+
maybeEmitNoteForCXXThis(PathSensitiveBugReport &R,
684+
const CXXConstructorCall &Call,
685+
const ExplodedNode *N) = 0;
686+
687+
/// Consume the information on the non-modifying stack frame in order to
688+
/// either emit a note or not. May suppress the report entirely.
689+
/// \return Diagnostics piece for the unmodified state in the current
690+
/// function, if it decides to emit one. A good description might start with
691+
/// "Returning without...".
692+
virtual PathDiagnosticPieceRef
693+
maybeEmitNoteForParameters(PathSensitiveBugReport &R, const CallEvent &Call,
694+
const ExplodedNode *N) = 0;
695+
696+
public:
697+
NoStateChangeFuncVisitor(bugreporter::TrackingKind TKind) : TKind(TKind) {}
698+
699+
PathDiagnosticPieceRef VisitNode(const ExplodedNode *N,
700+
BugReporterContext &BR,
701+
PathSensitiveBugReport &R) override final;
702+
};
703+
625704
} // namespace ento
626705

627706
} // namespace clang

0 commit comments

Comments
 (0)