mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-29 00:08:59 -04:00

This is an opt-in tweak for leak diagnostics to reference the allocation site if the diagnostic consumer only wants a pithy amount of information, and not the entire path. This is a strawman enhancement that I expect to see some experimentation with over the next week, and can go away if we don't want it. Currently it is only used by RetainCountChecker, but could be used by MallocChecker if and when we decide this should stay in. llvm-svn: 179634
25 lines
722 B
C++
25 lines
722 B
C++
//=- AllocationDiagnostics.cpp - Config options for allocation diags *- C++ -*-//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Declares the configuration functions for leaks/allocation diagnostics.
|
|
//
|
|
//===--------------------------
|
|
|
|
#include "AllocationDiagnostics.h"
|
|
|
|
namespace clang {
|
|
namespace ento {
|
|
|
|
bool shouldIncludeAllocationSiteInLeakDiagnostics(AnalyzerOptions &AOpts) {
|
|
return AOpts.getBooleanOption("leak-diagnostics-reference-allocation",
|
|
false);
|
|
}
|
|
|
|
}}
|