clang-tools  8.0.0
Classes | Namespaces | Functions
DurationRewriter.cpp File Reference
#include "DurationRewriter.h"
#include "clang/Tooling/FixIt.h"
#include "llvm/ADT/IndexedMap.h"
Include dependency graph for DurationRewriter.cpp:

Go to the source code of this file.

Classes

struct  clang::tidy::abseil::DurationScale2IndexFunctor
 

Namespaces

 clang
 ===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
 
 clang::tidy
 
 clang::tidy::abseil
 

Functions

static llvm::Optional< llvm::APSInt > clang::tidy::abseil::truncateIfIntegral (const FloatingLiteral &FloatLiteral)
 Returns an integer if the fractional part of a FloatingLiteral is 0. More...
 
const std::pair< llvm::StringRef, llvm::StringRef > & clang::tidy::abseil::getInverseForScale (DurationScale Scale)
 Given a Scale return the fully qualified inverse functions for it. More...
 
static llvm::Optional< std::string > clang::tidy::abseil::rewriteInverseDurationCall (const MatchFinder::MatchResult &Result, DurationScale Scale, const Expr &Node)
 If Node is a call to the inverse of Scale, return that inverse's argument, otherwise None. More...
 
llvm::StringRef clang::tidy::abseil::getFactoryForScale (DurationScale Scale)
 Returns the factory function name for a given Scale. More...
 
bool clang::tidy::abseil::IsLiteralZero (const MatchFinder::MatchResult &Result, const Expr &Node)
 Returns true if Node is a value which evaluates to a literal 0. More...
 
llvm::Optional< std::string > clang::tidy::abseil::stripFloatCast (const ast_matchers::MatchFinder::MatchResult &Result, const Expr &Node)
 Possibly strip a floating point cast expression. More...
 
llvm::Optional< std::string > clang::tidy::abseil::stripFloatLiteralFraction (const MatchFinder::MatchResult &Result, const Expr &Node)
 
std::string clang::tidy::abseil::simplifyDurationFactoryArg (const MatchFinder::MatchResult &Result, const Expr &Node)
 
llvm::Optional< DurationScale > clang::tidy::abseil::getScaleForInverse (llvm::StringRef Name)
 Given the name of an inverse Duration function (e.g., ToDoubleSeconds), return its DurationScale, or None if a match is not found. More...
 
std::string clang::tidy::abseil::rewriteExprFromNumberToDuration (const ast_matchers::MatchFinder::MatchResult &Result, DurationScale Scale, const Expr *Node)
 Assuming Node has type double or int representing a time interval of Scale, return the expression to make it a suitable Duration. More...