clang  16.0.0git
Functions
DependencyDirectivesScanner.cpp File Reference
#include "clang/Lex/DependencyDirectivesScanner.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Lex/LexDiagnostic.h"
#include "clang/Lex/Lexer.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringSwitch.h"
Include dependency graph for DependencyDirectivesScanner.cpp:

Go to the source code of this file.

Functions

static void skipOverSpaces (const char *&First, const char *const End)
 
static bool isRawStringLiteral (const char *First, const char *Current)
 
static void skipRawString (const char *&First, const char *const End)
 
static unsigned isEOL (const char *First, const char *const End)
 
static void skipString (const char *&First, const char *const End)
 
static unsigned skipNewline (const char *&First, const char *End)
 
static bool wasLineContinuation (const char *First, unsigned EOLLen)
 
static void skipToNewlineRaw (const char *&First, const char *const End)
 
static void skipLineComment (const char *&First, const char *const End)
 
static void skipBlockComment (const char *&First, const char *const End)
 
static bool isQuoteCppDigitSeparator (const char *const Start, const char *const Cur, const char *const End)
 
static void skipWhitespace (const char *&First, const char *const End)
 
static bool isStartOfRelevantLine (char First)
 
static void skipUTF8ByteOrderMark (const char *&First, const char *const End)
 

Detailed Description

This is the interface for scanning header and source files to get the minimum necessary preprocessor directives for evaluating includes. It reduces the source down to #define, include, #import, @import, and any conditional preprocessor logic that contains one of those.

Definition in file DependencyDirectivesScanner.cpp.

Function Documentation

◆ isEOL()

static unsigned isEOL ( const char *  First,
const char *const  End 
)
static

◆ isQuoteCppDigitSeparator()

static bool isQuoteCppDigitSeparator ( const char *const  Start,
const char *const  Cur,
const char *const  End 
)
static
Returns
True if the current single quotation mark character is a C++ 14 digit separator.

Definition at line 349 of file DependencyDirectivesScanner.cpp.

References End, clang::isAsciiIdentifierContinue(), and clang::isPreprocessingNumberBody().

◆ isRawStringLiteral()

static bool isRawStringLiteral ( const char *  First,
const char *  Current 
)
static

Definition at line 184 of file DependencyDirectivesScanner.cpp.

◆ isStartOfRelevantLine()

static bool isStartOfRelevantLine ( char  First)
static

Definition at line 694 of file DependencyDirectivesScanner.cpp.

References clang::First.

◆ skipBlockComment()

static void skipBlockComment ( const char *&  First,
const char *const  End 
)
static

Definition at line 334 of file DependencyDirectivesScanner.cpp.

References End, and clang::First.

Referenced by skipWhitespace().

◆ skipLineComment()

static void skipLineComment ( const char *&  First,
const char *const  End 
)
static

Definition at line 328 of file DependencyDirectivesScanner.cpp.

References End, clang::First, and skipToNewlineRaw().

Referenced by skipWhitespace().

◆ skipNewline()

static unsigned skipNewline ( const char *&  First,
const char *  End 
)
static

Definition at line 291 of file DependencyDirectivesScanner.cpp.

References End, clang::First, isEOL(), and clang::isVerticalWhitespace().

Referenced by skipWhitespace().

◆ skipOverSpaces()

static void skipOverSpaces ( const char *&  First,
const char *const  End 
)
static

Definition at line 179 of file DependencyDirectivesScanner.cpp.

References End, clang::First, and clang::isHorizontalWhitespace().

Referenced by skipString(), and skipWhitespace().

◆ skipRawString()

static void skipRawString ( const char *&  First,
const char *const  End 
)
static

Definition at line 209 of file DependencyDirectivesScanner.cpp.

References End, clang::First, and clang::Last.

◆ skipString()

static void skipString ( const char *&  First,
const char *const  End 
)
static

◆ skipToNewlineRaw()

static void skipToNewlineRaw ( const char *&  First,
const char *const  End 
)
static

Definition at line 305 of file DependencyDirectivesScanner.cpp.

References End, clang::First, and isEOL().

Referenced by skipLineComment().

◆ skipUTF8ByteOrderMark()

static void skipUTF8ByteOrderMark ( const char *&  First,
const char *const  End 
)
static

Definition at line 804 of file DependencyDirectivesScanner.cpp.

References End, and clang::First.

◆ skipWhitespace()

static void skipWhitespace ( const char *&  First,
const char *const  End 
)
static

◆ wasLineContinuation()

static bool wasLineContinuation ( const char *  First,
unsigned  EOLLen 
)
static

Definition at line 301 of file DependencyDirectivesScanner.cpp.

References clang::First, and int.