Bump version to 19.1.0git
[llvm-project.git] / clang-tools-extra / clangd / Config.cpp
blob3b9b9bf71e24d6eda3efa6af2a6c1a49babf6fbb
1 //===--- Config.cpp - User configuration of clangd behavior ---------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "Config.h"
10 #include "support/Context.h"
12 namespace clang {
13 namespace clangd {
15 Key<Config> Config::Key;
17 const Config &Config::current() {
18 if (const Config *C = Context::current().get(Key))
19 return *C;
20 static Config Default;
21 return Default;
24 } // namespace clangd
25 } // namespace clang