summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorJordan Rupprecht <rupprecht@google.com>2019-03-13 21:13:01 +0000
committerJordan Rupprecht <rupprecht@google.com>2019-03-13 21:13:01 +0000
commit55881d5def969c9e41fca87b51018d470340a888 (patch)
tree71c7eef5e2bf3d34976c97da6600c53a067f453e /clang/lib/Format/Format.cpp
parentab41ea6282a75c3ece5cef037ced75f3f7acc724 (diff)
downloadbcm5719-llvm-55881d5def969c9e41fca87b51018d470340a888.tar.gz
bcm5719-llvm-55881d5def969c9e41fca87b51018d470340a888.zip
[clang-format] Propagate inferred language to getLLVMStyle() in getPredefinedStyle()
rC355158 added an optional language parameter to getLLVMStyle(), but this parameter was not used in getPredefinedStyle(). Because unit tests directly specify the style, this codepath wasn't tested. Add an additional unit test for getStyle(). llvm-svn: 356099
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r--clang/lib/Format/Format.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index ce67b82e10b..e73bcba7951 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -961,7 +961,7 @@ FormatStyle getNoStyle() {
bool getPredefinedStyle(StringRef Name, FormatStyle::LanguageKind Language,
FormatStyle *Style) {
if (Name.equals_lower("llvm")) {
- *Style = getLLVMStyle();
+ *Style = getLLVMStyle(Language);
} else if (Name.equals_lower("chromium")) {
*Style = getChromiumStyle(Language);
} else if (Name.equals_lower("mozilla")) {
OpenPOWER on IntegriCloud