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: svn://svn.chromium.org/llvm-project/cfe/trunk/tools/clang-format@292174 0b72dbe1-c17f-4bc7-b9db-2b4152be0356
1 file changed