Skip to content

Commit

Permalink
Merge pull request #14536 from davidlt/move-to-clang-3-8-0
Browse files Browse the repository at this point in the history
Utilities/StaticAnalyzers: adjust to LLVM/Clang 3.8.0
  • Loading branch information
davidlt committed May 17, 2016
2 parents 90717ff + 1039aa3 commit 883b82b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Utilities/StaticAnalyzers/src/ClassChecker.cpp
Expand Up @@ -218,7 +218,7 @@ void WalkAST::CheckCXXOperatorCallExpr(const clang::CXXOperatorCallExpr *OCE,con
case OO_PipeEqual:
case OO_LessLessEqual:
case OO_GreaterGreaterEqual:
if (const clang::MemberExpr * ME = dyn_cast_or_null<clang::MemberExpr>(OCE->arg_begin()->IgnoreParenImpCasts())){
if (const clang::MemberExpr * ME = dyn_cast_or_null<clang::MemberExpr>((*OCE->arg_begin())->IgnoreParenImpCasts())){
if (ME->isImplicitAccess())
ReportMember(ME);
}
Expand Down
2 changes: 1 addition & 1 deletion Utilities/StaticAnalyzers/src/ConstCastAwayChecker.cpp
Expand Up @@ -37,7 +37,7 @@ void ConstCastAwayChecker::checkPreStmt(const clang::ExplicitCastExpr *CE,
clang::QualType ToTy = Ctx.getCanonicalType(CE->getType());

if ( support::isConst( OrigTy ) && ! support::isConst(ToTy) ) {
if ( clang::ento::ExplodedNode *errorNode = C.generateSink()) {
if ( clang::ento::ExplodedNode *errorNode = C.generateErrorNode()) {
if (!BT)
BT.reset(new clang::ento::BugType(this,"const cast away","ThreadSafety"));
std::unique_ptr<clang::ento::BugReport> R = llvm::make_unique<clang::ento::BugReport>(*BT,
Expand Down
2 changes: 1 addition & 1 deletion Utilities/StaticAnalyzers/src/ConstCastChecker.cpp
Expand Up @@ -27,7 +27,7 @@ void ConstCastChecker::checkPreStmt(const clang::CXXConstCastExpr *CE,
std::string cname = CRD->getQualifiedNameAsString();
if (! support::isDataClass(cname) ) return;
}
if (clang::ento::ExplodedNode *errorNode = C.generateSink()) {
if (clang::ento::ExplodedNode *errorNode = C.generateErrorNode()) {
if (!BT) BT.reset(new clang::ento::BugType(this,"const_cast used on a pointer to a data class ", "ThreadSafety"));
std::unique_ptr<clang::ento::BugReport> R = llvm::make_unique<clang::ento::BugReport>(*BT,
"const_cast was used on a pointer to a data class ", errorNode);
Expand Down
2 changes: 1 addition & 1 deletion Utilities/StaticAnalyzers/src/FiniteMathChecker.cc
Expand Up @@ -30,7 +30,7 @@ void FiniteMathChecker::checkPreStmt(const clang::CallExpr *CE, clang::ento::Che
if (!II->isStr("isnan") && !II->isStr("isinf"))
return;

clang::ento::ExplodedNode *N = ctx.generateSink();
clang::ento::ExplodedNode *N = ctx.generateErrorNode();
if (!N)
return;

Expand Down
2 changes: 1 addition & 1 deletion Utilities/StaticAnalyzers/src/getByChecker.cpp
Expand Up @@ -88,7 +88,7 @@ void Walker::VisitCXXMemberCallExpr( CXXMemberCallExpr *CE ) {
os <<"'\n";
} else {
os <<"calls edm::Event::getManyByType with argument '";
QualType QT = CE->arg_begin()->getType();
QualType QT = (*CE->arg_begin())->getType();
const CXXRecordDecl * RD = QT->getAsCXXRecordDecl();
os << "getManyByType , ";
const ClassTemplateSpecializationDecl *SD = dyn_cast<ClassTemplateSpecializationDecl>(RD);
Expand Down

0 comments on commit 883b82b

Please sign in to comment.