Lines Matching refs:Env

2101   ParensRemover(const Environment &Env, const FormatStyle &Style)  in ParensRemover()  argument
2102 : TokenAnalyzer(Env, Style) {} in ParensRemover()
2117 const auto &SourceMgr = Env.getSourceManager(); in removeParens()
2145 BracesInserter(const Environment &Env, const FormatStyle &Style) in BracesInserter() argument
2146 : TokenAnalyzer(Env, Style) {} in BracesInserter()
2161 const auto &SourceMgr = Env.getSourceManager(); in insertBraces()
2198 BracesRemover(const Environment &Env, const FormatStyle &Style) in BracesRemover() argument
2199 : TokenAnalyzer(Env, Style) {} in BracesRemover()
2214 const auto &SourceMgr = Env.getSourceManager(); in removeBraces()
2249 SemiRemover(const Environment &Env, const FormatStyle &Style) in SemiRemover() argument
2250 : TokenAnalyzer(Env, Style) {} in SemiRemover()
2265 const auto &SourceMgr = Env.getSourceManager(); in removeSemi()
2300 JavaScriptRequoter(const Environment &Env, const FormatStyle &Style) in JavaScriptRequoter() argument
2301 : TokenAnalyzer(Env, Style) {} in JavaScriptRequoter()
2341 Env.getSourceManager(), Start, Length, ReplacementText)); in requoteJSStringLiteral()
2388 Formatter(const Environment &Env, const FormatStyle &Style, in Formatter() argument
2390 : TokenAnalyzer(Env, Style), Status(Status) {} in Formatter()
2404 Env.getSourceManager(), Style, in analyze()
2407 Env.getSourceManager().getBufferData(Env.getFileID()), in analyze()
2411 Env.getSourceManager(), Whitespaces, Encoding, in analyze()
2415 Tokens.getKeywords(), Env.getSourceManager(), in analyze()
2420 /*FirstStartColumn=*/Env.getFirstStartColumn(), in analyze()
2421 /*NextStartColumn=*/Env.getNextStartColumn(), in analyze()
2422 /*LastStartColumn=*/Env.getLastStartColumn()); in analyze()
2530 TrailingCommaInserter(const Environment &Env, const FormatStyle &Style) in TrailingCommaInserter() argument
2531 : TokenAnalyzer(Env, Style) {} in TrailingCommaInserter()
2575 Env.getSourceManager().getSpellingColumnNumber(Start); in insertTrailingCommas()
2581 tooling::Replacement(Env.getSourceManager(), Start, 0, ","))); in insertTrailingCommas()
2591 Cleaner(const Environment &Env, const FormatStyle &Style) in Cleaner() argument
2592 : TokenAnalyzer(Env, Style), in Cleaner()
2593 DeletedTokens(FormatTokenLess(Env.getSourceManager())) {} in Cleaner()
2782 Fixes.add(tooling::Replacement(Env.getSourceManager(), SR, "")); in generateFixes()
2814 ObjCHeaderStyleGuesser(const Environment &Env, const FormatStyle &Style) in ObjCHeaderStyleGuesser() argument
2815 : TokenAnalyzer(Env, Style), IsObjC(false) {} in ObjCHeaderStyleGuesser()
2822 IsObjC = guessIsObjC(Env.getSourceManager(), AnnotatedLines, in analyze()
3611 auto Env = Environment::make(Code, FileName, Ranges, FirstStartColumn, in reformat() local
3613 if (!Env) in reformat()
3617 Formatter(*Env, Style, Status).process().first; in reformat()
3627 auto Env = Environment::make(Code, FileName, Ranges, FirstStartColumn, in reformat() local
3629 if (!Env) in reformat()
3638 Passes.emplace_back([&](const Environment &Env) { in reformat() argument
3639 return IntegerLiteralSeparatorFixer().process(Env, Expanded); in reformat()
3649 Passes.emplace_back([&, S = std::move(S)](const Environment &Env) { in reformat() argument
3650 return ParensRemover(Env, S).process(/*SkipAnnotation=*/true); in reformat()
3657 Passes.emplace_back([&, S = std::move(S)](const Environment &Env) { in reformat() argument
3658 return BracesInserter(Env, S).process(/*SkipAnnotation=*/true); in reformat()
3665 Passes.emplace_back([&, S = std::move(S)](const Environment &Env) { in reformat() argument
3666 return BracesRemover(Env, S).process(/*SkipAnnotation=*/true); in reformat()
3673 Passes.emplace_back([&, S = std::move(S)](const Environment &Env) { in reformat() argument
3674 return SemiRemover(Env, S).process(/*SkipAnnotation=*/true); in reformat()
3679 Passes.emplace_back([&](const Environment &Env) { in reformat() argument
3680 return NamespaceEndCommentsFixer(Env, Expanded).process(); in reformat()
3685 Passes.emplace_back([&](const Environment &Env) { in reformat() argument
3686 return UsingDeclarationsSorter(Env, Expanded).process(); in reformat()
3692 Passes.emplace_back([&](const Environment &Env) { in reformat() argument
3693 return DefinitionBlockSeparator(Env, Expanded).process(); in reformat()
3699 Passes.emplace_back([&](const Environment &Env) { in reformat() argument
3700 return ObjCPropertyAttributeOrderFixer(Env, Expanded).process(); in reformat()
3706 Passes.emplace_back([&](const Environment &Env) { in reformat() argument
3707 return JavaScriptRequoter(Env, Expanded).process(/*SkipAnnotation=*/true); in reformat()
3711 Passes.emplace_back([&](const Environment &Env) { in reformat() argument
3712 return Formatter(Env, Expanded, Status).process(); in reformat()
3717 Passes.emplace_back([&](const Environment &Env) { in reformat() argument
3718 return TrailingCommaInserter(Env, Expanded).process(); in reformat()
3726 std::pair<tooling::Replacements, unsigned> PassFixes = Passes[I](*Env); in reformat()
3734 Env = Environment::make( in reformat()
3738 if (!Env) in reformat()
3783 auto Env = Environment::make(Code, FileName, Ranges); in cleanup() local
3784 if (!Env) in cleanup()
3786 return Cleaner(*Env, Style).process().first; in cleanup()
3803 auto Env = Environment::make(Code, FileName, Ranges); in fixNamespaceEndComments() local
3804 if (!Env) in fixNamespaceEndComments()
3806 return NamespaceEndCommentsFixer(*Env, Style).process().first; in fixNamespaceEndComments()
3813 auto Env = Environment::make(Code, FileName, Ranges); in sortUsingDeclarations() local
3814 if (!Env) in sortUsingDeclarations()
3816 return UsingDeclarationsSorter(*Env, Style).process().first; in sortUsingDeclarations()
3907 Environment Env(Code, NonEmptyFileName, /*Ranges=*/{}); in guessLanguage() local
3908 ObjCHeaderStyleGuesser Guesser(Env, getLLVMStyle()); in guessLanguage()