clang
10.0.0git
|
#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"
Go to the source code of this file.
Macros | |
#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) |
GetDiagForGotoScopeDecl - If this decl induces a new goto scope, return a diagnostic that should be emitted if control goes over it. More... | |
static bool | IsMicrosoftJumpWarning (unsigned JumpDiag, unsigned InDiagNote) |
Return true if a particular error+note combination must be downgraded to a warning in Microsoft mode. More... | |
static bool | IsCXX98CompatWarning (Sema &S, unsigned InDiagNote) |
Return true if a particular note should be downgraded to a compatibility warning in C++11 mode. More... | |
static void | DiagnoseIndirectOrAsmJumpStmt (Sema &S, Stmt *Jump, LabelDecl *Target, bool &Diagnosed) |
Produce primary diagnostic for an indirect jump statement. More... | |
#define CHECK_PERMISSIVE | ( | x | ) | (assert(Permissive || !(x)), (Permissive && (x))) |
Definition at line 94 of file JumpDiagnostics.cpp.
Referenced by DiagnoseIndirectOrAsmJumpStmt().
typedef std::pair<unsigned,unsigned> ScopePair |
Definition at line 129 of file JumpDiagnostics.cpp.
|
static |
Produce primary diagnostic for an indirect jump statement.
Definition at line 806 of file JumpDiagnostics.cpp.
References CHECK_PERMISSIVE, clang::Sema::Diag(), clang::Stmt::getBeginLoc(), clang::GotoStmt::getGotoLoc(), clang::NamedDecl::getIdentifier(), clang::LabelStmt::getIdentLoc(), clang::GotoStmt::getLabel(), clang::Decl::getLocation(), clang::LabelDecl::getStmt(), IsCXX98CompatWarning(), IsMicrosoftJumpWarning(), clang::LabelDecl::isMSAsmLabel(), and clang::Target.
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 133 of file JumpDiagnostics.cpp.
Return true if a particular note should be downgraded to a compatibility warning in C++11 mode.
Definition at line 800 of file JumpDiagnostics.cpp.
References clang::Sema::getLangOpts().
Referenced by DiagnoseIndirectOrAsmJumpStmt().
|
static |
Return true if a particular error+note combination must be downgraded to a warning in Microsoft mode.
Definition at line 792 of file JumpDiagnostics.cpp.
Referenced by DiagnoseIndirectOrAsmJumpStmt().