]> granicus.if.org Git - clang/commit
clang-format: Make GetStyle return Expected<FormatStyle> instead of FormatStyle
authorAntonio Maiorano <amaiorano@gmail.com>
Tue, 17 Jan 2017 00:12:27 +0000 (00:12 +0000)
committerAntonio Maiorano <amaiorano@gmail.com>
Tue, 17 Jan 2017 00:12:27 +0000 (00:12 +0000)
commit9163a050930210e6d63abaed418fd89e3c53b827
tree99f9d471798403d09f512c4dbfdabdf1704b4294
parent115251d60ba426e6891d88f5c68e15f96e2e644e
clang-format: Make GetStyle return Expected<FormatStyle> instead of FormatStyle

Change the contract of GetStyle so that it returns an error when an error occurs
(i.e. when it writes to stderr), and only returns the fallback style when it
can't find a configuration file.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292174 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Format/Format.h
lib/Format/Format.cpp
lib/Tooling/Refactoring.cpp
test/Format/style-on-command-line.cpp
tools/clang-format/ClangFormat.cpp
unittests/Format/FormatTest.cpp
unittests/Format/FormatTestObjC.cpp