summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Expr.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2013-12-19 02:39:40 +0000
committerAaron Ballman <aaron@aaronballman.com>2013-12-19 02:39:40 +0000
commit9ead1243a5d9eb671bbe8925dda083d865f6c449 (patch)
treee1d32c7f41b21f915a5010a60536742c32026854 /clang/lib/AST/Expr.cpp
parent386328f96f63424d2b13c46db5dce7d54cb4c611 (diff)
downloadbcm5719-llvm-9ead1243a5d9eb671bbe8925dda083d865f6c449.tar.gz
bcm5719-llvm-9ead1243a5d9eb671bbe8925dda083d865f6c449.zip
Replacing calls to getAttr with calls to hasAttr for clarity. No functional change intended -- this only replaces Boolean uses of getAttr.
llvm-svn: 197648
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
-rw-r--r--clang/lib/AST/Expr.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp
index 6060f8bf2f8..4f08655806c 100644
--- a/clang/lib/AST/Expr.cpp
+++ b/clang/lib/AST/Expr.cpp
@@ -2083,8 +2083,8 @@ bool Expr::isUnusedResultAWarning(const Expr *&WarnE, SourceLocation &Loc,
//
// Note: If new cases are added here, DiagnoseUnusedExprResult should be
// updated to match for QoI.
- if (FD->getAttr<WarnUnusedResultAttr>() ||
- FD->getAttr<PureAttr>() || FD->getAttr<ConstAttr>()) {
+ if (FD->hasAttr<WarnUnusedResultAttr>() ||
+ FD->hasAttr<PureAttr>() || FD->hasAttr<ConstAttr>()) {
WarnE = this;
Loc = CE->getCallee()->getLocStart();
R1 = CE->getCallee()->getSourceRange();
@@ -2129,7 +2129,7 @@ bool Expr::isUnusedResultAWarning(const Expr *&WarnE, SourceLocation &Loc,
}
const ObjCMethodDecl *MD = ME->getMethodDecl();
- if (MD && MD->getAttr<WarnUnusedResultAttr>()) {
+ if (MD && MD->hasAttr<WarnUnusedResultAttr>()) {
WarnE = this;
Loc = getExprLoc();
return true;
OpenPOWER on IntegriCloud