r275925 - Fix some minor issues found by Coverity.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 18 15:37:35 PDT 2016
Author: rsmith
Date: Mon Jul 18 17:37:35 2016
New Revision: 275925
URL: http://llvm.org/viewvc/llvm-project?rev=275925&view=rev
Log:
Fix some minor issues found by Coverity.
Modified:
cfe/trunk/include/clang/AST/DeclCXX.h
cfe/trunk/lib/AST/ExprConstant.cpp
cfe/trunk/lib/AST/ItaniumMangle.cpp
Modified: cfe/trunk/include/clang/AST/DeclCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclCXX.h?rev=275925&r1=275924&r2=275925&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclCXX.h (original)
+++ cfe/trunk/include/clang/AST/DeclCXX.h Mon Jul 18 17:37:35 2016
@@ -2964,7 +2964,9 @@ class ConstructorUsingShadowDecl final :
}
}
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,
Modified: cfe/trunk/lib/AST/ExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=275925&r1=275924&r2=275925&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Mon Jul 18 17:37:35 2016
@@ -6872,6 +6872,8 @@ bool IntExprEvaluator::VisitCallExpr(con
// Reduce it to a constant now.
return Success((Type & 2) ? 0 : -1, E);
}
+
+ llvm_unreachable("unexpected EvalMode");
}
case Builtin::BI__builtin_bswap16:
Modified: cfe/trunk/lib/AST/ItaniumMangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ItaniumMangle.cpp?rev=275925&r1=275924&r2=275925&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ItaniumMangle.cpp (original)
+++ cfe/trunk/lib/AST/ItaniumMangle.cpp Mon Jul 18 17:37:35 2016
@@ -1471,7 +1471,7 @@ void CXXNameMangler::mangleLocalName(con
// 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
More information about the cfe-commits
mailing list