diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2011-02-26 22:09:03 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2011-02-26 22:09:03 +0000 |
| commit | c3b054d250cdca485c71845089c316e10610ebad (patch) | |
| tree | abae0246ec9156cc1a7cbb947b2b0dfe95fa3189 /include/clang/Sema/ScopeInfo.h | |
| parent | bca07a4524feb4edec581062d631a13116320a24 (diff) | |
Diffstat (limited to 'include/clang/Sema/ScopeInfo.h')
| -rw-r--r-- | include/clang/Sema/ScopeInfo.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/clang/Sema/ScopeInfo.h b/include/clang/Sema/ScopeInfo.h index b0bb95509a91..51297ae40205 100644 --- a/include/clang/Sema/ScopeInfo.h +++ b/include/clang/Sema/ScopeInfo.h @@ -15,6 +15,7 @@ #define LLVM_CLANG_SEMA_SCOPE_INFO_H #include "clang/AST/Type.h" +#include "clang/Basic/PartialDiagnostic.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/SetVector.h" @@ -30,6 +31,17 @@ class SwitchStmt; namespace sema { +class PossiblyUnreachableDiag { +public: + PartialDiagnostic PD; + SourceLocation Loc; + const Stmt *stmt; + + PossiblyUnreachableDiag(const PartialDiagnostic &PD, SourceLocation Loc, + const Stmt *stmt) + : PD(PD), Loc(Loc), stmt(stmt) {} +}; + /// \brief Retains information about a function, method, or block that is /// currently being parsed. class FunctionScopeInfo { @@ -60,6 +72,11 @@ public: /// block, if there is any chance of applying the named return value /// optimization. llvm::SmallVector<ReturnStmt*, 4> Returns; + + /// \brief A list of PartialDiagnostics created but delayed within the + /// current function scope. These diagnostics are vetted for reachability + /// prior to being emitted. + llvm::SmallVector<PossiblyUnreachableDiag, 4> PossiblyUnreachableDiags; void setHasBranchIntoScope() { HasBranchIntoScope = true; |
