Skip to content

Commit 65fcb50

Browse files
committed
Add warning suppression macro
1 parent f687ed9 commit 65fcb50

File tree

19 files changed

+35
-27
lines changed

19 files changed

+35
-27
lines changed

clang/include/clang/AST/Decl.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class PragmaCommentDecl final
172172
PragmaMSCommentKind CommentKind)
173173
: Decl(PragmaComment, TU, CommentLoc), CommentKind(CommentKind) {}
174174

175-
virtual void anchor();
175+
LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION();
176176

177177
public:
178178
static PragmaCommentDecl *Create(const ASTContext &C, TranslationUnitDecl *DC,
@@ -206,7 +206,7 @@ class PragmaDetectMismatchDecl final
206206
size_t ValueStart)
207207
: Decl(PragmaDetectMismatch, TU, Loc), ValueStart(ValueStart) {}
208208

209-
virtual void anchor();
209+
LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION();
210210

211211
public:
212212
static PragmaDetectMismatchDecl *Create(const ASTContext &C,
@@ -5031,7 +5031,7 @@ class ImportDecl final : public Decl,
50315031
/// export void foo();
50325032
/// \endcode
50335033
class ExportDecl final : public Decl, public DeclContext {
5034-
virtual void anchor();
5034+
LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION();
50355035

50365036
private:
50375037
friend class ASTDeclReader;

clang/include/clang/AST/DeclCXX.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3296,7 +3296,7 @@ class LifetimeExtendedTemporaryDecl final
32963296

32973297
mutable APValue *Value = nullptr;
32983298

3299-
virtual void anchor();
3299+
LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION();
33003300

33013301
LifetimeExtendedTemporaryDecl(Expr *Temp, ValueDecl *EDecl, unsigned Mangling)
33023302
: Decl(Decl::LifetimeExtendedTemporary, EDecl->getDeclContext(),

clang/include/clang/AST/DeclFriend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class ASTContext;
5252
class FriendDecl final
5353
: public Decl,
5454
private llvm::TrailingObjects<FriendDecl, TemplateParameterList *> {
55-
virtual void anchor();
55+
LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION();
5656

5757
public:
5858
using FriendUnion = llvm::PointerUnion<NamedDecl *, TypeSourceInfo *>;

clang/include/clang/AST/DeclOpenMP.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ template <typename U> class OMPDeclarativeDirective : public U {
110110
class OMPThreadPrivateDecl final : public OMPDeclarativeDirective<Decl> {
111111
friend class OMPDeclarativeDirective<Decl>;
112112

113-
virtual void anchor();
113+
LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION();
114114

115115
OMPThreadPrivateDecl(DeclContext *DC = nullptr,
116116
SourceLocation L = SourceLocation())
@@ -418,7 +418,7 @@ class OMPRequiresDecl final : public OMPDeclarativeDirective<Decl> {
418418
friend class OMPDeclarativeDirective<Decl>;
419419
friend class ASTDeclReader;
420420

421-
virtual void anchor();
421+
LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION();
422422

423423
OMPRequiresDecl(DeclContext *DC, SourceLocation L)
424424
: OMPDeclarativeDirective<Decl>(OMPRequires, DC, L) {}
@@ -475,7 +475,7 @@ class OMPAllocateDecl final : public OMPDeclarativeDirective<Decl> {
475475
friend class OMPDeclarativeDirective<Decl>;
476476
friend class ASTDeclReader;
477477

478-
virtual void anchor();
478+
LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION();
479479

480480
OMPAllocateDecl(DeclContext *DC, SourceLocation L)
481481
: OMPDeclarativeDirective<Decl>(OMPAllocate, DC, L) {}

clang/include/clang/Driver/Action.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ class BindArchAction : public Action {
267267
/// programming model implementation needs and propagates the offloading kind to
268268
/// its dependences.
269269
class OffloadAction final : public Action {
270-
virtual void anchor();
270+
LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION();
271271

272272
public:
273273
/// Type used to communicate device actions. It associates bound architecture,

clang/include/clang/Sema/Sema.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ class Sema final : public SemaBase {
895895
/// with a vtable when the vtable is emitted. Sema is final and not
896896
/// polymorphic, but the debug info size savings are so significant that it is
897897
/// worth adding a vtable just to take advantage of this optimization.
898-
virtual void anchor();
898+
LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION();
899899

900900
const LangOptions &getLangOpts() const { return LangOpts; }
901901
OpenCLOptions &getOpenCLOptions() { return OpenCLFeatures; }

clang/lib/AST/ByteCode/InterpFrame.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class InterpFrame final : public Frame {
119119
CodePtr getRetPC() const { return RetPC; }
120120

121121
/// Map a location to a source.
122-
virtual SourceInfo getSource(CodePtr PC) const;
122+
SourceInfo getSource(CodePtr PC) const;
123123
const Expr *getExpr(CodePtr PC) const;
124124
SourceLocation getLocation(CodePtr PC) const;
125125
SourceRange getRange(CodePtr PC) const;

clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ class CheckVarsEscapingDeclContext final
323323
CheckVarsEscapingDeclContext(CodeGenFunction &CGF,
324324
ArrayRef<const ValueDecl *> TeamsReductions)
325325
: CGF(CGF), EscapedDecls(llvm::from_range, TeamsReductions) {}
326-
virtual ~CheckVarsEscapingDeclContext() = default;
326+
~CheckVarsEscapingDeclContext() = default;
327327
void VisitDeclStmt(const DeclStmt *S) {
328328
if (!S)
329329
return;

clang/lib/CodeGen/CGStmtOpenMP.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4783,7 +4783,7 @@ class CheckVarsEscapingUntiedTaskDeclContext final
47834783

47844784
public:
47854785
explicit CheckVarsEscapingUntiedTaskDeclContext() = default;
4786-
virtual ~CheckVarsEscapingUntiedTaskDeclContext() = default;
4786+
~CheckVarsEscapingUntiedTaskDeclContext() = default;
47874787
void VisitDeclStmt(const DeclStmt *S) {
47884788
if (!S)
47894789
return;

clang/lib/Driver/ToolChains/Hexagon.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
4242
bool hasIntegratedCPP() const override { return false; }
4343
bool isLinkJob() const override { return true; }
4444

45-
virtual void RenderExtraToolArgs(const JobAction &JA,
46-
llvm::opt::ArgStringList &CmdArgs) const;
45+
void RenderExtraToolArgs(const JobAction &JA,
46+
llvm::opt::ArgStringList &CmdArgs) const;
4747
void ConstructJob(Compilation &C, const JobAction &JA,
4848
const InputInfo &Output, const InputInfoList &Inputs,
4949
const llvm::opt::ArgList &TCArgs,

0 commit comments

Comments
 (0)