Searched refs:Tok (Results 1 - 25 of 122) sorted by relevance

12345

/netbsd-current/external/apache2/llvm/dist/clang/lib/Parse/
H A DParsePragma.cpp107 Token &Tok) override {
108 Token PragmaName = Tok;
110 PP.Diag(Tok.getLocation(), diag::warn_pragma_fp_ignored)
122 Toks[0].setLocation(Tok.getLocation());
123 Toks[0].setAnnotationEndLoc(Tok.getLocation());
136 Token &Tok) override {
147 Token &Tok) override;
560 assert(Tok.is(tok::annot_pragma_unused));
562 Actions.ActOnPragmaUnused(Tok, getCurScope(), UnusedLoc);
567 assert(Tok
1313 getIdentifier(const Token &Tok) argument
1480 getAttributeSubjectRulesRecoveryPointForToken(const Token &Tok) argument
1735 Token Tok; local
1796 Token Tok; local
1911 Token Tok; local
1953 Token Tok; local
2003 Token Tok; local
2101 Token Tok; local
2181 Token Tok; local
2242 Token Tok; local
2281 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
2300 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
2386 Token Tok; local
2427 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
2525 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
2611 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
2651 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
2779 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
2835 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
2919 Token Tok; local
2964 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
3080 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
3154 ParseLoopHintValue(Preprocessor &PP, Token &Tok, Token PragmaName, Token Option, bool ValueInParens, PragmaLoopHintInfo &Info) argument
3244 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
3338 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
3404 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
3443 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
3496 HandlePragma( Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
3550 Token Tok; local
3666 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
3698 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
[all...]
H A DParseTemplate.cpp42 if (Tok.is(tok::kw_template) && NextToken().isNot(tok::less)) {
77 assert(Tok.isOneOf(tok::kw_export, tok::kw_template) &&
121 Diag(Tok.getLocation(), diag::err_expected_template);
160 } while (Tok.isOneOf(tok::kw_export, tok::kw_template));
163 if (Tok.is(tok::kw_concept))
192 if (Tok.is(tok::kw_static_assert)) {
194 Diag(Tok.getLocation(), diag::err_templated_invalid_declaration)
210 if (Tok.is(tok::kw_using)) {
225 if (Tok.is(tok::semi)) {
256 if (Tok
[all...]
H A DParseInit.cpp29 switch (Tok.getKind()) {
103 return Tok.is(tok::equal);
167 if (Tok.is(tok::identifier)) {
168 const IdentifierInfo *FieldName = Tok.getIdentifierInfo();
176 assert(Tok.is(tok::colon) && "MayBeDesignationStart not working properly!");
186 Tok.getLocation(), DesignatorCompletion.PreferredBaseType, D);
197 while (Tok.is(tok::period) || Tok.is(tok::l_square)) {
198 if (Tok.is(tok::period)) {
202 if (Tok
[all...]
H A DParseCXXInlineMethods.cpp29 assert(Tok.isOneOf(tok::l_brace, tok::colon, tok::kw_try, tok::equal) &&
65 SourceLocation KWEndLoc = Tok.getEndLoc().getLocWithOffset(-1);
89 if (Tok.is(tok::comma)) {
138 tok::TokenKind kind = Tok.getKind();
158 while (Tok.is(tok::kw_catch)) {
185 assert(Tok.isOneOf(tok::l_brace, tok::equal) &&
193 tok::TokenKind kind = Tok.getKind();
195 Toks.push_back(Tok);
201 Toks.push_back(Tok);
216 Eof.setLocation(Tok
[all...]
H A DParseTentative.cpp50 switch (Tok.getKind()) {
155 switch (Tok.getKind()) {
166 if (Tok.isNot(tok::l_paren))
194 if (Tok.is(tok::annot_cxxscope))
196 if (Tok.is(tok::identifier))
198 else if (Tok.is(tok::annot_template_id))
210 if (getLangOpts().ObjC && Tok.is(tok::less))
233 if (Tok.isNot(tok::l_paren)) {
246 if (Tok.isNot(tok::semi) && (!AllowForRangeDecl || Tok
[all...]
H A DParser.cpp57 Tok.startToken();
58 Tok.setKind(tok::eof);
77 DiagnosticBuilder Parser::Diag(const Token &Tok, unsigned DiagID) { argument
78 return Diag(Tok.getLocation(), DiagID);
102 static bool IsCommonTypo(tok::TokenKind ExpectedTok, const Token &Tok) { argument
105 return Tok.is(tok::colon) || Tok.is(tok::comma); // : or , for ;
112 if (Tok.is(ExpectedTok) || Tok.is(tok::code_completion)) {
118 if (IsCommonTypo(ExpectedTok, Tok)) {
[all...]
H A DParseOpenMP.cpp182 Token Tok = P.getCurToken(); local
184 Tok.isAnnotation()
186 : getOpenMPDirectiveKindEx(P.getPreprocessor().getSpelling(Tok));
194 Tok = P.getPreprocessor().LookAhead(0);
196 Tok.isAnnotation()
198 : getOpenMPDirectiveKindEx(P.getPreprocessor().getSpelling(Tok));
213 Token Tok = P.getCurToken(); local
218 if (Tok.is(tok::kw_operator)) {
220 Tok = P.getCurToken();
223 switch (Tok
708 const Token &Tok = P.getCurToken(); local
829 getNameFromIdOrString(Parser &P, Token &Tok, OMPContextLvl Lvl) argument
1643 const Token &Tok = P.getCurToken(); local
3499 Token Tok = P.getCurToken(); local
3583 Token Tok = P.getCurToken(); local
3598 Token Tok = P.getCurToken(); local
[all...]
H A DParseDeclCXX.cpp61 assert(Tok.is(tok::kw_namespace) && "Not a namespace!");
65 if (Tok.is(tok::code_completion)) {
79 Diag(Tok.getLocation(), getLangOpts().CPlusPlus17
83 attrLoc = Tok.getLocation();
87 if (Tok.is(tok::identifier)) {
88 Ident = Tok.getIdentifierInfo();
90 while (Tok.is(tok::coloncolon) &&
98 if (Tok.is(tok::kw_inline)) {
104 Info.Ident = Tok.getIdentifierInfo();
116 if (Tok
1536 PreserveAtomicIdentifierInfoRAII(Token &Tok, bool Enabled) argument
[all...]
H A DParseObjc.cpp30 if (Tok.is(tok::kw___attribute)) {
32 Diag(Tok, diag::err_objc_postfix_attribute_hint)
35 Diag(Tok, diag::err_objc_postfix_attribute);
52 if (Tok.is(tok::code_completion)) {
59 switch (Tok.getObjCKeywordID()) {
143 ClassNames.push_back(Tok.getIdentifierInfo());
144 ClassLocs.push_back(Tok.getLocation());
149 if (Tok.is(tok::less))
215 assert(Tok.isObjCAtKeyword(tok::objc_interface) &&
221 if (Tok
[all...]
/netbsd-current/external/apache2/llvm/dist/clang/include/clang/AST/
H A DCommentBriefParser.h35 Token Tok; member in class:clang::comments::BriefParser
38 SourceLocation Loc = Tok.getLocation();
39 L.lex(Tok);
H A DCommentParser.h55 Token Tok; member in class:clang::comments::Parser
62 L.lex(Tok);
64 Tok = MoreLATokens.pop_back_val();
68 MoreLATokens.push_back(Tok);
69 Tok = OldTok;
76 MoreLATokens.push_back(Tok);
79 Tok = Toks[0];
83 return (Tok.is(tok::backslash_command) || Tok.is(tok::at_command)) &&
84 Traits.getCommandInfo(Tok
[all...]
/netbsd-current/external/apache2/llvm/dist/clang/lib/Lex/
H A DPragma.cpp107 PragmaIntroducer Introducer, Token &Tok) {
110 PP.LexUnexpandedToken(Tok);
114 = FindHandler(Tok.getIdentifierInfo() ? Tok.getIdentifierInfo()->getName()
118 PP.Diag(Tok, diag::warn_pragma_ignored);
123 Handler->HandlePragma(PP, Introducer, Tok);
138 Token &Tok; member in struct:__anon704::TokenCollector
142 Tokens.push_back(Tok);
143 Self.Lex(Tok);
153 Toks[Tokens.size() - 1] = Tok;
106 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
176 Token Tok; local
188 Handle_Pragma(Token &Tok) argument
422 Token Tok; local
552 ParsePragmaPushOrPopMacro(Token &Tok) argument
665 HandlePragmaIncludeAlias(Token &Tok) argument
750 LexModuleNameComponent( Preprocessor &PP, Token &Tok, std::pair<IdentifierInfo *, SourceLocation> &ModuleNameComponent, bool First) argument
771 LexModuleName( Preprocessor &PP, Token &Tok, llvm::SmallVectorImpl<std::pair<IdentifierInfo *, SourceLocation>> &ModuleName) argument
787 HandlePragmaModuleBuild(Token &Tok) argument
861 HandlePragmaHdrstop(Token &Tok) argument
949 Token Tok; local
1035 Token Tok; local
1187 Token Tok; local
1232 Token Tok; local
1782 Token Tok; local
1837 Token Tok; local
[all...]
H A DPPMacroExpansion.cpp541 Callbacks->MacroExpands(Info.Tok, Info.MD, Info.Range,
769 Token Tok; local
773 LexUnexpandedToken(Tok);
774 assert(Tok.is(tok::l_paren) && "Error computing l-paren-ness?");
786 while (Tok.isNot(tok::r_paren)) {
787 if (ContainsCodeCompletionTok && Tok.isOneOf(tok::eof, tok::eod))
790 assert(Tok.isOneOf(tok::l_paren, tok::comma) &&
794 SourceLocation ArgStartLoc = Tok.getLocation();
803 LexUnexpandedToken(Tok);
805 if (Tok
[all...]
H A DTokenConcatenation.cpp47 bool TokenConcatenation::IsIdentifierStringPrefix(const Token &Tok) const {
50 if (!Tok.needsCleaning()) {
51 if (Tok.getLength() < 1 || Tok.getLength() > 3)
54 const char *Ptr = SM.getCharacterData(SM.getSpellingLoc(Tok.getLocation()));
55 return IsStringPrefix(StringRef(Ptr, Tok.getLength()),
59 if (Tok.getLength() < 256) {
62 unsigned length = PP.getSpelling(Tok, TokPtr);
66 return IsStringPrefix(StringRef(PP.getSpelling(Tok)), LangOpts.CPlusPlus11);
126 /// GetFirstChar - Get the first character of the token \arg Tok,
128 GetFirstChar(const Preprocessor &PP, const Token &Tok) argument
[all...]
H A DMacroArgs.cpp187 Token &Tok = Result.back();
188 PP.Lex(Tok);
212 Token Tok;
213 Tok.startToken();
214 Tok.setKind(Charify ? tok::char_constant : tok::string_literal);
224 const Token &Tok = *ArgToks;
225 if (!isFirst && (Tok.hasLeadingSpace() || Tok.isAtStartOfLine()))
231 if (tok::isStringLiteral(Tok.getKind()) || // "foo", u8R"x(foo)x"_bar, etc.
232 Tok
[all...]
/netbsd-current/external/apache2/llvm/dist/llvm/lib/Object/
H A DCOFFModuleDefinition.cpp155 } while (Tok.K != Eof);
162 Tok = Lex.lex();
165 Tok = Stack.back();
171 if (Tok.K != Identifier || Tok.Value.getAsInteger(10, *I))
178 if (Tok.K != Expected)
183 void unget() { Stack.push_back(Tok); }
187 switch (Tok.K) {
193 if (Tok.K != Identifier) {
206 bool IsDll = Tok
354 Token Tok; member in class:llvm::object::Parser
[all...]
/netbsd-current/external/apache2/llvm/dist/clang/lib/AST/
H A DCommentParser.cpp59 const Token &Tok = Toks[Pos.CurToken]; local
61 Pos.BufferStart = Tok.getText().begin();
62 Pos.BufferEnd = Tok.getText().end();
64 Pos.BufferStartLoc = Tok.getLocation();
99 if (P.Tok.is(tok::newline)) {
101 Token Newline = P.Tok;
103 if (P.Tok.isNot(tok::text)) {
109 if (P.Tok.isNot(tok::text)) {
114 Toks.push_back(P.Tok);
153 bool lexWord(Token &Tok) { argument
186 lexDelimitedSeq(Token &Tok, char OpenDelim, char CloseDelim) argument
[all...]
H A DCommentBriefParser.cpp69 while (Tok.isNot(tok::eof)) {
70 if (Tok.is(tok::text)) {
72 FirstParagraphOrBrief += Tok.getText();
74 ReturnsParagraph += Tok.getText();
79 if (Tok.is(tok::backslash_command) || Tok.is(tok::at_command)) {
80 const CommandInfo *Info = Traits.getCommandInfo(Tok.getCommandID());
104 if (Tok.is(tok::newline)) {
116 if (Tok.is(tok::text)) {
117 if (isWhitespace(Tok
[all...]
/netbsd-current/external/apache2/llvm/dist/clang/lib/Tooling/Inclusions/
H A DHeaderIncludes.cpp48 Token Tok; local
50 Lex.LexFromRawLexer(Tok);
51 return GetOffsetAfterSequence(SM, Lex, Tok);
55 // \p Tok will be the token after this directive; otherwise, it can be any token
56 // after the given \p Tok (including \p Tok). If \p RawIDName is provided, the
59 Lexer &Lex, StringRef Name, Token &Tok,
61 bool Matched = Tok.is(tok::hash) && !Lex.LexFromRawLexer(Tok) &&
62 Tok
58 checkAndConsumeDirectiveWithName( Lexer &Lex, StringRef Name, Token &Tok, llvm::Optional<StringRef> RawIDName = llvm::None) argument
71 skipComments(Lexer &Lex, Token &Tok) argument
124 checkAndConsumeInclusiveDirective(Lexer &Lex, Token &Tok) argument
[all...]
/netbsd-current/external/apache2/llvm/dist/clang/lib/Format/
H A DUsingDeclarationsSorter.cpp90 const FormatToken *Tok = UsingTok->Next; local
91 if (Tok && Tok->is(tok::kw_typename)) {
93 Tok = Tok->Next;
95 if (Tok && Tok->is(tok::coloncolon)) {
97 Tok = Tok->Next;
100 while (Tok
[all...]
H A DNamespaceEndCommentsFixer.cpp32 const FormatToken *Tok = NamespaceTok->getNextNonComment(); local
36 assert(Tok && Tok->is(tok::l_paren) && "expected an opening parenthesis");
37 Tok = Tok->getNextNonComment();
38 while (Tok && !Tok->isOneOf(tok::r_paren, tok::comma)) {
39 name += Tok->TokenText;
40 Tok = Tok
[all...]
/netbsd-current/external/apache2/llvm/dist/clang/include/clang/Lex/
H A DTokenConcatenation.h62 const Token &Tok) const;
67 bool IsIdentifierStringPrefix(const Token &Tok) const;
/netbsd-current/external/apache2/llvm/dist/clang/lib/Rewrite/
H A DTokenRewriter.cpp42 if (Tok.is(tok::raw_identifier)) {
45 PP.LookUpIdentifierInfo(Tok);
88 Token Tok; local
89 Tok.startToken();
91 Tok.setLocation(ScratchBuf->getToken(Val, Len, Spelling));
92 Tok.setLength(Len);
96 Tok.setKind(tok::unknown);
98 return AddToken(Tok, RemapIterator(I));
H A DHTMLRewrite.cpp458 Token Tok;
459 L.LexFromRawLexer(Tok);
461 while (Tok.isNot(tok::eof)) {
464 unsigned TokOffs = SM.getFileOffset(Tok.getLocation());
465 unsigned TokLen = Tok.getLength();
466 switch (Tok.getKind()) {
473 PP.LookUpIdentifierInfo(Tok);
476 if (Tok.isNot(tok::identifier))
505 if (!Tok.isAtStartOfLine())
511 L.LexFromRawLexer(Tok);
[all...]
/netbsd-current/external/apache2/llvm/dist/clang/lib/Tooling/Transformer/
H A DSourceCode.cpp44 Token Tok;
46 Lexer::getRawToken(R.getEnd(), Tok, Context.getSourceManager(),
48 if (Err || !Tok.is(Next))
50 return CharSourceRange::getTokenRange(Range.getBegin(), Tok.getLocation());
104 static bool startsWithNewline(const SourceManager &SM, const Token &Tok) { argument
105 return isVerticalWhitespace(SM.getCharacterData(Tok.getLocation())[0]);
109 const Token &Tok) {
110 return Terminators.count(Tok.getKind()) > 0;
154 Token Tok; local
178 Lexer->LexFromRawLexer(Tok);
108 contains(const std::set<tok::TokenKind> &Terminators, const Token &Tok) argument
301 Token Tok; local
[all...]

Completed in 406 milliseconds

12345