Lines Matching refs:LangOpts
112 LangOpts(PP.getLangOpts()) { in Lexer()
122 if (LangOpts.TraditionalCPP) in resetExtendedTokenMode()
133 : FileLoc(fileloc), LangOpts(langOpts) { in Lexer()
232 const LangOptions &LangOpts, char *Spelling) { in getSpellingSlow() argument
242 Spelling[Length++] = Lexer::getCharAndSizeNoWarn(BufPtr, Size, LangOpts); in getSpellingSlow()
271 Spelling[Length++] = Lexer::getCharAndSizeNoWarn(BufPtr, Size, LangOpts); in getSpellingSlow()
327 const LangOptions &LangOpts, bool *Invalid) { in getSpelling() argument
344 Result.resize(getSpellingSlow(Tok, TokStart, LangOpts, &*Result.begin())); in getSpelling()
360 const LangOptions &LangOpts, bool *Invalid) { in getSpelling() argument
398 return getSpellingSlow(Tok, TokStart, LangOpts, const_cast<char*>(Buffer)); in getSpelling()
408 const LangOptions &LangOpts) { in MeasureTokenLength() argument
410 if (getRawToken(Loc, TheTok, SM, LangOpts)) in MeasureTokenLength()
419 const LangOptions &LangOpts, in getRawToken() argument
442 Lexer TheLexer(SM.getLocForStartOfFile(LocInfo.first), LangOpts, in getRawToken()
451 const LangOptions &LangOpts) { in getBeginningOfFileToken() argument
484 Lexer TheLexer(LexerStartLoc, LangOpts, BufStart, LexStart, Buffer.end()); in getBeginningOfFileToken()
511 const LangOptions &LangOpts) { in GetBeginningOfToken() argument
513 return getBeginningOfFileToken(Loc, SM, LangOpts); in GetBeginningOfToken()
519 SourceLocation BeginFileLoc = getBeginningOfFileToken(FileLoc, SM, LangOpts); in GetBeginningOfToken()
538 const LangOptions &LangOpts, in ComputePreamble() argument
545 Lexer TheLexer(FileLoc, LangOpts, Buffer.begin(), Buffer.begin(), in ComputePreamble()
703 const LangOptions &LangOpts) { in AdvanceToTokenCharacter() argument
731 Lexer::getCharAndSizeNoWarn(TokPtr, Size, LangOpts); in AdvanceToTokenCharacter()
763 const LangOptions &LangOpts) { in getLocForEndOfToken() argument
768 if (Offset > 0 || !isAtEndOfMacroExpansion(Loc, SM, LangOpts, &Loc)) in getLocForEndOfToken()
772 unsigned Len = Lexer::MeasureTokenLength(Loc, SM, LangOpts); in getLocForEndOfToken()
785 const LangOptions &LangOpts, in isAtStartOfMacroExpansion() argument
800 return isAtStartOfMacroExpansion(expansionLoc, SM, LangOpts, MacroBegin); in isAtStartOfMacroExpansion()
807 const LangOptions &LangOpts, in isAtEndOfMacroExpansion() argument
812 unsigned tokLen = MeasureTokenLength(spellLoc, SM, LangOpts); in isAtEndOfMacroExpansion()
828 return isAtEndOfMacroExpansion(expansionLoc, SM, LangOpts, MacroEnd); in isAtEndOfMacroExpansion()
833 const LangOptions &LangOpts) { in makeRangeFromFileLocs() argument
838 End = Lexer::getLocForEndOfToken(End, 0, SM,LangOpts); in makeRangeFromFileLocs()
860 const LangOptions &LangOpts) { in makeFileCharRange() argument
867 return makeRangeFromFileLocs(Range, SM, LangOpts); in makeFileCharRange()
870 if (!isAtStartOfMacroExpansion(Begin, SM, LangOpts, &Begin)) in makeFileCharRange()
873 return makeRangeFromFileLocs(Range, SM, LangOpts); in makeFileCharRange()
877 if ((Range.isTokenRange() && !isAtEndOfMacroExpansion(End, SM, LangOpts, in makeFileCharRange()
879 (Range.isCharRange() && !isAtStartOfMacroExpansion(End, SM, LangOpts, in makeFileCharRange()
883 return makeRangeFromFileLocs(Range, SM, LangOpts); in makeFileCharRange()
888 if (isAtStartOfMacroExpansion(Begin, SM, LangOpts, &MacroBegin) && in makeFileCharRange()
889 ((Range.isTokenRange() && isAtEndOfMacroExpansion(End, SM, LangOpts, in makeFileCharRange()
891 (Range.isCharRange() && isAtStartOfMacroExpansion(End, SM, LangOpts, in makeFileCharRange()
895 return makeRangeFromFileLocs(Range, SM, LangOpts); in makeFileCharRange()
915 return makeFileCharRange(Range, SM, LangOpts); in makeFileCharRange()
924 const LangOptions &LangOpts, in getSourceText() argument
926 Range = makeFileCharRange(Range, SM, LangOpts); in getSourceText()
960 const LangOptions &LangOpts) { in getImmediateMacroName() argument
1000 unsigned MacroTokenLength = Lexer::MeasureTokenLength(Loc, SM, LangOpts); in getImmediateMacroName()
1006 SourceLocation Loc, const SourceManager &SM, const LangOptions &LangOpts) { in getImmediateMacroNameForDiagnostics() argument
1025 unsigned MacroTokenLength = Lexer::MeasureTokenLength(Loc, SM, LangOpts); in getImmediateMacroNameForDiagnostics()
1030 bool Lexer::isIdentifierBodyChar(char c, const LangOptions &LangOpts) { in isIdentifierBodyChar() argument
1031 return isIdentifierBody(c, LangOpts.DollarIdents); in isIdentifierBodyChar()
1186 const LangOptions &LangOpts, in findLocationAfterToken() argument
1189 if (!Lexer::isAtEndOfMacroExpansion(Loc, SM, LangOpts, &Loc)) in findLocationAfterToken()
1192 Loc = Lexer::getLocForEndOfToken(Loc, 0, SM, LangOpts); in findLocationAfterToken()
1206 Lexer lexer(SM.getLocForStartOfFile(LocInfo.first), LangOpts, File.begin(), in findLocationAfterToken()
1321 const LangOptions &LangOpts) { in getCharAndSizeSlowNoWarn() argument
1343 return getCharAndSizeSlowNoWarn(Ptr, Size, LangOpts); in getCharAndSizeSlowNoWarn()
1351 if (LangOpts.Trigraphs && Ptr[0] == '?' && Ptr[1] == '?') { in getCharAndSizeSlowNoWarn()
1383 static bool isAllowedIDChar(uint32_t C, const LangOptions &LangOpts) { in isAllowedIDChar() argument
1384 if (LangOpts.AsmPreprocessor) { in isAllowedIDChar()
1386 } else if (LangOpts.CPlusPlus11 || LangOpts.C11) { in isAllowedIDChar()
1390 } else if (LangOpts.CPlusPlus) { in isAllowedIDChar()
1401 static bool isAllowedInitiallyIDChar(uint32_t C, const LangOptions &LangOpts) { in isAllowedInitiallyIDChar() argument
1402 assert(isAllowedIDChar(C, LangOpts)); in isAllowedInitiallyIDChar()
1403 if (LangOpts.AsmPreprocessor) { in isAllowedInitiallyIDChar()
1405 } else if (LangOpts.CPlusPlus11 || LangOpts.C11) { in isAllowedInitiallyIDChar()
1409 } else if (LangOpts.CPlusPlus) { in isAllowedInitiallyIDChar()
1463 if (CodePoint == 0 || !isAllowedIDChar(CodePoint, LangOpts)) in tryConsumeIdentifierUCN()
1490 !isAllowedIDChar(static_cast<uint32_t>(CodePoint), LangOpts)) in tryConsumeIdentifierUTF8Char()
1517 (C != '$' || !LangOpts.DollarIdents)) { in LexIdentifier()
1546 if (!LangOpts.DollarIdents) goto FinishIdentifier; in LexIdentifier()
1578 bool Lexer::isHexaLiteral(const char *Start, const LangOptions &LangOpts) { in isHexaLiteral() argument
1580 char C1 = Lexer::getCharAndSizeNoWarn(Start, Size, LangOpts); in isHexaLiteral()
1583 char C2 = Lexer::getCharAndSizeNoWarn(Start + Size, Size, LangOpts); in isHexaLiteral()
1604 if (!LangOpts.MicrosoftExt || !isHexaLiteral(BufferPtr, LangOpts)) in LexNumericConstant()
1614 if (!LangOpts.C99) { in LexNumericConstant()
1615 if (!isHexaLiteral(BufferPtr, LangOpts)) in LexNumericConstant()
1766 if (!isLexingRawMode() && !LangOpts.AsmPreprocessor) in LexStringLiteral()
1935 if (!isLexingRawMode() && !LangOpts.AsmPreprocessor) in LexCharConstant()
1948 if (!isLexingRawMode() && !LangOpts.AsmPreprocessor) in LexCharConstant()
2050 if (!LangOpts.LineComment && !isLexingRawMode()) { in SkipLineComment()
2055 LangOpts.LineComment = true; in SkipLineComment()
2548 if (LangOpts.CPlusPlus11) { in LexEndOfFile()
2736 if (!LangOpts.CPlusPlus && !LangOpts.C99) { in tryReadUCN()
2788 if (LangOpts.AsmPreprocessor) in tryReadUCN()
2824 if (LangOpts.CPlusPlus && !LangOpts.CPlusPlus11) in tryReadUCN()
2851 if (isAllowedIDChar(C, LangOpts) && isAllowedInitiallyIDChar(C, LangOpts)) { in LexUnicode()
2865 !isASCII(*BufferPtr) && !isAllowedIDChar(C, LangOpts)) { in LexUnicode()
2991 if (LangOpts.MicrosoftExt) { in LexTokenInternal()
3045 LangOpts.LineComment && in LexTokenInternal()
3046 (LangOpts.CPlusPlus || !LangOpts.TraditionalCPP)) { in LexTokenInternal()
3073 if (LangOpts.CPlusPlus11 || LangOpts.C11) { in LexTokenInternal()
3087 if (Char == 'R' && LangOpts.CPlusPlus11 && in LexTokenInternal()
3103 if (Char2 == '\'' && LangOpts.CPlusPlus1z) in LexTokenInternal()
3109 if (Char2 == 'R' && LangOpts.CPlusPlus11) { in LexTokenInternal()
3131 if (LangOpts.CPlusPlus11 || LangOpts.C11) { in LexTokenInternal()
3145 if (Char == 'R' && LangOpts.CPlusPlus11 && in LexTokenInternal()
3160 if (LangOpts.CPlusPlus11) { in LexTokenInternal()
3183 if (LangOpts.CPlusPlus11 && Char == 'R' && in LexTokenInternal()
3211 if (LangOpts.DollarIdents) { in LexTokenInternal()
3263 } else if (LangOpts.CPlusPlus && Char == '*') { in LexTokenInternal()
3312 } else if (Char == '>' && LangOpts.CPlusPlus && in LexTokenInternal()
3350 bool TreatAsComment = LangOpts.LineComment && in LexTokenInternal()
3351 (LangOpts.CPlusPlus || !LangOpts.TraditionalCPP); in LexTokenInternal()
3390 } else if (LangOpts.Digraphs && Char == '>') { in LexTokenInternal()
3393 } else if (LangOpts.Digraphs && Char == ':') { in LexTokenInternal()
3400 } else if (Char == '@' && LangOpts.MicrosoftExt) {// %:@ -> #@ -> Charize in LexTokenInternal()
3437 } else if (LangOpts.CUDA && After == '<') { in LexTokenInternal()
3448 } else if (LangOpts.Digraphs && Char == ':') { // '<:' -> '[' in LexTokenInternal()
3449 if (LangOpts.CPlusPlus11 && in LexTokenInternal()
3468 } else if (LangOpts.Digraphs && Char == '%') { // '<%' -> '{' in LexTokenInternal()
3493 } else if (LangOpts.CUDA && After == '>') { in LexTokenInternal()
3511 } else if (LangOpts.OpenCL && Char == '^') { in LexTokenInternal()
3535 if (LangOpts.Digraphs && Char == '>') { in LexTokenInternal()
3538 } else if (LangOpts.CPlusPlus && Char == ':') { in LexTokenInternal()
3569 } else if (Char == '@' && LangOpts.MicrosoftExt) { // #@ -> Charize in LexTokenInternal()
3588 if (CurPtr[-1] == '@' && LangOpts.ObjC1) in LexTokenInternal()