forked from OSchip/llvm-project
Inlined clang/Analysis/Analyses/GRSimpleVals.h into LocalCheckers.h and removed
GRSimpleVals.h Added a PathDiagnosticClient option to the driver functions for the CFRefCountChecker and the GRSimpleVals analysis. Both analyses now accept a "-o" argument from the driver that specifies where HTML reports should be dumped. llvm-svn: 48989
This commit is contained in:
parent
612d34641b
commit
c27815ca82
|
@ -12,18 +12,20 @@
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "ASTConsumers.h"
|
#include "ASTConsumers.h"
|
||||||
|
#include "HTMLDiagnostics.h"
|
||||||
#include "clang/AST/TranslationUnit.h"
|
#include "clang/AST/TranslationUnit.h"
|
||||||
#include "clang/Basic/Diagnostic.h"
|
#include "clang/Analysis/PathDiagnostic.h"
|
||||||
#include "clang/Basic/SourceManager.h"
|
#include "clang/Basic/SourceManager.h"
|
||||||
#include "clang/Basic/FileManager.h"
|
#include "clang/Basic/FileManager.h"
|
||||||
#include "clang/AST/AST.h"
|
#include "clang/AST/AST.h"
|
||||||
#include "clang/AST/ASTConsumer.h"
|
#include "clang/AST/ASTConsumer.h"
|
||||||
#include "clang/AST/CFG.h"
|
#include "clang/AST/CFG.h"
|
||||||
#include "clang/Analysis/Analyses/LiveVariables.h"
|
#include "clang/Analysis/Analyses/LiveVariables.h"
|
||||||
#include "clang/Analysis/Analyses/GRSimpleVals.h"
|
|
||||||
#include "clang/Analysis/LocalCheckers.h"
|
#include "clang/Analysis/LocalCheckers.h"
|
||||||
#include "llvm/Support/Streams.h"
|
#include "llvm/Support/Streams.h"
|
||||||
#include "llvm/Support/Timer.h"
|
#include "llvm/Support/Timer.h"
|
||||||
|
#include "llvm/ADT/OwningPtr.h"
|
||||||
|
|
||||||
using namespace clang;
|
using namespace clang;
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
@ -630,12 +632,15 @@ namespace {
|
||||||
class GRSimpleValsVisitor : public CFGVisitor {
|
class GRSimpleValsVisitor : public CFGVisitor {
|
||||||
Diagnostic &Diags;
|
Diagnostic &Diags;
|
||||||
ASTContext* Ctx;
|
ASTContext* Ctx;
|
||||||
|
const std::string& HTMLDir;
|
||||||
bool Visualize;
|
bool Visualize;
|
||||||
bool TrimGraph;
|
bool TrimGraph;
|
||||||
public:
|
public:
|
||||||
GRSimpleValsVisitor(Diagnostic &diags, const std::string& fname,
|
GRSimpleValsVisitor(Diagnostic &diags, const std::string& fname,
|
||||||
|
const std::string& htmldir,
|
||||||
bool visualize, bool trim)
|
bool visualize, bool trim)
|
||||||
: CFGVisitor(fname), Diags(diags), Visualize(visualize), TrimGraph(trim){}
|
: CFGVisitor(fname), Diags(diags), HTMLDir(htmldir),
|
||||||
|
Visualize(visualize), TrimGraph(trim) {}
|
||||||
|
|
||||||
virtual void Initialize(ASTContext &Context) { Ctx = &Context; }
|
virtual void Initialize(ASTContext &Context) { Ctx = &Context; }
|
||||||
virtual void VisitCFG(CFG& C, Decl&);
|
virtual void VisitCFG(CFG& C, Decl&);
|
||||||
|
@ -645,9 +650,11 @@ namespace {
|
||||||
|
|
||||||
ASTConsumer* clang::CreateGRSimpleVals(Diagnostic &Diags,
|
ASTConsumer* clang::CreateGRSimpleVals(Diagnostic &Diags,
|
||||||
const std::string& FunctionName,
|
const std::string& FunctionName,
|
||||||
|
const std::string& HTMLDir,
|
||||||
bool Visualize, bool TrimGraph) {
|
bool Visualize, bool TrimGraph) {
|
||||||
|
|
||||||
return new GRSimpleValsVisitor(Diags, FunctionName, Visualize, TrimGraph);
|
return new GRSimpleValsVisitor(Diags, FunctionName, HTMLDir,
|
||||||
|
Visualize, TrimGraph);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GRSimpleValsVisitor::VisitCFG(CFG& C, Decl& CD) {
|
void GRSimpleValsVisitor::VisitCFG(CFG& C, Decl& CD) {
|
||||||
|
@ -678,16 +685,21 @@ void GRSimpleValsVisitor::VisitCFG(CFG& C, Decl& CD) {
|
||||||
#if 0
|
#if 0
|
||||||
llvm::Timer T("GRSimpleVals");
|
llvm::Timer T("GRSimpleVals");
|
||||||
T.startTimer();
|
T.startTimer();
|
||||||
unsigned size = RunGRSimpleVals(C, CD, *Ctx, Diags, false, false);
|
unsigned size = RunGRSimpleVals(C, CD, *Ctx, Diags, NULL, false, false);
|
||||||
T.stopTimer();
|
T.stopTimer();
|
||||||
llvm::cerr << size << ' ' << T.getWallTime() << '\n';
|
llvm::cerr << size << ' ' << T.getWallTime() << '\n';
|
||||||
#else
|
#else
|
||||||
RunGRSimpleVals(C, CD, *Ctx, Diags, false, false);
|
llvm::OwningPtr<PathDiagnosticClient> PD;
|
||||||
|
|
||||||
|
if (!HTMLDir.empty())
|
||||||
|
PD.reset(CreateHTMLDiagnosticClient(HTMLDir));
|
||||||
|
|
||||||
|
RunGRSimpleVals(C, CD, *Ctx, Diags, PD.get(), false, false);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
llvm::cerr << '\n';
|
llvm::cerr << '\n';
|
||||||
RunGRSimpleVals(C, CD, *Ctx, Diags, Visualize, TrimGraph);
|
RunGRSimpleVals(C, CD, *Ctx, Diags, NULL, Visualize, TrimGraph);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -699,10 +711,12 @@ namespace {
|
||||||
class CFRefCountCheckerVisitor : public CFGVisitor {
|
class CFRefCountCheckerVisitor : public CFGVisitor {
|
||||||
Diagnostic &Diags;
|
Diagnostic &Diags;
|
||||||
ASTContext* Ctx;
|
ASTContext* Ctx;
|
||||||
|
const std::string& HTMLDir;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CFRefCountCheckerVisitor(Diagnostic &diags, const std::string& fname)
|
CFRefCountCheckerVisitor(Diagnostic &diags, const std::string& fname,
|
||||||
: CFGVisitor(fname), Diags(diags) {}
|
const std::string& htmldir)
|
||||||
|
: CFGVisitor(fname), Diags(diags), HTMLDir(htmldir) {}
|
||||||
|
|
||||||
virtual void Initialize(ASTContext &Context) { Ctx = &Context; }
|
virtual void Initialize(ASTContext &Context) { Ctx = &Context; }
|
||||||
virtual void VisitCFG(CFG& C, Decl&);
|
virtual void VisitCFG(CFG& C, Decl&);
|
||||||
|
@ -712,9 +726,10 @@ namespace {
|
||||||
|
|
||||||
|
|
||||||
ASTConsumer* clang::CreateCFRefChecker(Diagnostic &Diags,
|
ASTConsumer* clang::CreateCFRefChecker(Diagnostic &Diags,
|
||||||
const std::string& FunctionName) {
|
const std::string& FunctionName,
|
||||||
|
const std::string& HTMLDir) {
|
||||||
|
|
||||||
return new CFRefCountCheckerVisitor(Diags, FunctionName);
|
return new CFRefCountCheckerVisitor(Diags, FunctionName, HTMLDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFRefCountCheckerVisitor::VisitCFG(CFG& C, Decl& CD) {
|
void CFRefCountCheckerVisitor::VisitCFG(CFG& C, Decl& CD) {
|
||||||
|
@ -725,7 +740,7 @@ void CFRefCountCheckerVisitor::VisitCFG(CFG& C, Decl& CD) {
|
||||||
Loc.getFileID() != Ctx->getSourceManager().getMainFileID())
|
Loc.getFileID() != Ctx->getSourceManager().getMainFileID())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CheckCFRefCount(C, CD, *Ctx, Diags);
|
CheckCFRefCount(C, CD, *Ctx, Diags, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
|
@ -44,10 +44,12 @@ ASTConsumer *CreateUnitValsChecker(Diagnostic &Diags);
|
||||||
|
|
||||||
ASTConsumer *CreateGRSimpleVals(Diagnostic &Diags,
|
ASTConsumer *CreateGRSimpleVals(Diagnostic &Diags,
|
||||||
const std::string& Function,
|
const std::string& Function,
|
||||||
|
const std::string& HTMLDir,
|
||||||
bool Visualize = false, bool TrimGraph = false);
|
bool Visualize = false, bool TrimGraph = false);
|
||||||
|
|
||||||
ASTConsumer* CreateCFRefChecker(Diagnostic &Diags,
|
ASTConsumer* CreateCFRefChecker(Diagnostic &Diags,
|
||||||
const std::string& FunctionName);
|
const std::string& FunctionName,
|
||||||
|
const std::string& HTMLDir);
|
||||||
|
|
||||||
ASTConsumer *CreateCodeRewriterTest(const std::string& InFile,
|
ASTConsumer *CreateCodeRewriterTest(const std::string& InFile,
|
||||||
const std::string& OutFile,
|
const std::string& OutFile,
|
||||||
|
|
|
@ -1039,13 +1039,14 @@ static ASTConsumer* CreateASTConsumer(const std::string& InFile,
|
||||||
return CreateUnitValsChecker(Diag);
|
return CreateUnitValsChecker(Diag);
|
||||||
|
|
||||||
case AnalysisGRSimpleVals:
|
case AnalysisGRSimpleVals:
|
||||||
return CreateGRSimpleVals(Diag, AnalyzeSpecificFunction);
|
return CreateGRSimpleVals(Diag, AnalyzeSpecificFunction, OutputFile);
|
||||||
|
|
||||||
case AnalysisGRSimpleValsView:
|
case AnalysisGRSimpleValsView:
|
||||||
return CreateGRSimpleVals(Diag, AnalyzeSpecificFunction, true, TrimGraph);
|
return CreateGRSimpleVals(Diag, AnalyzeSpecificFunction, OutputFile,
|
||||||
|
true, TrimGraph);
|
||||||
|
|
||||||
case CheckerCFRef:
|
case CheckerCFRef:
|
||||||
return CreateCFRefChecker(Diag, AnalyzeSpecificFunction);
|
return CreateCFRefChecker(Diag, AnalyzeSpecificFunction, OutputFile);
|
||||||
|
|
||||||
case TestSerialization:
|
case TestSerialization:
|
||||||
return CreateSerializationTest(Diag, FileMgr, LangOpts);
|
return CreateSerializationTest(Diag, FileMgr, LangOpts);
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
//===-- GRSimpleVals.h- Simple, Path-Sens. Constant Prop. ---------*- C++ -*-==//
|
|
||||||
//
|
|
||||||
// The LLVM Compiler Infrastructure
|
|
||||||
//
|
|
||||||
// This file is distributed under the University of Illinois Open Source
|
|
||||||
// License. See LICENSE.TXT for details.
|
|
||||||
//
|
|
||||||
//===----------------------------------------------------------------------===//
|
|
||||||
//
|
|
||||||
// Constant Propagation via Graph Reachability
|
|
||||||
//
|
|
||||||
// This file defines the interface to use the 'GRSimpleVals' path-sensitive
|
|
||||||
// constant-propagation analysis.
|
|
||||||
//
|
|
||||||
//===----------------------------------------------------------------------===//
|
|
||||||
|
|
||||||
#ifndef LLVM_CLANG_GRCONSTANTS
|
|
||||||
#define LLVM_CLANG_GRCONSTANTS
|
|
||||||
|
|
||||||
namespace clang {
|
|
||||||
class Diagnostic;
|
|
||||||
|
|
||||||
/// RunGRSimpleVals - This is a simple driver to run the GRSimpleVals analysis
|
|
||||||
/// on a provided CFG. This interface will eventually be replaced with
|
|
||||||
/// something more elaborate as the requirements on the interface become
|
|
||||||
/// clearer. The value returned is the number of nodes in the ExplodedGraph.
|
|
||||||
unsigned RunGRSimpleVals(CFG& cfg, Decl& CD, ASTContext& Ctx,
|
|
||||||
Diagnostic& Diag, bool Visualize, bool TrimGraph);
|
|
||||||
|
|
||||||
} // end clang namespace
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -21,6 +21,7 @@ class CFG;
|
||||||
class Decl;
|
class Decl;
|
||||||
class Diagnostic;
|
class Diagnostic;
|
||||||
class ASTContext;
|
class ASTContext;
|
||||||
|
class PathDiagnosticClient;
|
||||||
|
|
||||||
void CheckDeadStores(CFG& cfg, ASTContext &Ctx, Diagnostic &Diags);
|
void CheckDeadStores(CFG& cfg, ASTContext &Ctx, Diagnostic &Diags);
|
||||||
|
|
||||||
|
@ -28,7 +29,11 @@ void CheckUninitializedValues(CFG& cfg, ASTContext& Ctx, Diagnostic& Diags,
|
||||||
bool FullUninitTaint=false);
|
bool FullUninitTaint=false);
|
||||||
|
|
||||||
void CheckCFRefCount(CFG& cfg, Decl& CodeDecl, ASTContext& Ctx,
|
void CheckCFRefCount(CFG& cfg, Decl& CodeDecl, ASTContext& Ctx,
|
||||||
Diagnostic& Diag);
|
Diagnostic& Diag, PathDiagnosticClient* PD);
|
||||||
|
|
||||||
|
unsigned RunGRSimpleVals(CFG& cfg, Decl& CD, ASTContext& Ctx,
|
||||||
|
Diagnostic& Diag, PathDiagnosticClient* PD,
|
||||||
|
bool Visualize, bool TrimGraph);
|
||||||
|
|
||||||
} // end namespace clang
|
} // end namespace clang
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
#include "GRSimpleVals.h"
|
#include "GRSimpleVals.h"
|
||||||
#include "clang/Analysis/PathSensitive/ValueState.h"
|
#include "clang/Analysis/PathSensitive/ValueState.h"
|
||||||
#include "clang/Basic/Diagnostic.h"
|
#include "clang/Analysis/PathDiagnostic.h"
|
||||||
#include "clang/Analysis/LocalCheckers.h"
|
#include "clang/Analysis/LocalCheckers.h"
|
||||||
#include "llvm/ADT/DenseMap.h"
|
#include "llvm/ADT/DenseMap.h"
|
||||||
#include "llvm/ADT/FoldingSet.h"
|
#include "llvm/ADT/FoldingSet.h"
|
||||||
|
@ -778,7 +778,7 @@ CFRefCount::RefBindings CFRefCount::Update(RefBindings B, SymbolID sym,
|
||||||
namespace clang {
|
namespace clang {
|
||||||
|
|
||||||
void CheckCFRefCount(CFG& cfg, Decl& CD, ASTContext& Ctx,
|
void CheckCFRefCount(CFG& cfg, Decl& CD, ASTContext& Ctx,
|
||||||
Diagnostic& Diag) {
|
Diagnostic& Diag, PathDiagnosticClient* PD) {
|
||||||
|
|
||||||
if (Diag.hasErrorOccurred())
|
if (Diag.hasErrorOccurred())
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#include "GRSimpleVals.h"
|
#include "GRSimpleVals.h"
|
||||||
#include "BasicObjCFoundationChecks.h"
|
#include "BasicObjCFoundationChecks.h"
|
||||||
#include "clang/Analysis/PathSensitive/ValueState.h"
|
#include "clang/Analysis/PathSensitive/ValueState.h"
|
||||||
#include "clang/Basic/Diagnostic.h"
|
#include "clang/Analysis/PathDiagnostic.h"
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
using namespace clang;
|
using namespace clang;
|
||||||
|
@ -46,28 +46,31 @@ static inline Stmt* GetStmt(const ProgramPoint& P) {
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename ITERATOR>
|
template <typename ITERATOR>
|
||||||
static void EmitDiag(Diagnostic& Diag, SourceManager& SrcMgr,
|
static void EmitDiag(Diagnostic& Diag, PathDiagnosticClient* PD,
|
||||||
unsigned ErrorDiag, ITERATOR I) {
|
SourceManager& SrcMgr,
|
||||||
|
unsigned ErrorDiag, ITERATOR I) {
|
||||||
|
|
||||||
Stmt* S = GetStmt(GetLocation(I));
|
Stmt* S = GetStmt(GetLocation(I));
|
||||||
Diag.Report(FullSourceLoc(S->getLocStart(), SrcMgr), ErrorDiag);
|
Diag.Report(PD, FullSourceLoc(S->getLocStart(), SrcMgr), ErrorDiag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
static void EmitDiag(Diagnostic& Diag, SourceManager& SrcMgr,
|
static void EmitDiag(Diagnostic& Diag, PathDiagnosticClient* PD,
|
||||||
unsigned ErrorDiag, GRExprEngine::undef_arg_iterator I) {
|
SourceManager& SrcMgr, unsigned ErrorDiag,
|
||||||
|
GRExprEngine::undef_arg_iterator I) {
|
||||||
|
|
||||||
Stmt* S1 = GetStmt(GetLocation(I));
|
Stmt* S1 = GetStmt(GetLocation(I));
|
||||||
Expr* E2 = cast<Expr>(I->second);
|
Expr* E2 = cast<Expr>(I->second);
|
||||||
|
|
||||||
SourceLocation Loc = S1->getLocStart();
|
SourceLocation Loc = S1->getLocStart();
|
||||||
SourceRange R = E2->getSourceRange();
|
SourceRange R = E2->getSourceRange();
|
||||||
Diag.Report(FullSourceLoc(Loc, SrcMgr), ErrorDiag, 0, 0, &R, 1);
|
Diag.Report(PD, FullSourceLoc(Loc, SrcMgr), ErrorDiag, 0, 0, &R, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename ITERATOR>
|
template <typename ITERATOR>
|
||||||
void EmitWarning(Diagnostic& Diag, SourceManager& SrcMgr,
|
void EmitWarning(Diagnostic& Diag, PathDiagnosticClient* PD,
|
||||||
|
SourceManager& SrcMgr,
|
||||||
ITERATOR I, ITERATOR E, const char* msg) {
|
ITERATOR I, ITERATOR E, const char* msg) {
|
||||||
|
|
||||||
std::ostringstream Out;
|
std::ostringstream Out;
|
||||||
|
@ -97,12 +100,13 @@ void EmitWarning(Diagnostic& Diag, SourceManager& SrcMgr,
|
||||||
CachedErrors.insert(p);
|
CachedErrors.insert(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
EmitDiag(Diag, SrcMgr, ErrorDiag, I);
|
EmitDiag(Diag, PD, SrcMgr, ErrorDiag, I);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned RunGRSimpleVals(CFG& cfg, Decl& CD, ASTContext& Ctx,
|
unsigned RunGRSimpleVals(CFG& cfg, Decl& CD, ASTContext& Ctx,
|
||||||
Diagnostic& Diag, bool Visualize, bool TrimGraph) {
|
Diagnostic& Diag, PathDiagnosticClient* PD,
|
||||||
|
bool Visualize, bool TrimGraph) {
|
||||||
|
|
||||||
GRCoreEngine<GRExprEngine> Eng(cfg, CD, Ctx);
|
GRCoreEngine<GRExprEngine> Eng(cfg, CD, Ctx);
|
||||||
GRExprEngine* CheckerState = &Eng.getCheckerState();
|
GRExprEngine* CheckerState = &Eng.getCheckerState();
|
||||||
|
@ -118,56 +122,56 @@ unsigned RunGRSimpleVals(CFG& cfg, Decl& CD, ASTContext& Ctx,
|
||||||
CheckerState->AddObjCMessageExprCheck(FoundationCheck.get());
|
CheckerState->AddObjCMessageExprCheck(FoundationCheck.get());
|
||||||
|
|
||||||
// Execute the worklist algorithm.
|
// Execute the worklist algorithm.
|
||||||
Eng.ExecuteWorkList(100000);
|
Eng.ExecuteWorkList(120000);
|
||||||
|
|
||||||
SourceManager& SrcMgr = Ctx.getSourceManager();
|
SourceManager& SrcMgr = Ctx.getSourceManager();
|
||||||
|
|
||||||
EmitWarning(Diag, SrcMgr,
|
EmitWarning(Diag, PD, SrcMgr,
|
||||||
CheckerState->null_derefs_begin(),
|
CheckerState->null_derefs_begin(),
|
||||||
CheckerState->null_derefs_end(),
|
CheckerState->null_derefs_end(),
|
||||||
"Dereference of NULL pointer.");
|
"Dereference of NULL pointer.");
|
||||||
|
|
||||||
EmitWarning(Diag, SrcMgr,
|
EmitWarning(Diag, PD, SrcMgr,
|
||||||
CheckerState->undef_derefs_begin(),
|
CheckerState->undef_derefs_begin(),
|
||||||
CheckerState->undef_derefs_end(),
|
CheckerState->undef_derefs_end(),
|
||||||
"Dereference of undefined value.");
|
"Dereference of undefined value.");
|
||||||
|
|
||||||
EmitWarning(Diag, SrcMgr,
|
EmitWarning(Diag, PD, SrcMgr,
|
||||||
CheckerState->undef_branches_begin(),
|
CheckerState->undef_branches_begin(),
|
||||||
CheckerState->undef_branches_end(),
|
CheckerState->undef_branches_end(),
|
||||||
"Branch condition evaluates to an uninitialized value.");
|
"Branch condition evaluates to an uninitialized value.");
|
||||||
|
|
||||||
EmitWarning(Diag, SrcMgr,
|
EmitWarning(Diag, PD, SrcMgr,
|
||||||
CheckerState->explicit_bad_divides_begin(),
|
CheckerState->explicit_bad_divides_begin(),
|
||||||
CheckerState->explicit_bad_divides_end(),
|
CheckerState->explicit_bad_divides_end(),
|
||||||
"Division by zero/undefined value.");
|
"Division by zero/undefined value.");
|
||||||
|
|
||||||
EmitWarning(Diag, SrcMgr,
|
EmitWarning(Diag, PD, SrcMgr,
|
||||||
CheckerState->undef_results_begin(),
|
CheckerState->undef_results_begin(),
|
||||||
CheckerState->undef_results_end(),
|
CheckerState->undef_results_end(),
|
||||||
"Result of operation is undefined.");
|
"Result of operation is undefined.");
|
||||||
|
|
||||||
EmitWarning(Diag, SrcMgr,
|
EmitWarning(Diag, PD, SrcMgr,
|
||||||
CheckerState->bad_calls_begin(),
|
CheckerState->bad_calls_begin(),
|
||||||
CheckerState->bad_calls_end(),
|
CheckerState->bad_calls_end(),
|
||||||
"Call using a NULL or undefined function pointer value.");
|
"Call using a NULL or undefined function pointer value.");
|
||||||
|
|
||||||
EmitWarning(Diag, SrcMgr,
|
EmitWarning(Diag, PD, SrcMgr,
|
||||||
CheckerState->undef_arg_begin(),
|
CheckerState->undef_arg_begin(),
|
||||||
CheckerState->undef_arg_end(),
|
CheckerState->undef_arg_end(),
|
||||||
"Pass-by-value argument in function is undefined.");
|
"Pass-by-value argument in function is undefined.");
|
||||||
|
|
||||||
EmitWarning(Diag, SrcMgr,
|
EmitWarning(Diag, PD, SrcMgr,
|
||||||
CheckerState->msg_expr_undef_arg_begin(),
|
CheckerState->msg_expr_undef_arg_begin(),
|
||||||
CheckerState->msg_expr_undef_arg_end(),
|
CheckerState->msg_expr_undef_arg_end(),
|
||||||
"Pass-by-value argument in message expression is undefined.");
|
"Pass-by-value argument in message expression is undefined.");
|
||||||
|
|
||||||
EmitWarning(Diag, SrcMgr,
|
EmitWarning(Diag, PD, SrcMgr,
|
||||||
CheckerState->undef_receivers_begin(),
|
CheckerState->undef_receivers_begin(),
|
||||||
CheckerState->undef_receivers_end(),
|
CheckerState->undef_receivers_end(),
|
||||||
"Receiver in message expression is an uninitialized value.");
|
"Receiver in message expression is an uninitialized value.");
|
||||||
|
|
||||||
EmitWarning(Diag, SrcMgr,
|
EmitWarning(Diag, PD, SrcMgr,
|
||||||
CheckerState->ret_stackaddr_begin(),
|
CheckerState->ret_stackaddr_begin(),
|
||||||
CheckerState->ret_stackaddr_end(),
|
CheckerState->ret_stackaddr_end(),
|
||||||
"Address of stack-allocated variable returned.");
|
"Address of stack-allocated variable returned.");
|
||||||
|
|
Loading…
Reference in New Issue