clang-format: fix fallback style set to "none" not always formatting
authorAntonio Maiorano <amaiorano@gmail.com>
Fri, 20 Jan 2017 01:22:42 +0000 (01:22 +0000)
committerAntonio Maiorano <amaiorano@gmail.com>
Fri, 20 Jan 2017 01:22:42 +0000 (01:22 +0000)
commit7eb7507aeb3552400c8a1f4dc82bb2212260c0da
treec1ba9c2444db29d3053228ac84cca3e5f28335a3
parent187ffb4a8e13dafb90b7f371325065d0d648a4a1
clang-format: fix fallback style set to "none" not always formatting

This fixes clang-format not formatting if fallback-style is explicitly set to
"none", and either a config file is found or YAML is passed in without a
"BasedOnStyle". With this change, passing "none" in these cases will have no
affect, and LLVM style will be used as the base style.

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

llvm-svn: 292562
clang/lib/Format/Format.cpp
clang/test/Format/style-on-command-line.cpp
clang/unittests/Format/FormatTest.cpp