Skip to content

Commit f3c5278

Browse files
committed
[clang-format][NFC] Don't export IsCpp in Format.h
1 parent 5a75242 commit f3c5278

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

clang/include/clang/Format/Format.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5228,9 +5228,6 @@ extern const char *DefaultFormatStyle;
52285228
/// Different builds can modify the value to the preferred styles.
52295229
extern const char *DefaultFallbackStyle;
52305230

5231-
/// Whether the language is C/C++/Objective-C/Objective-C++.
5232-
extern bool IsCpp;
5233-
52345231
/// Construct a FormatStyle based on ``StyleName``.
52355232
///
52365233
/// ``StyleName`` can take several forms:

clang/lib/Format/Format.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3915,8 +3915,6 @@ const char *DefaultFormatStyle = "file";
39153915

39163916
const char *DefaultFallbackStyle = "LLVM";
39173917

3918-
bool IsCpp = false;
3919-
39203918
llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
39213919
loadAndParseConfigFile(StringRef ConfigFile, llvm::vfs::FileSystem *FS,
39223920
FormatStyle *Style, bool AllowUnknownOptions) {

clang/lib/Format/FormatToken.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
namespace clang {
1919
namespace format {
2020

21+
bool IsCpp = false;
22+
2123
const char *getTokenTypeName(TokenType Type) {
2224
static const char *const TokNames[] = {
2325
#define TYPE(X) #X,

clang/lib/Format/FormatToken.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
namespace clang {
2525
namespace format {
2626

27+
/// Whether the language is C/C++/Objective-C/Objective-C++.
28+
extern bool IsCpp;
29+
2730
#define LIST_TOKEN_TYPES \
2831
TYPE(ArrayInitializerLSquare) \
2932
TYPE(ArraySubscriptLSquare) \

0 commit comments

Comments
 (0)