clang  8.0.0svn
Macros | Enumerations | Functions
ParsePragma.cpp File Reference
#include "clang/AST/ASTContext.h"
#include "clang/Basic/PragmaKinds.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Parse/ParseDiagnostic.h"
#include "clang/Parse/Parser.h"
#include "clang/Parse/RAIIObjectsForParser.h"
#include "clang/Sema/LoopHint.h"
#include "clang/Sema/Scope.h"
#include "llvm/ADT/StringSwitch.h"
#include "clang/Parse/AttrSubMatchRulesParserStringSwitches.inc"
#include "clang/Basic/AttrSubMatchRulesList.inc"
Include dependency graph for ParsePragma.cpp:

Go to the source code of this file.

Macros

#define ATTR_MATCH_RULE(Value, Spelling, IsAbstract)
 

Enumerations

enum  OpenCLExtState : char
 
enum  MissingAttributeSubjectRulesRecoveryPoint
 Describes the stage at which attribute subject rule parsing was interrupted. More...
 

Functions

static std::string PragmaLoopHintString (Token PragmaName, Token Option)
 
static StringRef getIdentifier (const Token &Tok)
 
static bool isAbstractAttrMatcherRule (attr::SubjectMatchRule Rule)
 
static void diagnoseExpectedAttributeSubjectSubRule (Parser &PRef, attr::SubjectMatchRule PrimaryRule, StringRef PrimaryRuleName, SourceLocation SubRuleLoc)
 
static void diagnoseUnknownAttributeSubjectSubRule (Parser &PRef, attr::SubjectMatchRule PrimaryRule, StringRef PrimaryRuleName, StringRef SubRuleName, SourceLocation SubRuleLoc)
 
static void ParseAlignPragma (Preprocessor &PP, Token &FirstTok, bool IsOptions)
 
static bool ParseLoopHintValue (Preprocessor &PP, Token &Tok, Token PragmaName, Token Option, bool ValueInParens, PragmaLoopHintInfo &Info)
 Parses loop or unroll pragma hint value and fills in Info. More...
 

Macro Definition Documentation

◆ ATTR_MATCH_RULE

#define ATTR_MATCH_RULE (   Value,
  Spelling,
  IsAbstract 
)
Value:
case Value: \
return IsAbstract;

Enumeration Type Documentation

◆ MissingAttributeSubjectRulesRecoveryPoint

Describes the stage at which attribute subject rule parsing was interrupted.

Definition at line 1271 of file ParsePragma.cpp.

◆ OpenCLExtState

enum OpenCLExtState : char

Definition at line 636 of file ParsePragma.cpp.

Function Documentation

◆ diagnoseExpectedAttributeSubjectSubRule()

static void diagnoseExpectedAttributeSubjectSubRule ( Parser PRef,
attr::SubjectMatchRule  PrimaryRule,
StringRef  PrimaryRuleName,
SourceLocation  SubRuleLoc 
)
static

Definition at line 1134 of file ParsePragma.cpp.

References clang::Parser::Diag().

◆ diagnoseUnknownAttributeSubjectSubRule()

static void diagnoseUnknownAttributeSubjectSubRule ( Parser PRef,
attr::SubjectMatchRule  PrimaryRule,
StringRef  PrimaryRuleName,
StringRef  SubRuleName,
SourceLocation  SubRuleLoc 
)
static

◆ getIdentifier()

static StringRef getIdentifier ( const Token Tok)
static

◆ isAbstractAttrMatcherRule()

static bool isAbstractAttrMatcherRule ( attr::SubjectMatchRule  Rule)
static

Definition at line 1122 of file ParsePragma.cpp.

◆ ParseAlignPragma()

static void ParseAlignPragma ( Preprocessor PP,
Token FirstTok,
bool  IsOptions 
)
static

Definition at line 1776 of file ParsePragma.cpp.

References Begin, clang::Preprocessor::Diag(), clang::Preprocessor::DiscardUntilEndOfDirective(), End, clang::Preprocessor::EnterToken(), clang::comments::tok::eof, clang::LangOptions::FPC_Fast, clang::LangOptions::FPC_Off, clang::LangOptions::FPC_On, clang::Token::getAnnotationValue(), clang::Preprocessor::getDiagnostics(), clang::Token::getIdentifierInfo(), clang::Token::getKind(), clang::Token::getLocation(), clang::IdentifierInfo::getName(), clang::Preprocessor::getPPCallbacks(), clang::Preprocessor::getPreprocessorAllocator(), clang::Preprocessor::getSpelling(), clang::Preprocessor::getTargetInfo(), clang::TargetInfo::getTriple(), clang::diag::Ignored, clang::Token::is(), clang::DiagnosticsEngine::isIgnored(), clang::Token::isNot(), clang::IdentifierInfo::isStr(), clang::SourceLocation::isValid(), clang::Preprocessor::Lex(), clang::Preprocessor::LexOnOffSwitch(), clang::Preprocessor::LexStringLiteral(), clang::Preprocessor::LexUnexpandedToken(), clang::None, clang::Preprocessor::parseSimpleIntegerLiteral(), clang::PCK_Compiler, clang::PCK_ExeStr, clang::PCK_Lib, clang::PCK_Linker, clang::PCK_Unknown, clang::PCK_User, clang::Sema::POAK_Mac68k, clang::Sema::POAK_Native, clang::Sema::POAK_Natural, clang::Sema::POAK_Packed, clang::Sema::POAK_Power, clang::Sema::POAK_Reset, clang::LangOptions::PPTMK_BestCase, clang::LangOptions::PPTMK_FullGeneralityMultipleInheritance, clang::LangOptions::PPTMK_FullGeneralitySingleInheritance, clang::LangOptions::PPTMK_FullGeneralityVirtualInheritance, clang::Pragma, clang::PPCallbacks::PragmaComment(), clang::PPCallbacks::PragmaDetectMismatch(), clang::PPCallbacks::PragmaOpenCLExtension(), clang::Sema::PSK_Pop, clang::Sema::PSK_Push, clang::Sema::PSK_Push_Set, clang::Sema::PSK_Reset, clang::Sema::PSK_Set, clang::Token::setAnnotationEndLoc(), clang::Token::setAnnotationValue(), clang::Token::setKind(), clang::Token::setLocation(), clang::DiagnosticsEngine::setSeverity(), clang::Token::startToken(), State, and clang::format::Tok.

◆ ParseLoopHintValue()

static bool ParseLoopHintValue ( Preprocessor PP,
Token Tok,
Token  PragmaName,
Token  Option,
bool  ValueInParens,
PragmaLoopHintInfo &  Info 
)
static

◆ PragmaLoopHintString()

static std::string PragmaLoopHintString ( Token  PragmaName,
Token  Option 
)
static