summaryrefslogtreecommitdiffstats
path: root/include/clang/StaticAnalyzer/Core
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/StaticAnalyzer/Core')
-rw-r--r--include/clang/StaticAnalyzer/Core/AnalyzerOptions.h98
-rw-r--r--include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h4
-rw-r--r--include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h30
-rw-r--r--include/clang/StaticAnalyzer/Core/Checker.h49
-rw-r--r--include/clang/StaticAnalyzer/Core/CheckerManager.h63
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h4
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h6
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h1
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h4
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h10
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/Store.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h4
16 files changed, 143 insertions, 140 deletions
diff --git a/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h b/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
index fc9fc5e..f02e48a4 100644
--- a/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
+++ b/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
@@ -28,6 +28,10 @@ class DiagnosticsEngine;
class Preprocessor;
class LangOptions;
+namespace ento {
+class CheckerBase;
+}
+
/// Analysis - Set of available source code analyses.
enum Analyses {
#define ANALYSIS(NAME, CMDFLAG, DESC, SCOPE) NAME,
@@ -252,18 +256,102 @@ private:
/// \sa getMaxNodesPerTopLevelFunction
Optional<unsigned> MaxNodesPerTopLevelFunction;
+ /// A helper function that retrieves option for a given full-qualified
+ /// checker name.
+ /// Options for checkers can be specified via 'analyzer-config' command-line
+ /// option.
+ /// Example:
+ /// @code-analyzer-config unix.Malloc:OptionName=CheckerOptionValue @endcode
+ /// or @code-analyzer-config unix:OptionName=GroupOptionValue @endcode
+ /// for groups of checkers.
+ /// @param [in] CheckerName Full-qualified checker name, like
+ /// alpha.unix.StreamChecker.
+ /// @param [in] OptionName Name of the option to get.
+ /// @param [in] Default Default value if no option is specified.
+ /// @param [in] SearchInParents If set to true and the searched option was not
+ /// specified for the given checker the options for the parent packages will
+ /// be searched as well. The inner packages take precedence over the outer
+ /// ones.
+ /// @retval CheckerOptionValue An option for a checker if it was specified.
+ /// @retval GroupOptionValue An option for group if it was specified and no
+ /// checker-specific options were found. The closer group to checker,
+ /// the more priority it has. For example, @c coregroup.subgroup has more
+ /// priority than @c coregroup for @c coregroup.subgroup.CheckerName checker.
+ /// @retval Default If nor checker option, nor group option was found.
+ StringRef getCheckerOption(StringRef CheckerName, StringRef OptionName,
+ StringRef Default,
+ bool SearchInParents = false);
+
public:
- /// Interprets an option's string value as a boolean.
+ /// Interprets an option's string value as a boolean. The "true" string is
+ /// interpreted as true and the "false" string is interpreted as false.
///
- /// Accepts the strings "true" and "false".
/// If an option value is not provided, returns the given \p DefaultVal.
- bool getBooleanOption(StringRef Name, bool DefaultVal);
+ /// @param [in] Name Name for option to retrieve.
+ /// @param [in] DefaultVal Default value returned if no such option was
+ /// specified.
+ /// @param [in] C The optional checker parameter that can be used to restrict
+ /// the search to the options of this particular checker (and its parents
+ /// dependening on search mode).
+ /// @param [in] SearchInParents If set to true and the searched option was not
+ /// specified for the given checker the options for the parent packages will
+ /// be searched as well. The inner packages take precedence over the outer
+ /// ones.
+ bool getBooleanOption(StringRef Name, bool DefaultVal,
+ const ento::CheckerBase *C = nullptr,
+ bool SearchInParents = false);
/// Variant that accepts a Optional value to cache the result.
- bool getBooleanOption(Optional<bool> &V, StringRef Name, bool DefaultVal);
+ ///
+ /// @param [in,out] V Return value storage, returned if parameter contains
+ /// an existing valid option, else it is used to store a return value
+ /// @param [in] Name Name for option to retrieve.
+ /// @param [in] DefaultVal Default value returned if no such option was
+ /// specified.
+ /// @param [in] C The optional checker parameter that can be used to restrict
+ /// the search to the options of this particular checker (and its parents
+ /// dependening on search mode).
+ /// @param [in] SearchInParents If set to true and the searched option was not
+ /// specified for the given checker the options for the parent packages will
+ /// be searched as well. The inner packages take precedence over the outer
+ /// ones.
+ bool getBooleanOption(Optional<bool> &V, StringRef Name, bool DefaultVal,
+ const ento::CheckerBase *C = nullptr,
+ bool SearchInParents = false);
/// Interprets an option's string value as an integer value.
- int getOptionAsInteger(StringRef Name, int DefaultVal);
+ ///
+ /// If an option value is not provided, returns the given \p DefaultVal.
+ /// @param [in] Name Name for option to retrieve.
+ /// @param [in] DefaultVal Default value returned if no such option was
+ /// specified.
+ /// @param [in] C The optional checker parameter that can be used to restrict
+ /// the search to the options of this particular checker (and its parents
+ /// dependening on search mode).
+ /// @param [in] SearchInParents If set to true and the searched option was not
+ /// specified for the given checker the options for the parent packages will
+ /// be searched as well. The inner packages take precedence over the outer
+ /// ones.
+ int getOptionAsInteger(StringRef Name, int DefaultVal,
+ const ento::CheckerBase *C = nullptr,
+ bool SearchInParents = false);
+
+ /// Query an option's string value.
+ ///
+ /// If an option value is not provided, returns the given \p DefaultVal.
+ /// @param [in] Name Name for option to retrieve.
+ /// @param [in] DefaultVal Default value returned if no such option was
+ /// specified.
+ /// @param [in] C The optional checker parameter that can be used to restrict
+ /// the search to the options of this particular checker (and its parents
+ /// dependening on search mode).
+ /// @param [in] SearchInParents If set to true and the searched option was not
+ /// specified for the given checker the options for the parent packages will
+ /// be searched as well. The inner packages take precedence over the outer
+ /// ones.
+ StringRef getOptionAsString(StringRef Name, StringRef DefaultVal,
+ const ento::CheckerBase *C = nullptr,
+ bool SearchInParents = false);
/// \brief Retrieves and sets the UserMode. This is a high-level option,
/// which is used to set other low-level options. It is not accessible
diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
index b03371c..308ac83 100644
--- a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
+++ b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
@@ -290,7 +290,7 @@ public:
}
/// \brief Get the SourceRanges associated with the report.
- virtual std::pair<ranges_iterator, ranges_iterator> getRanges();
+ virtual llvm::iterator_range<ranges_iterator> getRanges();
/// \brief Add custom or predefined bug report visitors to this report.
///
@@ -492,7 +492,7 @@ public:
GRBugReporter(BugReporterData& d, ExprEngine& eng)
: BugReporter(d, GRBugReporterKind), Eng(eng) {}
- virtual ~GRBugReporter();
+ ~GRBugReporter() override;
/// getEngine - Return the analysis engine used to analyze a given
/// function or method.
diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h b/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
index b4ab1ea..941d5240 100644
--- a/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
+++ b/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
@@ -70,11 +70,15 @@ public:
void Profile(llvm::FoldingSetNodeID &ID) { ID = NodeID; }
};
- struct FilesMade : public llvm::FoldingSet<PDFileEntry> {
+ class FilesMade {
llvm::BumpPtrAllocator Alloc;
+ llvm::FoldingSet<PDFileEntry> Set;
+ public:
~FilesMade();
+ bool empty() const { return Set.empty(); }
+
void addDiagnostic(const PathDiagnostic &PD,
StringRef ConsumerName,
StringRef fileName);
@@ -352,9 +356,9 @@ private:
std::vector<SourceRange> ranges;
- PathDiagnosticPiece() LLVM_DELETED_FUNCTION;
- PathDiagnosticPiece(const PathDiagnosticPiece &P) LLVM_DELETED_FUNCTION;
- void operator=(const PathDiagnosticPiece &P) LLVM_DELETED_FUNCTION;
+ PathDiagnosticPiece() = delete;
+ PathDiagnosticPiece(const PathDiagnosticPiece &P) = delete;
+ void operator=(const PathDiagnosticPiece &P) = delete;
protected:
PathDiagnosticPiece(StringRef s, Kind k, DisplayHint hint = Below);
@@ -362,7 +366,7 @@ protected:
PathDiagnosticPiece(Kind k, DisplayHint hint = Below);
public:
- virtual ~PathDiagnosticPiece();
+ ~PathDiagnosticPiece() override;
StringRef getString() const { return str; }
@@ -478,7 +482,7 @@ private:
public:
StackHintGeneratorForSymbol(SymbolRef S, StringRef M) : Sym(S), Msg(M) {}
- virtual ~StackHintGeneratorForSymbol() {}
+ ~StackHintGeneratorForSymbol() override {}
/// \brief Search the call expression for the symbol Sym and dispatch the
/// 'getMessageForX()' methods to construct a specific message.
@@ -511,7 +515,7 @@ public:
: PathDiagnosticSpotPiece(pos, s, Event, addPosRange),
CallStackHint(stackHint) {}
- ~PathDiagnosticEventPiece();
+ ~PathDiagnosticEventPiece() override;
/// Mark the diagnostic piece as being potentially prunable. This
/// flag may have been previously set, at which point it will not
@@ -570,9 +574,9 @@ public:
PathDiagnosticLocation callEnterWithin;
PathDiagnosticLocation callReturn;
PathPieces path;
-
- virtual ~PathDiagnosticCallPiece();
-
+
+ ~PathDiagnosticCallPiece() override;
+
const Decl *getCaller() const { return Caller; }
const Decl *getCallee() const { return Callee; }
@@ -631,7 +635,7 @@ public:
LPairs.push_back(PathDiagnosticLocationPair(startPos, endPos));
}
- ~PathDiagnosticControlFlowPiece();
+ ~PathDiagnosticControlFlowPiece() override;
PathDiagnosticLocation getStartLocation() const {
assert(!LPairs.empty() &&
@@ -686,7 +690,7 @@ public:
PathDiagnosticMacroPiece(const PathDiagnosticLocation &pos)
: PathDiagnosticSpotPiece(pos, "", Macro) {}
- ~PathDiagnosticMacroPiece();
+ ~PathDiagnosticMacroPiece() override;
PathPieces subPieces;
@@ -730,7 +734,7 @@ class PathDiagnostic : public llvm::FoldingSetNode {
PathDiagnosticLocation UniqueingLoc;
const Decl *UniqueingDecl;
- PathDiagnostic() LLVM_DELETED_FUNCTION;
+ PathDiagnostic() = delete;
public:
PathDiagnostic(StringRef CheckName, const Decl *DeclWithIssue,
StringRef bugtype, StringRef verboseDesc, StringRef shortDesc,
diff --git a/include/clang/StaticAnalyzer/Core/Checker.h b/include/clang/StaticAnalyzer/Core/Checker.h
index 8cc3514..099d763 100644
--- a/include/clang/StaticAnalyzer/Core/Checker.h
+++ b/include/clang/StaticAnalyzer/Core/Checker.h
@@ -25,10 +25,6 @@ namespace ento {
namespace check {
-struct _VoidCheck {
- static void _register(void *checker, CheckerManager &mgr) { }
-};
-
template <typename DECL>
class ASTDecl {
template <typename CHECKER>
@@ -476,49 +472,22 @@ public:
CheckerProgramPointTag(const CheckerBase *Checker, StringRef Msg);
};
-template <typename CHECK1, typename CHECK2=check::_VoidCheck,
- typename CHECK3=check::_VoidCheck, typename CHECK4=check::_VoidCheck,
- typename CHECK5=check::_VoidCheck, typename CHECK6=check::_VoidCheck,
- typename CHECK7=check::_VoidCheck, typename CHECK8=check::_VoidCheck,
- typename CHECK9=check::_VoidCheck, typename CHECK10=check::_VoidCheck,
- typename CHECK11=check::_VoidCheck,typename CHECK12=check::_VoidCheck,
- typename CHECK13=check::_VoidCheck,typename CHECK14=check::_VoidCheck,
- typename CHECK15=check::_VoidCheck,typename CHECK16=check::_VoidCheck,
- typename CHECK17=check::_VoidCheck,typename CHECK18=check::_VoidCheck,
- typename CHECK19=check::_VoidCheck,typename CHECK20=check::_VoidCheck,
- typename CHECK21=check::_VoidCheck,typename CHECK22=check::_VoidCheck,
- typename CHECK23=check::_VoidCheck,typename CHECK24=check::_VoidCheck>
-class Checker;
-
-template <>
-class Checker<check::_VoidCheck>
- : public CheckerBase
-{
- virtual void anchor();
+template <typename CHECK1, typename... CHECKs>
+class Checker : public CHECK1, public CHECKs..., public CheckerBase {
public:
- static void _register(void *checker, CheckerManager &mgr) { }
+ template <typename CHECKER>
+ static void _register(CHECKER *checker, CheckerManager &mgr) {
+ CHECK1::_register(checker, mgr);
+ Checker<CHECKs...>::_register(checker, mgr);
+ }
};
-template <typename CHECK1, typename CHECK2, typename CHECK3, typename CHECK4,
- typename CHECK5, typename CHECK6, typename CHECK7, typename CHECK8,
- typename CHECK9, typename CHECK10,typename CHECK11,typename CHECK12,
- typename CHECK13,typename CHECK14,typename CHECK15,typename CHECK16,
- typename CHECK17,typename CHECK18,typename CHECK19,typename CHECK20,
- typename CHECK21,typename CHECK22,typename CHECK23,typename CHECK24>
-class Checker
- : public CHECK1,
- public Checker<CHECK2, CHECK3, CHECK4, CHECK5, CHECK6, CHECK7,
- CHECK8, CHECK9, CHECK10,CHECK11,CHECK12,CHECK13,
- CHECK14,CHECK15,CHECK16,CHECK17,CHECK18,CHECK19,
- CHECK20,CHECK21,CHECK22,CHECK23,CHECK24> {
+template <typename CHECK1>
+class Checker<CHECK1> : public CHECK1, public CheckerBase {
public:
template <typename CHECKER>
static void _register(CHECKER *checker, CheckerManager &mgr) {
CHECK1::_register(checker, mgr);
- Checker<CHECK2, CHECK3, CHECK4, CHECK5, CHECK6, CHECK7,
- CHECK8, CHECK9, CHECK10,CHECK11,CHECK12,CHECK13,
- CHECK14,CHECK15,CHECK16,CHECK17,CHECK18,CHECK19,
- CHECK20,CHECK21,CHECK22,CHECK23,CHECK24>::_register(checker, mgr);
}
};
diff --git a/include/clang/StaticAnalyzer/Core/CheckerManager.h b/include/clang/StaticAnalyzer/Core/CheckerManager.h
index 30b0480..8a1a82b 100644
--- a/include/clang/StaticAnalyzer/Core/CheckerManager.h
+++ b/include/clang/StaticAnalyzer/Core/CheckerManager.h
@@ -47,71 +47,18 @@ namespace ento {
template <typename T> class CheckerFn;
-template <typename RET, typename P1, typename P2, typename P3, typename P4,
- typename P5>
-class CheckerFn<RET(P1, P2, P3, P4, P5)> {
- typedef RET (*Func)(void *, P1, P2, P3, P4, P5);
+template <typename RET, typename... Ps>
+class CheckerFn<RET(Ps...)> {
+ typedef RET (*Func)(void *, Ps...);
Func Fn;
public:
CheckerBase *Checker;
CheckerFn(CheckerBase *checker, Func fn) : Fn(fn), Checker(checker) { }
- RET operator()(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) const {
- return Fn(Checker, p1, p2, p3, p4, p5);
+ RET operator()(Ps... ps) const {
+ return Fn(Checker, ps...);
}
};
-template <typename RET, typename P1, typename P2, typename P3, typename P4>
-class CheckerFn<RET(P1, P2, P3, P4)> {
- typedef RET (*Func)(void *, P1, P2, P3, P4);
- Func Fn;
-public:
- CheckerBase *Checker;
- CheckerFn(CheckerBase *checker, Func fn) : Fn(fn), Checker(checker) { }
- RET operator()(P1 p1, P2 p2, P3 p3, P4 p4) const {
- return Fn(Checker, p1, p2, p3, p4);
- }
-};
-
-template <typename RET, typename P1, typename P2, typename P3>
-class CheckerFn<RET(P1, P2, P3)> {
- typedef RET (*Func)(void *, P1, P2, P3);
- Func Fn;
-public:
- CheckerBase *Checker;
- CheckerFn(CheckerBase *checker, Func fn) : Fn(fn), Checker(checker) { }
- RET operator()(P1 p1, P2 p2, P3 p3) const { return Fn(Checker, p1, p2, p3); }
-};
-
-template <typename RET, typename P1, typename P2>
-class CheckerFn<RET(P1, P2)> {
- typedef RET (*Func)(void *, P1, P2);
- Func Fn;
-public:
- CheckerBase *Checker;
- CheckerFn(CheckerBase *checker, Func fn) : Fn(fn), Checker(checker) { }
- RET operator()(P1 p1, P2 p2) const { return Fn(Checker, p1, p2); }
-};
-
-template <typename RET, typename P1>
-class CheckerFn<RET(P1)> {
- typedef RET (*Func)(void *, P1);
- Func Fn;
-public:
- CheckerBase *Checker;
- CheckerFn(CheckerBase *checker, Func fn) : Fn(fn), Checker(checker) { }
- RET operator()(P1 p1) const { return Fn(Checker, p1); }
-};
-
-template <typename RET>
-class CheckerFn<RET()> {
- typedef RET (*Func)(void *);
- Func Fn;
-public:
- CheckerBase *Checker;
- CheckerFn(CheckerBase *checker, Func fn) : Fn(fn), Checker(checker) { }
- RET operator()() const { return Fn(Checker); }
-};
-
/// \brief Describes the different reasons a pointer escapes
/// during analysis.
enum PointerEscapeKind {
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h b/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
index dbc59cf..3e0913e 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
@@ -55,8 +55,8 @@ public:
AnalyzerOptions &Options,
CodeInjector* injector = nullptr);
- ~AnalysisManager();
-
+ ~AnalysisManager() override;
+
void ClearContexts() {
AnaCtxMgr.clear();
}
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h b/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
index 00deaa6..63b8631 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
@@ -119,7 +119,7 @@ private:
const LocationContext *LCtx;
llvm::PointerUnion<const Expr *, const Decl *> Origin;
- void operator=(const CallEvent &) LLVM_DELETED_FUNCTION;
+ void operator=(const CallEvent &) = delete;
protected:
// This is user data for subclasses.
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h b/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
index 0dafd5f..d5822e2 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
@@ -103,8 +103,8 @@ private:
ExplodedNode *Pred);
private:
- CoreEngine(const CoreEngine &) LLVM_DELETED_FUNCTION;
- void operator=(const CoreEngine &) LLVM_DELETED_FUNCTION;
+ CoreEngine(const CoreEngine &) = delete;
+ void operator=(const CoreEngine &) = delete;
ExplodedNode *generateCallExitBeginNode(ExplodedNode *N);
@@ -367,7 +367,7 @@ public:
EnclosingBldr->takeNodes(*I);
}
- virtual ~StmtNodeBuilder();
+ ~StmtNodeBuilder() override;
using NodeBuilder::generateNode;
using NodeBuilder::generateSink;
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h b/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h
index ba9715b..cc3779d 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h
@@ -106,7 +106,6 @@ private:
public:
EnvironmentManager(llvm::BumpPtrAllocator& Allocator) : F(Allocator) {}
- ~EnvironmentManager() {}
Environment getInitialEnvironment() {
return Environment(F.getEmptyMap());
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h b/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
index c4eabb8..cfb1b92 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
@@ -127,8 +127,6 @@ public:
: Location(loc), State(state), Succs(IsSink) {
assert(isSink() == IsSink);
}
-
- ~ExplodedNode() {}
/// getLocation - Returns the edge associated with the given node.
ProgramPoint getLocation() const { return Location; }
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h b/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
index 247bf0c..d8f1c34 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
@@ -102,7 +102,7 @@ public:
FunctionSummariesTy *FS,
InliningModes HowToInlineIn);
- ~ExprEngine();
+ ~ExprEngine() override;
/// Returns true if there is still simulation state on the worklist.
bool ExecuteWorkList(const LocationContext *L, unsigned Steps = 150000) {
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h b/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
index 1be7a26..4f07129 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
@@ -609,7 +609,7 @@ public:
AnalysisDeclContext *getAnalysisDeclContext() const { return AC; }
- virtual void dumpToStream(raw_ostream &os) const override;
+ void dumpToStream(raw_ostream &os) const override;
void Profile(llvm::FoldingSetNodeID& ID) const override;
@@ -704,7 +704,7 @@ private:
};
/// SymbolicRegion - A special, "non-concrete" region. Unlike other region
-/// clases, SymbolicRegion represents a region that serves as an alias for
+/// classes, SymbolicRegion represents a region that serves as an alias for
/// either a real region, a NULL pointer, etc. It essentially is used to
/// map the concept of symbolic values into the domain of regions. Symbolic
/// regions do not need to be typed.
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h b/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
index e819b88..ac4e452 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
@@ -76,7 +76,7 @@ public:
typedef llvm::ImmutableMap<void*, void*> GenericDataMap;
private:
- void operator=(const ProgramState& R) LLVM_DELETED_FUNCTION;
+ void operator=(const ProgramState& R) = delete;
friend class ProgramStateManager;
friend class ExplodedGraph;
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h b/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
index ef43fe0..642e11a 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
@@ -203,8 +203,8 @@ class DefinedOrUnknownSVal : public SVal {
private:
// We want calling these methods to be a compiler error since they are
// tautologically false.
- bool isUndef() const LLVM_DELETED_FUNCTION;
- bool isValid() const LLVM_DELETED_FUNCTION;
+ bool isUndef() const = delete;
+ bool isValid() const = delete;
protected:
DefinedOrUnknownSVal() {}
@@ -236,9 +236,9 @@ class DefinedSVal : public DefinedOrUnknownSVal {
private:
// We want calling these methods to be a compiler error since they are
// tautologically true/false.
- bool isUnknown() const LLVM_DELETED_FUNCTION;
- bool isUnknownOrUndef() const LLVM_DELETED_FUNCTION;
- bool isValid() const LLVM_DELETED_FUNCTION;
+ bool isUnknown() const = delete;
+ bool isUnknownOrUndef() const = delete;
+ bool isValid() const = delete;
protected:
DefinedSVal() {}
explicit DefinedSVal(const void *d, bool isLoc, unsigned ValKind)
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h b/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
index 5500c3c..a03b630 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
@@ -225,7 +225,7 @@ public:
bool HandleBinding(StoreManager& SMgr, Store store, const MemRegion* R,
SVal val) override;
- LLVM_EXPLICIT operator bool() { return First && Binding; }
+ explicit operator bool() { return First && Binding; }
const MemRegion *getRegion() { return Binding; }
};
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h b/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
index fbeaae4..1ca96a2 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
@@ -109,7 +109,7 @@ protected:
SymbolData(Kind k, SymbolID sym) : SymExpr(k), Sym(sym) {}
public:
- virtual ~SymbolData() {}
+ ~SymbolData() override {}
SymbolID getSymbolID() const { return Sym; }
@@ -589,8 +589,6 @@ public:
: LCtx(Ctx), Loc(s), SymMgr(symmgr),
reapedStore(nullptr, storeMgr) {}
- ~SymbolReaper() {}
-
const LocationContext *getLocationContext() const { return LCtx; }
bool isLive(SymbolRef sym);
OpenPOWER on IntegriCloud