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

12345

/freebsd-13-stable/contrib/llvm-project/clang/lib/Parse/
H A DParsePragma.cpp105 Token &Tok) override {
110 PP.Diag(Tok, diag::warn_stdc_fenv_access_not_supported);
118 Toks[0].setLocation(Tok.getLocation());
119 Toks[0].setAnnotationEndLoc(Tok.getLocation());
132 Token &Tok) override {
534 assert(Tok.is(tok::annot_pragma_unused));
536 Actions.ActOnPragmaUnused(Tok, getCurScope(), UnusedLoc);
541 assert(Tok.is(tok::annot_pragma_vis));
543 static_cast<IdentifierInfo *>(Tok.getAnnotationValue());
557 assert(Tok
1213 getIdentifier(const Token &Tok) argument
1380 getAttributeSubjectRulesRecoveryPointForToken(const Token &Tok) argument
1635 Token Tok; local
1696 Token Tok; local
1808 Token Tok; local
1850 Token Tok; local
1899 Token Tok; local
1984 Token Tok; local
2064 Token Tok; local
2125 Token Tok; local
2164 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
2183 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
2269 Token Tok; local
2310 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
2408 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
2494 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
2533 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
2655 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
2711 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
2795 Token Tok; local
2839 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
2959 ParseLoopHintValue(Preprocessor &PP, Token &Tok, Token PragmaName, Token Option, bool ValueInParens, PragmaLoopHintInfo &Info) argument
3048 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
3142 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
3208 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
3247 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
3300 HandlePragma( Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
3354 Token Tok; local
3469 HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) argument
3501 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);
161 } while (Tok.isOneOf(tok::kw_export, tok::kw_template));
164 if (Tok.is(tok::kw_concept))
193 if (Tok.is(tok::kw_static_assert)) {
195 Diag(Tok.getLocation(), diag::err_templated_invalid_declaration)
211 if (Tok.is(tok::kw_using)) {
226 if (Tok.is(tok::semi)) {
257 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 DParseInit.cpp29 switch (Tok.getKind()) {
103 return Tok.is(tok::equal);
168 if (Tok.is(tok::identifier)) {
169 const IdentifierInfo *FieldName = Tok.getIdentifierInfo();
177 assert(Tok.is(tok::colon) && "MayBeDesignationStart not working properly!");
196 while (Tok.is(tok::period) || Tok.is(tok::l_square)) {
197 if (Tok.is(tok::period)) {
201 if (Tok.is(tok::code_completion)) {
206 if (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.cpp172 Token Tok = P.getCurToken(); local
174 Tok.isAnnotation()
176 : getOpenMPDirectiveKindEx(P.getPreprocessor().getSpelling(Tok));
184 Tok = P.getPreprocessor().LookAhead(0);
186 Tok.isAnnotation()
188 : getOpenMPDirectiveKindEx(P.getPreprocessor().getSpelling(Tok));
203 Token Tok = P.getCurToken(); local
208 if (Tok.is(tok::kw_operator)) {
210 Tok = P.getCurToken();
213 switch (Tok
701 const Token &Tok = P.getCurToken(); local
822 getNameFromIdOrString(Parser &P, Token &Tok, OMPContextLvl Lvl) argument
1466 const Token &Tok = P.getCurToken(); local
3061 Token Tok = P.getCurToken(); local
3140 Token Tok = P.getCurToken(); local
3154 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
1512 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...]
/freebsd-13-stable/contrib/llvm-project/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...]
/freebsd-13-stable/contrib/llvm-project/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:__anon1954::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
1136 Token Tok; local
1181 Token Tok; local
1731 Token Tok; local
1786 Token Tok; local
[all...]
H A DPPMacroExpansion.cpp539 Callbacks->MacroExpands(Info.Tok, Info.MD, Info.Range,
767 Token Tok; local
771 LexUnexpandedToken(Tok);
772 assert(Tok.is(tok::l_paren) && "Error computing l-paren-ness?");
784 while (Tok.isNot(tok::r_paren)) {
785 if (ContainsCodeCompletionTok && Tok.isOneOf(tok::eof, tok::eod))
788 assert(Tok.isOneOf(tok::l_paren, tok::comma) &&
792 SourceLocation ArgStartLoc = Tok.getLocation();
801 LexUnexpandedToken(Tok);
803 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...]
/freebsd-13-stable/contrib/llvm-project/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...]
/freebsd-13-stable/contrib/llvm-project/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...]
/freebsd-13-stable/contrib/llvm-project/clang/lib/Tooling/Inclusions/
H A DHeaderIncludes.cpp47 Token Tok; local
49 Lex.LexFromRawLexer(Tok);
50 return GetOffsetAfterSequence(SM, Lex, Tok);
54 // \p Tok will be the token after this directive; otherwise, it can be any token
55 // after the given \p Tok (including \p Tok). If \p RawIDName is provided, the
58 Lexer &Lex, StringRef Name, Token &Tok,
60 bool Matched = Tok.is(tok::hash) && !Lex.LexFromRawLexer(Tok) &&
61 Tok
57 checkAndConsumeDirectiveWithName( Lexer &Lex, StringRef Name, Token &Tok, llvm::Optional<StringRef> RawIDName = llvm::None) argument
70 skipComments(Lexer &Lex, Token &Tok) argument
122 checkAndConsumeInclusiveDirective(Lexer &Lex, Token &Tok) argument
[all...]
/freebsd-13-stable/contrib/llvm-project/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.cpp36 const FormatToken *Tok = NamespaceTok->getNextNonComment(); local
40 assert(Tok && Tok->is(tok::l_paren) && "expected an opening parenthesis");
41 Tok = Tok->getNextNonComment();
42 while (Tok && !Tok->isOneOf(tok::r_paren, tok::comma)) {
43 name += Tok->TokenText;
44 Tok = Tok
[all...]
/freebsd-13-stable/contrib/llvm-project/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...]
/freebsd-13-stable/contrib/llvm-project/clang/include/clang/Lex/
H A DTokenConcatenation.h62 const Token &Tok) const;
67 bool IsIdentifierStringPrefix(const Token &Tok) const;
/freebsd-13-stable/contrib/llvm-project/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 204 milliseconds

12345