clang API Documentation

Classes | Functions
PPDirectives.cpp File Reference

Implements # directive processing for the Preprocessor. More...

#include "clang/Lex/Preprocessor.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/CodeCompletionHandler.h"
#include "clang/Lex/HeaderSearch.h"
#include "clang/Lex/HeaderSearchOptions.h"
#include "clang/Lex/LexDiagnostic.h"
#include "clang/Lex/LiteralSupport.h"
#include "clang/Lex/MacroInfo.h"
#include "clang/Lex/ModuleLoader.h"
#include "clang/Lex/Pragma.h"
#include "llvm/ADT/APInt.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/SaveAndRestore.h"
Include dependency graph for PPDirectives.cpp:

Go to the source code of this file.

Classes

class  clang::Preprocessor::ResetMacroExpansionHelper

Functions

static bool GetLineValue (Token &DigitTok, unsigned &Val, unsigned DiagID, Preprocessor &PP, bool IsGNULineDirective=false)
static bool ReadLineMarkerFlags (bool &IsFileEntry, bool &IsFileExit, bool &IsSystemHeader, bool &IsExternCHeader, Preprocessor &PP)
static void EnterAnnotationToken (Preprocessor &PP, SourceLocation Begin, SourceLocation End, tok::TokenKind Kind, void *AnnotationVal)
 Push a token onto the token stream containing an annotation.

Detailed Description

Implements # directive processing for the Preprocessor.

Definition in file PPDirectives.cpp.


Function Documentation

static void EnterAnnotationToken ( Preprocessor PP,
SourceLocation  Begin,
SourceLocation  End,
tok::TokenKind  Kind,
void *  AnnotationVal 
) [static]
static bool GetLineValue ( Token DigitTok,
unsigned Val,
unsigned  DiagID,
Preprocessor PP,
bool  IsGNULineDirective = false 
) [static]

GetLineValue - Convert a numeric token into an unsigned value, emitting Diagnostic DiagID if it is invalid, and returning the value in Val.

Definition at line 858 of file PPDirectives.cpp.

References clang::Preprocessor::AdvanceToTokenCharacter(), clang::Preprocessor::Diag(), clang::Preprocessor::DiscardUntilEndOfDirective(), clang::Token::getLength(), clang::Token::getLocation(), clang::Preprocessor::getSpelling(), clang::isDigit(), and clang::Token::isNot().

Referenced by ReadLineMarkerFlags().

static bool ReadLineMarkerFlags ( bool IsFileEntry,
bool IsFileExit,
bool IsSystemHeader,
bool IsExternCHeader,
Preprocessor PP 
) [static]