diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-07-18 22:37:35 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-07-18 22:37:35 +0000 |
| commit | cb2ba5a5a7f2667f7da016b00f9408ae0fccb3f8 (patch) | |
| tree | 28b1ae6e60073a26e3b5872fdd4a1e0e59f82385 | |
| parent | d04929d875d7c1bd4627d534f0ab432243003e5e (diff) | |
| download | bcm5719-llvm-cb2ba5a5a7f2667f7da016b00f9408ae0fccb3f8.tar.gz bcm5719-llvm-cb2ba5a5a7f2667f7da016b00f9408ae0fccb3f8.zip | |
Fix some minor issues found by Coverity.
llvm-svn: 275925
| -rw-r--r-- | clang/include/clang/AST/DeclCXX.h | 4 | ||||
| -rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/AST/ItaniumMangle.cpp | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/clang/include/clang/AST/DeclCXX.h b/clang/include/clang/AST/DeclCXX.h index 66acfee60db..7c535546f44 100644 --- a/clang/include/clang/AST/DeclCXX.h +++ b/clang/include/clang/AST/DeclCXX.h @@ -2964,7 +2964,9 @@ class ConstructorUsingShadowDecl final : public UsingShadowDecl { } } ConstructorUsingShadowDecl(ASTContext &C, EmptyShell Empty) - : UsingShadowDecl(ConstructorUsingShadow, C, Empty) {} + : UsingShadowDecl(ConstructorUsingShadow, C, Empty), + NominatedBaseClassShadowDecl(), ConstructedBaseClassShadowDecl(), + IsVirtual(false) {} public: static ConstructorUsingShadowDecl *Create(ASTContext &C, DeclContext *DC, diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 75731353023..760cda99c54 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -6872,6 +6872,8 @@ bool IntExprEvaluator::VisitCallExpr(const CallExpr *E) { // Reduce it to a constant now. return Success((Type & 2) ? 0 : -1, E); } + + llvm_unreachable("unexpected EvalMode"); } case Builtin::BI__builtin_bswap16: diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp index 694fde31754..51de561d5f1 100644 --- a/clang/lib/AST/ItaniumMangle.cpp +++ b/clang/lib/AST/ItaniumMangle.cpp @@ -1471,7 +1471,7 @@ void CXXNameMangler::mangleLocalName(const Decl *D, // numbering will be local to the particular argument in which it appears // -- other default arguments do not affect its encoding. const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD); - if (CXXRD->isLambda()) { + if (CXXRD && CXXRD->isLambda()) { if (const ParmVarDecl *Parm = dyn_cast_or_null<ParmVarDecl>(CXXRD->getLambdaContextDecl())) { if (const FunctionDecl *Func |

