clang  6.0.0svn
Public Member Functions | List of all members
clang::CharLiteralParser Class Reference

CharLiteralParser - Perform interpretation and semantic analysis of a character literal. More...

#include "clang/Lex/LiteralSupport.h"

Public Member Functions

 CharLiteralParser (const char *begin, const char *end, SourceLocation Loc, Preprocessor &PP, tok::TokenKind kind)
 
bool hadError () const
 
bool isAscii () const
 
bool isWide () const
 
bool isUTF8 () const
 
bool isUTF16 () const
 
bool isUTF32 () const
 
bool isMultiChar () const
 
uint64_t getValue () const
 
StringRef getUDSuffix () const
 
unsigned getUDSuffixOffset () const
 

Detailed Description

CharLiteralParser - Perform interpretation and semantic analysis of a character literal.

Definition at line 165 of file LiteralSupport.h.

Constructor & Destructor Documentation

◆ CharLiteralParser()

CharLiteralParser::CharLiteralParser ( const char *  begin,
const char *  end,
SourceLocation  Loc,
Preprocessor PP,
tok::TokenKind  kind 
)
///       user-defined-character-literal: [C++11 lex.ext]
///         character-literal ud-suffix
///       ud-suffix:
///         identifier
///       character-literal: [C++11 lex.ccon]
///         ' c-char-sequence '
///         u' c-char-sequence '
///         U' c-char-sequence '
///         L' c-char-sequence '
///         u8' c-char-sequence ' [C++1z lex.ccon]
///       c-char-sequence:
///         c-char
///         c-char-sequence c-char
///       c-char:
///         any member of the source character set except the single-quote ',
///           backslash \, or new-line character
///         escape-sequence
///         universal-character-name
///       escape-sequence:
///         simple-escape-sequence
///         octal-escape-sequence
///         hexadecimal-escape-sequence
///       simple-escape-sequence:
///         one of \' \" \? \\ \a \b \f \n \r \t \v
///       octal-escape-sequence:
///         \ octal-digit
///         \ octal-digit octal-digit
///         \ octal-digit octal-digit octal-digit
///       hexadecimal-escape-sequence:
///         \x hexadecimal-digit
///         hexadecimal-escape-sequence hexadecimal-digit
///       universal-character-name: [C++11 lex.charset]
///         \u hex-quad
///         \U hex-quad hex-quad
///       hex-quad:
///         hex-digit hex-digit hex-digit hex-digit
/// 

Definition at line 1048 of file LiteralSupport.cpp.

References clang::Preprocessor::Diag(), clang::expandUCNs(), getCharWidth(), clang::TargetInfo::getCharWidth(), clang::Preprocessor::getDiagnostics(), clang::TargetInfo::getIntWidth(), clang::Preprocessor::getLangOpts(), clang::Preprocessor::getSourceManager(), clang::Preprocessor::getTargetInfo(), clang::TargetInfo::getWCharWidth(), ProcessCharEscape(), ProcessUCNEscape(), and clang::StringLiteralParser::StringLiteralParser().

Member Function Documentation

◆ getUDSuffix()

StringRef clang::CharLiteralParser::getUDSuffix ( ) const
inline

Definition at line 185 of file LiteralSupport.h.

◆ getUDSuffixOffset()

unsigned clang::CharLiteralParser::getUDSuffixOffset ( ) const
inline

Definition at line 186 of file LiteralSupport.h.

◆ getValue()

uint64_t clang::CharLiteralParser::getValue ( ) const
inline

Definition at line 184 of file LiteralSupport.h.

◆ hadError()

bool clang::CharLiteralParser::hadError ( ) const
inline

Definition at line 177 of file LiteralSupport.h.

◆ isAscii()

bool clang::CharLiteralParser::isAscii ( ) const
inline

Definition at line 178 of file LiteralSupport.h.

◆ isMultiChar()

bool clang::CharLiteralParser::isMultiChar ( ) const
inline

Definition at line 183 of file LiteralSupport.h.

◆ isUTF16()

bool clang::CharLiteralParser::isUTF16 ( ) const
inline

Definition at line 181 of file LiteralSupport.h.

◆ isUTF32()

bool clang::CharLiteralParser::isUTF32 ( ) const
inline

Definition at line 182 of file LiteralSupport.h.

◆ isUTF8()

bool clang::CharLiteralParser::isUTF8 ( ) const
inline

Definition at line 180 of file LiteralSupport.h.

◆ isWide()

bool clang::CharLiteralParser::isWide ( ) const
inline

Definition at line 179 of file LiteralSupport.h.


The documentation for this class was generated from the following files: