r339624 - Fix Clang warnings and bad #include filenames in r339595 and r339599.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 13 15:07:11 PDT 2018
Author: rsmith
Date: Mon Aug 13 15:07:11 2018
New Revision: 339624
URL: http://llvm.org/viewvc/llvm-project?rev=339624&view=rev
Log:
Fix Clang warnings and bad #include filenames in r339595 and r339599.
Modified:
cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h
cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h?rev=339624&r1=339623&r2=339624&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h Mon Aug 13 15:07:11 2018
@@ -32,6 +32,8 @@ class FieldNode {
protected:
const FieldRegion *FR;
+ ~FieldNode() = default;
+
public:
FieldNode(const FieldRegion *FR) : FR(FR) { assert(FR); }
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp?rev=339624&r1=339623&r2=339624&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp Mon Aug 13 15:07:11 2018
@@ -46,7 +46,7 @@
//
//===----------------------------------------------------------------------===//
-#include "ClangSACheckers.h"
+#include "../ClangSACheckers.h"
#include "UninitializedObject.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
#include "clang/StaticAnalyzer/Core/Checker.h"
@@ -74,7 +74,7 @@ public:
/// A basic field type, that is not a pointer or a reference, it's dynamic and
/// static type is the same.
-class RegularField : public FieldNode {
+class RegularField final : public FieldNode {
public:
RegularField(const FieldRegion *FR) : FieldNode(FR) {}
@@ -84,7 +84,7 @@ public:
virtual void printPrefix(llvm::raw_ostream &Out) const override {}
- virtual void printNode(llvm::raw_ostream &Out) const {
+ virtual void printNode(llvm::raw_ostream &Out) const override {
Out << getVariableName(getDecl());
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp?rev=339624&r1=339623&r2=339624&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp Mon Aug 13 15:07:11 2018
@@ -18,7 +18,7 @@
//
//===----------------------------------------------------------------------===//
-#include "ClangSACheckers.h"
+#include "../ClangSACheckers.h"
#include "UninitializedObject.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
#include "clang/StaticAnalyzer/Core/Checker.h"
@@ -31,7 +31,7 @@ using namespace clang::ento;
namespace {
/// Represents a pointer or a reference field.
-class LocField : public FieldNode {
+class LocField final : public FieldNode {
/// We'll store whether the pointee or the pointer itself is uninitialited.
const bool IsDereferenced;
More information about the cfe-commits
mailing list