aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSergio Martins <smartins@kde.org>2019-01-13 18:31:37 +0000
committerSergio Martins <smartins@kde.org>2019-01-13 18:31:37 +0000
commit86dc9018a0d49ab1f22ff40c1ecae446f07b1ece (patch)
tree9445130a1c24fd57633252e20cb50e65d347f4df /src
parent07a54ffa240a9727095dc956b91987a08ddbc11a (diff)
Finish fixing build with trunk
Eugene tested BUG: 403083
Diffstat (limited to 'src')
-rw-r--r--src/SourceCompatibilityHelpers.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/SourceCompatibilityHelpers.h b/src/SourceCompatibilityHelpers.h
index 440b1226..e120cafe 100644
--- a/src/SourceCompatibilityHelpers.h
+++ b/src/SourceCompatibilityHelpers.h
@@ -23,10 +23,11 @@
#ifndef SOURCE_COMPAT_HELPERS
#define SOURCE_COMPAT_HELPERS
+#include <clang/AST/Attr.h>
+#include <clang/AST/Expr.h>
+#include <clang/AST/Decl.h>
#include <clang/Basic/SourceLocation.h>
#include <clang/Basic/SourceManager.h>
-#include <clang/AST/Decl.h>
-#include <clang/AST/Expr.h>
namespace clazy {
@@ -68,12 +69,12 @@ inline bool hasUnusedResultAttr(clang::FunctionDecl *func)
if (const auto *R = Ret->getAttr<clang::WarnUnusedResultAttr>())
return R != nullptr;
} else if (const auto *ET = RetType->getAs<clang::EnumType>()) {
- if (const EnumDecl *ED = ET->getDecl()) {
+ if (const clang::EnumDecl *ED = ET->getDecl()) {
if (const auto *R = ED->getAttr<clang::WarnUnusedResultAttr>())
return R != nullptr;
}
}
- return clang::getAttr<clang::WarnUnusedResultAttr>() != nullptr;
+ return func->getAttr<clang::WarnUnusedResultAttr>() != nullptr;
#else
return func->hasUnusedResultAttr();
#endif