clang  6.0.0svn
Macros | Functions
Preprocessor.cpp File Reference
#include "clang/Lex/Preprocessor.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/FileSystemStatCache.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/Module.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Lex/CodeCompletionHandler.h"
#include "clang/Lex/ExternalPreprocessorSource.h"
#include "clang/Lex/HeaderSearch.h"
#include "clang/Lex/LexDiagnostic.h"
#include "clang/Lex/Lexer.h"
#include "clang/Lex/LiteralSupport.h"
#include "clang/Lex/MacroArgs.h"
#include "clang/Lex/MacroInfo.h"
#include "clang/Lex/ModuleLoader.h"
#include "clang/Lex/PTHLexer.h"
#include "clang/Lex/PTHManager.h"
#include "clang/Lex/Pragma.h"
#include "clang/Lex/PreprocessingRecord.h"
#include "clang/Lex/PreprocessorLexer.h"
#include "clang/Lex/PreprocessorOptions.h"
#include "clang/Lex/ScratchBuffer.h"
#include "clang/Lex/Token.h"
#include "clang/Lex/TokenLexer.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/Capacity.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "clang/Basic/TokenKinds.def"
Include dependency graph for Preprocessor.cpp:

Go to the source code of this file.

Macros

#define CXX11_KEYWORD(NAME, FLAGS)   .Case(#NAME, diag::warn_cxx11_keyword)
 
#define CXX2A_KEYWORD(NAME, FLAGS)   .Case(#NAME, diag::warn_cxx2a_keyword)
 

Functions

static bool MacroDefinitionEquals (const MacroInfo *MI, ArrayRef< TokenValue > Tokens)
 Compares macro tokens with a specified token value sequence. More...
 
static diag::kind getFutureCompatDiagKind (const IdentifierInfo &II, const LangOptions &LangOpts)
 Returns a diagnostic message kind for reporting a future keyword as appropriate for the identifier and specified language. More...
 

Macro Definition Documentation

◆ CXX11_KEYWORD

#define CXX11_KEYWORD (   NAME,
  FLAGS 
)    .Case(#NAME, diag::warn_cxx11_keyword)

Referenced by getFutureCompatDiagKind().

◆ CXX2A_KEYWORD

#define CXX2A_KEYWORD (   NAME,
  FLAGS 
)    .Case(#NAME, diag::warn_cxx2a_keyword)

Function Documentation

◆ getFutureCompatDiagKind()

static diag::kind getFutureCompatDiagKind ( const IdentifierInfo II,
const LangOptions LangOpts 
)
static

Returns a diagnostic message kind for reporting a future keyword as appropriate for the identifier and specified language.

Definition at line 630 of file Preprocessor.cpp.

References CXX11_KEYWORD, clang::Preprocessor::getExternalSource(), clang::IdentifierInfo::getName(), clang::IdentifierInfo::isFutureCompatKeyword(), clang::IdentifierInfo::isOutOfDate(), and clang::ExternalPreprocessorSource::updateOutOfDateIdentifier().

Referenced by clang::Preprocessor::HandleIdentifier().

◆ MacroDefinitionEquals()

static bool MacroDefinitionEquals ( const MacroInfo MI,
ArrayRef< TokenValue Tokens 
)
static

Compares macro tokens with a specified token value sequence.

Definition at line 332 of file Preprocessor.cpp.