clang API Documentation
#include "clang/Lex/TokenLexer.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/LexDiagnostic.h"
#include "clang/Lex/MacroArgs.h"
#include "clang/Lex/MacroInfo.h"
#include "clang/Lex/Preprocessor.h"
#include "llvm/ADT/SmallString.h"
Go to the source code of this file.
Functions | |
static void | updateConsecutiveMacroArgTokens (SourceManager &SM, SourceLocation InstLoc, Token *&begin_tokens, Token *end_tokens) |
Finds the tokens that are consecutive (from the same FileID) creates a single SLocEntry, and assigns SourceLocations to each token that point to that SLocEntry. e.g for assert(foo == bar); There will be a single SLocEntry for the "foo == bar" chunk and locations for the 'foo', '==', 'bar' tokens will point inside that chunk. |
static void updateConsecutiveMacroArgTokens | ( | SourceManager & | SM, |
SourceLocation | InstLoc, | ||
Token *& | begin_tokens, | ||
Token * | end_tokens | ||
) | [static] |
Finds the tokens that are consecutive (from the same FileID) creates a single SLocEntry, and assigns SourceLocations to each token that point to that SLocEntry. e.g for assert(foo == bar); There will be a single SLocEntry for the "foo == bar" chunk and locations for the 'foo', '==', 'bar' tokens will point inside that chunk.
Definition at line 739 of file TokenLexer.cpp.
References clang::SourceManager::createMacroArgExpansionLoc(), clang::Token::getLength(), clang::Token::getLocation(), clang::SourceLocation::getLocWithOffset(), clang::SourceLocation::isFileID(), clang::SourceManager::isInSameSLocAddrSpace(), and clang::Token::setLocation().