clang 22.0.0git
TokenConcatenation.cpp File Reference
#include "clang/Lex/TokenConcatenation.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Lex/Preprocessor.h"
#include "llvm/Support/ErrorHandling.h"

Go to the source code of this file.

Functions

static bool IsStringPrefix (StringRef Str, bool CPlusPlus11)
 IsStringPrefix - Return true if Str is a string prefix.
static char GetFirstChar (const Preprocessor &PP, const Token &Tok)
 GetFirstChar - Get the first character of the token.

Function Documentation

◆ GetFirstChar()

char GetFirstChar ( const Preprocessor & PP,
const Token & Tok )
static

GetFirstChar - Get the first character of the token.

  • Tok, avoiding calls to getSpelling where possible.

Definition at line 128 of file TokenConcatenation.cpp.

References clang::Preprocessor::getSourceManager(), clang::Preprocessor::getSpelling(), SM, and Tok.

Referenced by clang::TokenConcatenation::AvoidConcat().

◆ IsStringPrefix()

bool IsStringPrefix ( StringRef Str,
bool CPlusPlus11 )
static

IsStringPrefix - Return true if Str is a string prefix.

'L', 'u', 'U', or 'u8'. Including raw versions.

Definition at line 22 of file TokenConcatenation.cpp.

References clang::CPlusPlus11.