Lines Matching refs:LangOpts
69 IdentifierTable::IdentifierTable(const LangOptions &LangOpts, in IdentifierTable() argument
74 AddKeywords(LangOpts); in IdentifierTable()
136 static KeywordStatus getKeywordStatusHelper(const LangOptions &LangOpts, in getKeywordStatusHelper() argument
144 if (LangOpts.C99) in getKeywordStatusHelper()
146 return !LangOpts.CPlusPlus ? KS_Future : KS_Unknown; in getKeywordStatusHelper()
148 if (LangOpts.C23) in getKeywordStatusHelper()
150 return !LangOpts.CPlusPlus ? KS_Future : KS_Unknown; in getKeywordStatusHelper()
152 return LangOpts.CPlusPlus ? KS_Enabled : KS_Unknown; in getKeywordStatusHelper()
154 if (LangOpts.CPlusPlus11) in getKeywordStatusHelper()
156 return LangOpts.CPlusPlus ? KS_Future : KS_Unknown; in getKeywordStatusHelper()
158 if (LangOpts.CPlusPlus20) in getKeywordStatusHelper()
160 return LangOpts.CPlusPlus ? KS_Future : KS_Unknown; in getKeywordStatusHelper()
162 return LangOpts.GNUKeywords ? KS_Extension : KS_Unknown; in getKeywordStatusHelper()
164 return LangOpts.MicrosoftExt ? KS_Extension : KS_Unknown; in getKeywordStatusHelper()
166 if (LangOpts.Bool) return KS_Enabled; in getKeywordStatusHelper()
167 return !LangOpts.CPlusPlus ? KS_Future : KS_Unknown; in getKeywordStatusHelper()
169 return LangOpts.AltiVec ? KS_Enabled : KS_Unknown; in getKeywordStatusHelper()
171 return LangOpts.Borland ? KS_Extension : KS_Unknown; in getKeywordStatusHelper()
173 return LangOpts.OpenCL && !LangOpts.OpenCLCPlusPlus ? KS_Enabled in getKeywordStatusHelper()
176 return LangOpts.WChar ? KS_Enabled : KS_Unknown; in getKeywordStatusHelper()
178 return LangOpts.Half ? KS_Enabled : KS_Unknown; in getKeywordStatusHelper()
180 if (LangOpts.Char8) return KS_Enabled; in getKeywordStatusHelper()
181 if (LangOpts.CPlusPlus20) return KS_Unknown; in getKeywordStatusHelper()
182 if (LangOpts.CPlusPlus) return KS_Future; in getKeywordStatusHelper()
187 return LangOpts.ObjC ? KS_Enabled : KS_Unknown; in getKeywordStatusHelper()
189 return LangOpts.ZVector ? KS_Enabled : KS_Unknown; in getKeywordStatusHelper()
191 return LangOpts.Coroutines ? KS_Enabled : KS_Unknown; in getKeywordStatusHelper()
195 return LangOpts.OpenCLCPlusPlus ? KS_Enabled : KS_Unknown; in getKeywordStatusHelper()
197 return LangOpts.MSVCCompat ? KS_Enabled : KS_Unknown; in getKeywordStatusHelper()
199 return LangOpts.isSYCL() ? KS_Enabled : KS_Unknown; in getKeywordStatusHelper()
201 return LangOpts.CUDA ? KS_Enabled : KS_Unknown; in getKeywordStatusHelper()
203 return LangOpts.HLSL ? KS_Enabled : KS_Unknown; in getKeywordStatusHelper()
207 return LangOpts.CPlusPlus ? KS_Unknown : KS_Enabled; in getKeywordStatusHelper()
215 return LangOpts.FixedPoint ? KS_Enabled : KS_Disabled; in getKeywordStatusHelper()
223 static KeywordStatus getKeywordStatus(const LangOptions &LangOpts, in getKeywordStatus() argument
229 if (LangOpts.OpenCL && (Flags & KEYNOOPENCL)) return KS_Disabled; in getKeywordStatus()
230 if (LangOpts.MSVCCompat && (Flags & KEYNOMS18) && in getKeywordStatus()
231 !LangOpts.isCompatibleWithMSVC(LangOptions::MSVC2015)) in getKeywordStatus()
241 getKeywordStatusHelper(LangOpts, static_cast<TokenKey>(CurFlag))); in getKeywordStatus()
254 const LangOptions &LangOpts, IdentifierTable &Table) { in AddKeyword() argument
255 KeywordStatus AddResult = getKeywordStatus(LangOpts, Flags); in AddKeyword()
295 void IdentifierTable::AddKeywords(const LangOptions &LangOpts) { in AddKeywords() argument
299 FLAGS, LangOpts, *this); in AddKeywords()
302 FLAGS, LangOpts, *this); in AddKeywords()
304 if (LangOpts.CXXOperatorNames) \ in AddKeywords()
307 if (LangOpts.ObjC) \ in AddKeywords()
315 if (LangOpts.ParseUnknownAnytype) in AddKeywords()
317 LangOpts, *this); in AddKeywords()
319 if (LangOpts.DeclSpecKeyword) in AddKeywords()
320 AddKeyword("__declspec", tok::kw___declspec, KEYALL, LangOpts, *this); in AddKeywords()
322 if (LangOpts.IEEE128) in AddKeywords()
323 AddKeyword("__ieee128", tok::kw___float128, KEYALL, LangOpts, *this); in AddKeywords()
332 static KeywordStatus getTokenKwStatus(const LangOptions &LangOpts, in getTokenKwStatus() argument
336 case tok::kw_##NAME: return getKeywordStatus(LangOpts, FLAGS); in getTokenKwStatus()
344 bool IdentifierInfo::isKeyword(const LangOptions &LangOpts) const { in isKeyword()
345 switch (getTokenKwStatus(LangOpts, getTokenID())) { in isKeyword()
356 bool IdentifierInfo::isCPlusPlusKeyword(const LangOptions &LangOpts) const { in isCPlusPlusKeyword()
357 if (!LangOpts.CPlusPlus || !isKeyword(LangOpts)) in isCPlusPlusKeyword()
361 LangOptions LangOptsNoCPP = LangOpts; in isCPlusPlusKeyword()
369 IdentifierInfo::isReserved(const LangOptions &LangOpts) const { in isReserved()
395 if (LangOpts.CPlusPlus && Name.contains("__")) in isReserved()
838 const LangOptions &LangOpts) { in getFutureCompatDiagKind() argument
847 if (LangOpts.CPlusPlus) { in getFutureCompatDiagKind()