clang 22.0.0git
JumpDiagnostics.cpp File Reference
#include "clang/AST/DeclCXX.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/StmtCXX.h"
#include "clang/AST/StmtObjC.h"
#include "clang/AST/StmtOpenACC.h"
#include "clang/AST/StmtOpenMP.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Sema/SemaInternal.h"
#include "llvm/ADT/BitVector.h"

Go to the source code of this file.

Macros

#define CHECK_PERMISSIVE(x)

Typedefs

typedef std::pair< unsigned, unsignedScopePair

Functions

static ScopePair GetDiagForGotoScopeDecl (Sema &S, const Decl *D)
 GetDiagForGotoScopeDecl - If this decl induces a new goto scope, return a diagnostic that should be emitted if control goes over it.
static bool IsMicrosoftJumpWarning (unsigned JumpDiag, unsigned InDiagNote)
 Return true if a particular error+note combination must be downgraded to a warning in Microsoft mode.
static bool IsCXX98CompatWarning (Sema &S, unsigned InDiagNote)
 Return true if a particular note should be downgraded to a compatibility warning in C++11 mode.
static bool IsCppCompatWarning (Sema &S, unsigned InDiagNote)
 Returns true if a particular note should be a C++ compatibility warning in C mode with -Wc++-compat.
static void DiagnoseIndirectOrAsmJumpStmt (Sema &S, Stmt *Jump, LabelDecl *Target, bool &Diagnosed)
 Produce primary diagnostic for an indirect jump statement.

Macro Definition Documentation

◆ CHECK_PERMISSIVE

#define CHECK_PERMISSIVE ( x)
Value:
(assert(Permissive || !(x)), (Permissive && (x)))

Definition at line 104 of file JumpDiagnostics.cpp.

Typedef Documentation

◆ ScopePair

typedef std::pair<unsigned,unsigned> ScopePair

Definition at line 139 of file JumpDiagnostics.cpp.

Function Documentation

◆ DiagnoseIndirectOrAsmJumpStmt()

void DiagnoseIndirectOrAsmJumpStmt ( Sema & S,
Stmt * Jump,
LabelDecl * Target,
bool & Diagnosed )
static

Produce primary diagnostic for an indirect jump statement.

Definition at line 889 of file JumpDiagnostics.cpp.

References clang::SemaBase::Diag(), clang::Stmt::getBeginLoc(), and clang::isa().

◆ GetDiagForGotoScopeDecl()

ScopePair GetDiagForGotoScopeDecl ( Sema & S,
const Decl * D )
static

◆ IsCppCompatWarning()

bool IsCppCompatWarning ( Sema & S,
unsigned InDiagNote )
static

Returns true if a particular note should be a C++ compatibility warning in C mode with -Wc++-compat.

Definition at line 883 of file JumpDiagnostics.cpp.

References clang::Sema::getLangOpts().

◆ IsCXX98CompatWarning()

bool IsCXX98CompatWarning ( Sema & S,
unsigned InDiagNote )
static

Return true if a particular note should be downgraded to a compatibility warning in C++11 mode.

Definition at line 876 of file JumpDiagnostics.cpp.

References clang::Sema::getLangOpts().

◆ IsMicrosoftJumpWarning()

bool IsMicrosoftJumpWarning ( unsigned JumpDiag,
unsigned InDiagNote )
static

Return true if a particular error+note combination must be downgraded to a warning in Microsoft mode.

Definition at line 868 of file JumpDiagnostics.cpp.