Lines Matching +full:- +full:- +full:user +full:- +full:token

1 //===-- ClangExpressionSourceCode.cpp -------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
33 #include "lldb/lldb-forward.h"
146 // Clang instance which parses the user expression. The Clang diagnostics in AddMacros()
147 // caused by this are not useful for the user as the source code here is in AddMacros()
150 stream << "#pragma clang diagnostic ignored \"-Wmacro-redefined\"\n"; in AddMacros()
151 stream << "#pragma clang diagnostic ignored \"-Wbuiltin-macro-redefined\"\n"; in AddMacros()
156 for (size_t i = 0; i < dm->GetNumMacroEntries(); i++) { in AddMacros()
157 const DebugMacroEntry &entry = dm->GetMacroEntryAtIndex(i); in AddMacros()
197 // Use #line markers to pretend that we have a single-line source file in ClangExpressionSourceCode()
198 // containing only the user expression. This will hide our wrapper code in ClangExpressionSourceCode()
199 // from the user when we render diagnostics with Clang. in ClangExpressionSourceCode()
205 /// Allows checking if a token is contained in a given expression.
212 /// Returns true iff the given expression body contained a token with the
214 bool hasToken(llvm::StringRef token) const { in hasToken()
215 return m_tokens.contains(token); in hasToken()
232 uint32_t numChildren = thisValSP->GetNumChildrenIgnoringErrors(); in AddLambdaCaptureDecls()
234 auto childVal = thisValSP->GetChildAtIndex(i); in AddLambdaCaptureDecls()
235 ConstString childName(childVal ? childVal->GetName() : ConstString("")); in AddLambdaCaptureDecls()
253 // following code that extracts the token contents. in TokenVerifier()
270 FileID FID = SM.createFileID(buf->getMemBufferRef()); in TokenVerifier()
280 Lexer lex(FID, buf->getMemBufferRef(), SM, Opts); in TokenVerifier()
282 Token token; in TokenVerifier() local
285 // Returns true if this is the last token we get from the lexer. in TokenVerifier()
286 exit = lex.LexFromRawLexer(token); in TokenVerifier()
288 // Extract the column number which we need to extract the token content. in TokenVerifier()
292 unsigned start = SM.getSpellingColumnNumber(token.getLocation(), &invalid); in TokenVerifier()
296 --start; in TokenVerifier()
299 if (token.isAnnotation()) in TokenVerifier()
302 // Extract the token string from our source code and store it. in TokenVerifier()
303 std::string token_str = body.substr(start, token.getLength()); in TokenVerifier()
316 lldb::VariableListSP var_list_sp = frame->GetInScopeVariableList(false, true); in AddLocalVariableDecls()
318 for (size_t i = 0; i < var_list_sp->GetSize(); i++) { in AddLocalVariableDecls()
319 lldb::VariableSP var_sp = var_list_sp->GetVariableAtIndex(i); in AddLocalVariableDecls()
321 ConstString var_name = var_sp->GetName(); in AddLocalVariableDecls()
355 if (target->GetArchitecture().GetMachine() == llvm::Triple::aarch64 || in GetText()
356 target->GetArchitecture().GetMachine() == llvm::Triple::aarch64_32) { in GetText()
359 if (target->GetArchitecture().GetMachine() == llvm::Triple::x86_64) { in GetText()
360 if (lldb::PlatformSP platform_sp = target->GetPlatform()) { in GetText()
361 if (platform_sp->GetPluginName() == "ios-simulator") { in GetText()
368 target->GetPersistentExpressionStateForLanguage(lldb::eLanguageTypeC)); in GetText()
370 persistent_vars->GetClangModulesDeclVendor(); in GetText()
373 persistent_vars->GetHandLoadedClangModules(); in GetText()
380 if (target->GetEnableAutoImportClangModules()) { in GetText()
382 if (Block *block = frame->GetFrameBlock()) { in GetText()
385 block->CalculateSymbolContext(&sc); in GetText()
390 decl_vendor->AddModulesForCompileUnit( in GetText()
397 decl_vendor->ForEachMacro( in GetText()
399 [&module_macros_stream](llvm::StringRef token, in GetText()
400 llvm::StringRef expansion) -> bool { in GetText()
403 module_macros_stream << "#ifndef " << token << "\n"; in GetText()
414 const SymbolContext &sc = frame->GetSymbolContext( in GetText()
418 DebugMacros *dm = sc.comp_unit->GetDebugMacros(); in GetText()
426 if (target->GetInjectLocalVariables(&exe_ctx)) { in GetText()
448 // First construct a tagged form of the user expression so we can find it in GetText()
482 "-(void)%s:(void *)$__lldb_arg; \n" in GetText()
485 "-(void)%s:(void *)$__lldb_arg \n" in GetText()