llvm-project/clang/lib/Frontend
Alexander Kornienko d10d790044 Allow the creation of human-friendly ASTDumper to arbitrary output stream
Summary:
`ASTPrinter` allows setting the ouput to any O-Stream, but that printer creates source-code-like syntax (and is also marked with a `FIXME`). The nice, colourful, mostly human-readable `ASTDumper` only works on the standard output, which is not feasible in case a user wants to see the AST of a file through a code navigation/comprehension tool.

This small addition of an overload solves generating a nice colourful AST block for the users of a tool I'm working on, [[ http://github.com/Ericsson/CodeCompass | CodeCompass ]], as opposed to having to duplicate the behaviour of definitions that only exist in the anonymous namespace of implementation TUs related to this module.

Reviewers: alexfh, klimek, rsmith

Reviewed By: alexfh

Subscribers: rnkovacs, dkrupp, gsd, xazax.hun, cfe-commits, #clang

Tags: #clang

Patch by Whisperity!

Differential Revision: https://reviews.llvm.org/D45096

llvm-svn: 329391
2018-04-06 13:01:12 +00:00
..
Rewrite [Edit, Rewrite] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2018-03-27 00:01:49 +00:00
ASTConsumers.cpp Allow the creation of human-friendly ASTDumper to arbitrary output stream 2018-04-06 13:01:12 +00:00
ASTMerge.cpp Teach ASTReader how to read only the Preprocessor state from an AST file, not the ASTContext state. 2017-06-29 23:23:46 +00:00
ASTUnit.cpp [vfs] Don't bail out after a missing -ivfsoverlay file 2018-03-23 17:37:27 +00:00
CMakeLists.txt Moved code hanlding precompiled preamble out of the ASTUnit. 2017-06-21 10:24:58 +00:00
CacheTokens.cpp Re-land: "[Support] Replace HashString with djbHash." 2018-02-26 15:16:42 +00:00
ChainedDiagnosticConsumer.cpp
ChainedIncludesSource.cpp Teach ASTReader how to read only the Preprocessor state from an AST file, not the ASTContext state. 2017-06-29 23:23:46 +00:00
CodeGenOptions.cpp Use an enum value instead of a string. 2018-01-18 00:20:03 +00:00
CompilerInstance.cpp [vfs] Don't bail out after a missing -ivfsoverlay file 2018-03-23 17:37:27 +00:00
CompilerInvocation.cpp CMake option to allow enabling experimental new pass manager by default 2018-04-06 00:53:00 +00:00
CreateInvocationFromCommandLine.cpp Use vfs::FileSystem in ASTUnit when creating CompilerInvocation. 2017-06-28 15:06:34 +00:00
DependencyFile.cpp Revert r316193. 2017-10-20 00:25:07 +00:00
DependencyGraph.cpp
DiagnosticRenderer.cpp [clang] Change std::sort to llvm::sort in response to r327219 2018-03-27 16:50:00 +00:00
FrontendAction.cpp Track shadow modules with a generation counter. 2018-01-05 22:13:56 +00:00
FrontendActions.cpp Allow the creation of human-friendly ASTDumper to arbitrary output stream 2018-04-06 13:01:12 +00:00
FrontendOptions.cpp [Frontend] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2018-03-26 21:45:04 +00:00
HeaderIncludeGen.cpp [Frontend] StringRefize and fix bad indentation. 2016-05-27 12:52:19 +00:00
InitHeaderSearch.cpp [Frontend] Avoid including default system header paths on Fuchsia 2018-03-02 07:19:42 +00:00
InitPreprocessor.cpp Revert 319303: Add _Float128 as alias to __float128 to enable compilations on Fedora27/glibc2 2018-01-15 21:16:25 +00:00
LangStandards.cpp Don't accept -std= values that would switch us to a different source language. 2017-04-26 23:44:33 +00:00
LayoutOverrideSource.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 19:38:18 +00:00
LogDiagnosticPrinter.cpp Replace double negation of !FileID.isInvalid() with FileID.isValid(). 2015-10-03 10:46:20 +00:00
ModuleDependencyCollector.cpp fix trivial typos; NFC 2017-07-01 08:46:43 +00:00
MultiplexConsumer.cpp Generalize "static data member instantiated" notification to cover variable templates too. 2017-12-05 01:31:47 +00:00
PCHContainerOperations.cpp Bitcode: Decouple block info block state from reader. 2016-11-08 04:17:11 +00:00
PrecompiledPreamble.cpp [vfs] Don't bail out after a missing -ivfsoverlay file 2018-03-23 17:37:27 +00:00
PrintPreprocessedOutput.cpp Calculate size of buffer instead of using a magic value. 2018-01-03 20:29:49 +00:00
SerializedDiagnosticPrinter.cpp Revert "Revert "[NFC] Refactor DiagnosticRenderer to use FullSourceLoc"" 2017-06-27 09:50:38 +00:00
SerializedDiagnosticReader.cpp [Frontend] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2018-03-26 21:45:04 +00:00
TestModuleFileExtension.cpp Fix for LLVM Bitcode API change (to use std::shared_ptr) 2017-01-04 22:36:43 +00:00
TestModuleFileExtension.h Module file extensions: pass a Sema through to the extension writer. 2015-12-08 22:43:32 +00:00
TextDiagnostic.cpp [clang] buildFixItInsertionLine should use Hints of the same FID and LineNo 2017-07-12 16:25:40 +00:00
TextDiagnosticBuffer.cpp [Frontend] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2018-03-22 00:53:26 +00:00
TextDiagnosticPrinter.cpp Revert "Revert "[NFC] Refactor DiagnosticRenderer to use FullSourceLoc"" 2017-06-27 09:50:38 +00:00
VerifyDiagnosticConsumer.cpp [Frontend] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2018-03-22 00:53:26 +00:00