#include "CheckerRegistration.h"
#include "clang/StaticAnalyzer/Core/Checker.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h"
#include "gtest/gtest.h"
#include <fstream>
usingnamespaceclang;
usingnamespaceento;
namespace {
class DescriptiveNameChecker : public Checker<check::PreCall> { … };
void addDescriptiveNameChecker(AnalysisASTConsumer &AnalysisConsumer,
AnalyzerOptions &AnOpts) { … }
bool runChecker(StringRef Code, std::string &Output) { … }
TEST(MemRegionDescriptiveNameTest, ConcreteIntElementRegionIndex) { … }
TEST(MemRegionDescriptiveNameTest, SymbolicElementRegionIndex) { … }
TEST(MemRegionDescriptiveNameTest, SymbolicElementRegionIndexSymbolValFails) { … }
TEST(MemRegionDescriptiveNameTest, SymbolicElementRegionIndexOrigRegionFails) { … }
TEST(MemRegionDescriptiveNameTest, SymbolicElementRegionIndexDescrNameFails) { … }
TEST(MemRegionDescriptiveNameTest,
SymbolicElementRegionIndexIncorrectSymbolName) { … }
}