<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62907>62907</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
get syntax error in the watch
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
mttbx
</td>
</tr>
</table>
<pre>
If I put "x->val" in the watch, I get the error "Syntax error: x->val". This is the code:
```
#include <memory>
#include <vector>
using namespace std;
struct A {
vector<int> val;
};
int main() {
shared_ptr<A> x = make_shared<A>();
x->val.resize(3, 0);
return 0; // breakpoint here
}
```
I can use command to print it. By the way There's some extra new lines in the output, maybe some bugs?
```
p x->val
(std::vector<int, std::allocator<int> >) $0 = size=3 {
[0] = 0
[1] = 0
[2] = 0
}
v x->val
(std::vector<int, std::allocator<int> >) x->val = size=3 {
[0] = 0
[1] = 0
[2] = 0
// <- new line here
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VEuPozwQ_DXNpZXIsQmEA4c8JlLO39xHxvQEfwMG2SaT7K9f2XmPoj3tIgRyP4qiqtXSOb03RCXMVzDfJHL0TW_LzvvqmFR9fSp3n7jDYfQInB8nIN4OsgXOURv0DeG39KoBvsYd7snHEFnb21D-38l4eTyfQSzxoX2K7412qF3sUH1NIJbANsCWkLHLfT5yoY1qx5oQxLqjrrcnEG-vkgdSPnzpmozP0WmzRyM7coNUhM7XIFaPFc7bUXlcIuSXOOIVaq2NB_GGgfWtK9_8QNDGYye1Ab4AXtxxrmiukZbqj8EHxGXAOyKIDXbyiz7OyUvijHCDx5tmU0tO_yLgCxHUZs9VlvxoDTIQKwS-Bb7FypL8GvpArSFLd-qvRN6hkgZHF6zoOmlq9D0ONjRrP8XV6eL1Cd8jGM8dur4jpKO3Eg19Y6sNuetU9KMfRh-IdvJU0bm2GvcOxPYlgeE-HBdjF9GoJYjlkxd8jbeEbNteySefooQFAk9ZVDhqJjbi0VuYrxjMNzHPHoKzV0H-I3hT8PB3GV_B_g1rfHldJgXEenKz8I_DktSlqAtRyITKWbZIi1km8iJpykWeZkpJRVXF6lTN60x9VpnkLM-plp9FokvOuGBznrLFrBDFNE-zxSyfcZmllNNcQcqok7qdtu2hm_Z2n2jnRiozXrA8aWVFrYtLivNANSaBh_9MbBl6JnG8UtZq590dxWvfUhlWk3vYRk_bKxltWzbeDy6YFDXZa9-M1VT1HfBtwLq8JoPt_yflgW8jAwd8Gxn-DgAA__-3eHqV">