hanchenye-llvm-project/llvm/utils
Sam McCall 2d8242d60d [gtest] Support raw_ostream printing functions more comprehensively.
Summary:
These are functions like operator<<(raw_ostream&, Foo).

Previously these were only supported for messages. In the assertion
  EXPECT_EQ(A, B) << C;
the local modifications would explicitly try to use raw_ostream printing for C.
However A and B would look for a std::ostream printing function, and often fall
back to gtest's default "168 byte object <00 01 FE 42 ...>".

This patch pulls out the raw_ostream support into a new header under `custom/`.

I changed the mechanism: instead of a convertible stream, we wrap the printed
value in a proxy object to allow it to be sent to a std::ostream.
I think the new way is clearer.

I also changed the policy: we prefer raw_ostream printers over std::ostream
ones. This is because the fallback printers are defined using std::ostream,
while all the raw_ostream printers should be "good".

Reviewers: ilya-biryukov, chandlerc

Subscribers: llvm-commits

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

llvm-svn: 324876
2018-02-12 10:20:09 +00:00
..
FileCheck [FileCheck] - Fix possible buffer out of bounds access when parsing --check-prefix. 2018-01-16 08:09:24 +00:00
KillTheDoctor
LLVMVisualizers
Misc
PerfectShuffle
TableGen [TargetSchedule] Fix r324582. 2018-02-09 10:28:46 +00:00
Target/ARM
UpdateTestChecks [utils] Refactor utils/update_{,llc_}test_checks.py to share more code 2018-02-10 05:01:33 +00:00
bugpoint
count
crosstool
docker Fix typos of occurred and occurrence 2018-01-24 10:33:39 +00:00
emacs Fix some regular expressions in llvm-mode.el. 2018-01-29 22:56:41 +00:00
fpcmp
gdb-scripts Make the Twine pretty-printer work with GDB 7.11 2017-06-04 03:27:12 +00:00
git
git-svn [git-llvm] Handle files ignored by svn correctly 2017-12-22 21:19:13 +00:00
jedit
kate
lint
lit [lit] Pass CLANG env var to testing configuration 2018-02-09 05:28:38 +00:00
llvm-build
llvm-lit [lit] Actually do normalize the case of files in the config map. 2017-09-21 21:27:11 +00:00
not [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
release Update build_llvm_package.bat 2018-01-25 14:43:10 +00:00
sanitizers Add libstd++-4.8 exceptions to ubsan_blacklist.txt 2017-11-29 20:10:14 +00:00
testgen
textmate
unittest [gtest] Support raw_ostream printing functions more comprehensively. 2018-02-12 10:20:09 +00:00
valgrind
vim Add strictfp attribute to prevent unwanted optimizations of libm calls 2017-08-14 21:15:13 +00:00
vscode Adding VSCode syntax colorizer to utils (generated from textmate colorizer). 2017-05-09 17:13:37 +00:00
yaml-bench [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
DSAclean.py
DSAextract.py
GenLibDeps.pl
GetRepositoryPath
GetSourceVersion
LLVMBuild.txt
UpdateCMakeLists.pl
abtest.py AsmPrinter: mark the beginning and the end of a function in verbose mode 2017-05-23 21:22:16 +00:00
bisect
bisect-skip-count
bugpoint_gisel_reducer.py Add a utility to reduce GlobalISel tests 2018-01-23 19:47:10 +00:00
check-each-file
clang-parse-diagnostics-file
codegen-diff
countloc.sh
create_ladder_graph.py
extract_symbols.py
findmisopt
findoptdiff
findsym.pl
getsrcs.sh
lldbDataFormatters.py
llvm-compilers-check
llvm-gisel-cov.py [globalisel][tablegen] Generate rule coverage and use it to identify untested rules 2017-11-16 00:46:35 +00:00
llvm-native-gxx
llvm.grm
llvmdo
llvmgrep
makellvm
prepare-code-coverage-artifact.py
schedcover.py
shuffle_fuzz.py
shuffle_select_fuzz_tester.py Adding a shufflevector and select LLVM IR instructions fuzz tool 2017-10-31 11:39:31 +00:00
sort_includes.py
update_llc_test_checks.py [utils] Refactor utils/update_{,llc_}test_checks.py to share more code 2018-02-10 05:01:33 +00:00
update_mir_test_checks.py update_mir_test_checks: Accept "." in function names 2018-01-26 22:56:31 +00:00
update_test_checks.py [utils] Refactor utils/update_{,llc_}test_checks.py to share more code 2018-02-10 05:01:33 +00:00
wciia.py