Kaydet (Commit) 5f63d2c5 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

-Werror=unused-function

Change-Id: Iecc7d68ad18e90bf84d358af92194c230efc2671
üst 32dd79ba
...@@ -91,21 +91,12 @@ public: ...@@ -91,21 +91,12 @@ public:
bool VisitVarDecl( const VarDecl* ); bool VisitVarDecl( const VarDecl* );
private: private:
StringRef getFilename(SourceLocation loc);
std::unordered_set<VarDecl const *> maVarDeclSet; std::unordered_set<VarDecl const *> maVarDeclSet;
std::unordered_set<VarDecl const *> maVarDeclToIgnoreSet; std::unordered_set<VarDecl const *> maVarDeclToIgnoreSet;
std::unordered_map<VarDecl const *, int> maVarUsesMap; std::unordered_map<VarDecl const *, int> maVarUsesMap;
std::unordered_map<VarDecl const *, SourceRange> maVarUseSourceRangeMap; std::unordered_map<VarDecl const *, SourceRange> maVarUseSourceRangeMap;
}; };
StringRef OnceVar::getFilename(SourceLocation loc)
{
SourceLocation spellingLocation = compiler.getSourceManager().getSpellingLoc(loc);
StringRef name { compiler.getSourceManager().getFilename(spellingLocation) };
return name;
}
bool OnceVar::VisitVarDecl( const VarDecl* varDecl ) bool OnceVar::VisitVarDecl( const VarDecl* varDecl )
{ {
if (ignoreLocation(varDecl)) { if (ignoreLocation(varDecl)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment