clang 19.0.0git
Namespaces | Enumerations | Functions | Variables
CharInfo.h File Reference
#include "clang/Basic/LLVM.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/DataTypes.h"

Go to the source code of this file.

Namespaces

namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
 
namespace  clang::charinfo
 

Enumerations

enum  {
  clang::charinfo::CHAR_HORZ_WS = 0x0001 , clang::charinfo::CHAR_VERT_WS = 0x0002 , clang::charinfo::CHAR_SPACE = 0x0004 , clang::charinfo::CHAR_DIGIT = 0x0008 ,
  clang::charinfo::CHAR_XLETTER = 0x0010 , clang::charinfo::CHAR_UPPER = 0x0020 , clang::charinfo::CHAR_LOWER = 0x0040 , clang::charinfo::CHAR_UNDER = 0x0080 ,
  clang::charinfo::CHAR_PERIOD = 0x0100 , clang::charinfo::CHAR_RAWDEL = 0x0200 , clang::charinfo::CHAR_PUNCT = 0x0400
}
 
enum  { clang::charinfo::CHAR_XUPPER = CHAR_XLETTER | CHAR_UPPER , clang::charinfo::CHAR_XLOWER = CHAR_XLETTER | CHAR_LOWER }
 
enum class  clang::EscapeChar { clang::Single = 1 , clang::Double = 2 , clang::SingleAndDouble = static_cast<int>(Single) | static_cast<int>(Double) }
 

Functions

LLVM_READNONE bool clang::isASCII (char c)
 Returns true if a byte is an ASCII character.
 
LLVM_READNONE bool clang::isASCII (unsigned char c)
 
LLVM_READNONE bool clang::isASCII (uint32_t c)
 Returns true if a codepoint is an ASCII character.
 
LLVM_READNONE bool clang::isASCII (int64_t c)
 
LLVM_READONLY bool clang::isAsciiIdentifierStart (unsigned char c, bool AllowDollar=false)
 Returns true if this is a valid first character of a C identifier, which is [a-zA-Z_].
 
LLVM_READONLY bool clang::isAsciiIdentifierContinue (unsigned char c)
 
LLVM_READONLY bool clang::isAsciiIdentifierContinue (unsigned char c, bool AllowDollar)
 Returns true if this is a body character of a C identifier, which is [a-zA-Z0-9_].
 
LLVM_READONLY bool clang::isHorizontalWhitespace (unsigned char c)
 Returns true if this character is horizontal ASCII whitespace: ' ', '\t', '\f', '\v'.
 
LLVM_READONLY bool clang::isVerticalWhitespace (unsigned char c)
 Returns true if this character is vertical ASCII whitespace: '\n', '\r'.
 
LLVM_READONLY bool clang::isWhitespace (unsigned char c)
 Return true if this character is horizontal or vertical ASCII whitespace: ' ', '\t', '\f', '\v', '\n', '\r'.
 
LLVM_READONLY bool clang::isDigit (unsigned char c)
 Return true if this character is an ASCII digit: [0-9].
 
LLVM_READONLY bool clang::isLowercase (unsigned char c)
 Return true if this character is a lowercase ASCII letter: [a-z].
 
LLVM_READONLY bool clang::isUppercase (unsigned char c)
 Return true if this character is an uppercase ASCII letter: [A-Z].
 
LLVM_READONLY bool clang::isLetter (unsigned char c)
 Return true if this character is an ASCII letter: [a-zA-Z].
 
LLVM_READONLY bool clang::isAlphanumeric (unsigned char c)
 Return true if this character is an ASCII letter or digit: [a-zA-Z0-9].
 
LLVM_READONLY bool clang::isHexDigit (unsigned char c)
 Return true if this character is an ASCII hex digit: [0-9a-fA-F].
 
LLVM_READONLY bool clang::isPunctuation (unsigned char c)
 Return true if this character is an ASCII punctuation character.
 
LLVM_READONLY bool clang::isPrintable (unsigned char c)
 Return true if this character is an ASCII printable character; that is, a character that should take exactly one column to print in a fixed-width terminal.
 
LLVM_READONLY bool clang::isPreprocessingNumberBody (unsigned char c)
 Return true if this is the body character of a C preprocessing number, which is [a-zA-Z0-9_.
 
LLVM_READONLY bool clang::isRawStringDelimBody (unsigned char c)
 Return true if this is the body character of a C++ raw string delimiter.
 
template<EscapeChar Opt, class CharT >
LLVM_READONLY auto clang::escapeCStyle (CharT Ch) -> StringRef
 Return C-style escaped string for special characters, or an empty string if there is no such mapping.
 
LLVM_READONLY char clang::toLowercase (char c)
 Converts the given ASCII character to its lowercase equivalent.
 
LLVM_READONLY char clang::toUppercase (char c)
 Converts the given ASCII character to its uppercase equivalent.
 
LLVM_READONLY bool clang::isValidAsciiIdentifier (StringRef S, bool AllowDollar=false)
 Return true if this is a valid ASCII identifier.
 

Variables

const uint16_t clang::charinfo::InfoTable [256]