summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2016-09-28 09:30:49 (GMT)
committerRalf Habacker <ralf.habacker@freenet.de>2016-09-28 09:30:49 (GMT)
commitc652fa72b97751d4783a35b90f54fd5baceb4042 (patch)
tree397699e9c92863ea3b09583532dea5d05b6d354e
parente67d069d857d8a42f3bc0937cdfd6de994ed396e (diff)
Fix coverity check CID 170379: Unchecked return value (CHECKED_RETURN)
Calling TraverseDecl without checking return value. CCBUG:340646
-rw-r--r--unittests/testllvmparser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/unittests/testllvmparser.cpp b/unittests/testllvmparser.cpp
index 122d823..7ec339a 100644
--- a/unittests/testllvmparser.cpp
+++ b/unittests/testllvmparser.cpp
@@ -69,7 +69,8 @@ public:
virtual void HandleTranslationUnit(clang::ASTContext &Context)
{
- Visitor.TraverseDecl(Context.getTranslationUnitDecl());
+ if (!Visitor.TraverseDecl(Context.getTranslationUnitDecl()))
+ llvm::errs() << "could not parse file";
}
private: