clang API Documentation

Defines | Typedefs | Functions
JumpDiagnostics.cpp File Reference
#include "clang/Sema/SemaInternal.h"
#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 "llvm/ADT/BitVector.h"
Include dependency graph for JumpDiagnostics.cpp:

Go to the source code of this file.

Defines

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

Typedefs

typedef std::pair< unsigned,
unsigned
ScopePair

Functions

static ScopePair GetDiagForGotoScopeDecl (Sema &S, const Decl *D)
static bool IsMicrosoftJumpWarning (unsigned JumpDiag, unsigned InDiagNote)
static bool IsCXX98CompatWarning (Sema &S, unsigned InDiagNote)
static void DiagnoseIndirectJumpStmt (Sema &S, IndirectGotoStmt *Jump, LabelDecl *Target, bool &Diagnosed)
 Produce primary diagnostic for an indirect jump statement.

Define Documentation

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

Definition at line 93 of file JumpDiagnostics.cpp.


Typedef Documentation

typedef std::pair<unsigned,unsigned> ScopePair

Definition at line 127 of file JumpDiagnostics.cpp.


Function Documentation

static void DiagnoseIndirectJumpStmt ( Sema S,
IndirectGotoStmt Jump,
LabelDecl Target,
bool Diagnosed 
) [static]

Produce primary diagnostic for an indirect jump statement.

Definition at line 687 of file JumpDiagnostics.cpp.

References clang::Sema::Diag(), clang::IndirectGotoStmt::getGotoLoc(), clang::LabelStmt::getIdentLoc(), and clang::LabelDecl::getStmt().

static ScopePair GetDiagForGotoScopeDecl ( Sema S,
const Decl D 
) [static]

GetDiagForGotoScopeDecl - If this decl induces a new goto scope, return a diagnostic that should be emitted if control goes over it. If not, return 0.

Definition at line 131 of file JumpDiagnostics.cpp.

References clang::Sema::Context, clang::ASTContext::getLangOpts(), clang::CXXMethodDecl::getParent(), clang::CXXConstructorDecl::isDefaultConstructor(), clang::CXXRecordDecl::isPOD(), and clang::FunctionDecl::isTrivial().

static 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 681 of file JumpDiagnostics.cpp.

References clang::Sema::getLangOpts().

static 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 673 of file JumpDiagnostics.cpp.