Skip to content

Commit

Permalink
[clang-format][NFC] Don't export IsCpp in Format.h
Browse files Browse the repository at this point in the history
  • Loading branch information
owenca committed Mar 17, 2024
1 parent 5a75242 commit f3c5278
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
3 changes: 0 additions & 3 deletions clang/include/clang/Format/Format.h
Original file line number Diff line number Diff line change
Expand Up @@ -5228,9 +5228,6 @@ extern const char *DefaultFormatStyle;
/// Different builds can modify the value to the preferred styles.
extern const char *DefaultFallbackStyle;

/// Whether the language is C/C++/Objective-C/Objective-C++.
extern bool IsCpp;

/// Construct a FormatStyle based on ``StyleName``.
///
/// ``StyleName`` can take several forms:
Expand Down
2 changes: 0 additions & 2 deletions clang/lib/Format/Format.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3915,8 +3915,6 @@ const char *DefaultFormatStyle = "file";

const char *DefaultFallbackStyle = "LLVM";

bool IsCpp = false;

llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
loadAndParseConfigFile(StringRef ConfigFile, llvm::vfs::FileSystem *FS,
FormatStyle *Style, bool AllowUnknownOptions) {
Expand Down
2 changes: 2 additions & 0 deletions clang/lib/Format/FormatToken.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
namespace clang {
namespace format {

bool IsCpp = false;

const char *getTokenTypeName(TokenType Type) {
static const char *const TokNames[] = {
#define TYPE(X) #X,
Expand Down
3 changes: 3 additions & 0 deletions clang/lib/Format/FormatToken.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
namespace clang {
namespace format {

/// Whether the language is C/C++/Objective-C/Objective-C++.
extern bool IsCpp;

#define LIST_TOKEN_TYPES \
TYPE(ArrayInitializerLSquare) \
TYPE(ArraySubscriptLSquare) \
Expand Down

0 comments on commit f3c5278

Please sign in to comment.