Files
clang-p2996/lldb/test/API/functionalities/completion/main.cpp
Gongyu Deng 19311f5c3e [lldb] common completion for process pids and process names
1. Added two common completions: `ProcessIDs` and `ProcessNames`, which are
refactored from their original dedicated option completions;
2. Removed the dedicated option completion functions of `process attach` and
`platform process attach`, so that they can use arg-type-bound common
completions instead;
3. Bound `eArgTypePid` to the pid completion, `eArgTypeProcessName` to the
process name completion in `CommandObject.cpp`;
4. Added a related test case.

Reviewed By: teemperor

Differential Revision: https://reviews.llvm.org/D80700
2020-08-24 17:30:43 +02:00

29 lines
480 B
C++

#include <iostream>
class Foo
{
public:
int Bar(int x, int y)
{
return x + y;
}
};
namespace { int Quux (void) { return 0; } }
struct Container { int MemberVar; };
int main(int argc, char *argv[]) {
if (argc > 1 && std::string(argv[1]) == "-x")
std::cin.get();
Foo fooo;
Foo *ptr_fooo = &fooo;
fooo.Bar(1, 2);
Container container;
Container *ptr_container = &container;
int q = Quux();
return container.MemberVar = 3; // Break here
}