clang
9.0.0
|
#include "clang/AST/ASTContext.h"
#include "clang/Basic/PragmaKinds.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Parse/LoopHint.h"
#include "clang/Parse/ParseDiagnostic.h"
#include "clang/Parse/Parser.h"
#include "clang/Parse/RAIIObjectsForParser.h"
#include "clang/Sema/Scope.h"
#include "llvm/ADT/StringSwitch.h"
#include "clang/Parse/AttrSubMatchRulesParserStringSwitches.inc"
#include "clang/Basic/AttrSubMatchRulesList.inc"
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... | |
#define ATTR_MATCH_RULE | ( | Value, | |
Spelling, | |||
IsAbstract | |||
) |
|
strong |
Describes the stage at which attribute subject rule parsing was interrupted.
Definition at line 1323 of file ParsePragma.cpp.
enum OpenCLExtState : char |
Definition at line 678 of file ParsePragma.cpp.
|
static |
Definition at line 1186 of file ParsePragma.cpp.
References clang::Parser::Diag().
|
static |
Definition at line 1199 of file ParsePragma.cpp.
References clang::Parser::Diag(), clang::BalancedDelimiterTracker::expectAndConsume(), and getIdentifier().
|
static |
Definition at line 1165 of file ParsePragma.cpp.
References clang::Token::getIdentifierInfo(), clang::IdentifierInfo::getName(), and clang::Token::is().
Referenced by diagnoseUnknownAttributeSubjectSubRule(), clang::TemplateTypeParmType::getDecl(), clang::NamedDecl::getName(), clang::ObjCImplementationDecl::getName(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::NamespaceDecl::isAnonymousNamespace(), clang::ObjCCategoryDecl::IsClassExtension(), and clang::DependentTemplateName::Profile().
|
static |
Definition at line 1174 of file ParsePragma.cpp.
|
static |
Definition at line 1845 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(), i, 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::PragmaIntroducer::Loc, 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.
|
static |
Parses loop or unroll pragma hint value and fills in Info.
Definition at line 2776 of file ParsePragma.cpp.
References clang::Preprocessor::Diag(), clang::comments::tok::eof, clang::IdentifierInfo::getBuiltinID(), clang::Token::getIdentifierInfo(), clang::Preprocessor::getLangOpts(), clang::Token::getLocation(), clang::IdentifierInfo::getName(), clang::Preprocessor::getPreprocessorAllocator(), clang::Preprocessor::getSpelling(), clang::if(), clang::Token::is(), clang::Preprocessor::isMacroDefined(), clang::Token::isNot(), clang::Token::isOneOf(), clang::IdentifierInfo::isStr(), clang::Preprocessor::Lex(), clang::Token::setAnnotationEndLoc(), clang::Token::setAnnotationValue(), clang::Token::setKind(), clang::Token::setLocation(), clang::Token::startToken(), and clang::format::Tok.
Definition at line 1008 of file ParsePragma.cpp.
References clang::IdentifierLoc::create(), Diag(), clang::comments::tok::eof, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Token::getAnnotationValue(), clang::Token::getIdentifierInfo(), clang::Token::getLocation(), clang::IdentifierInfo::getName(), clang::Token::is(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Token::isNot(), clang::LoopHint::OptionLoc, clang::LoopHint::PragmaNameLoc, clang::LoopHint::Range, clang::LoopHint::StateLoc, and clang::LoopHint::ValueExpr.