================
@@ -162,4 +167,11 @@ namespace SynthesizedAssignment {
     clang_analyzer_eval(u.a[2].a == 43); // expected-warning{{TRUE}}
     // expected-note@-1{{TRUE}}
   }
+
+  void testImplicitAssign() {
+    C c1, c2;
+    c1 = c2; // expected-warning@114{{Value assigned to field 'x' in implicit 
assignment operator is uninitialized}}
----------------
steakhal wrote:

I'd highly advise against using Line numbers for pinning messages.
I think you have two options:
1) Just put the expectation there, or
2) Leave anchor there and associate the expectation agains that for example: 
`// #fany-anchor` and then later `// expected-warning@#fany-anchor {{Fancy 
message}}`

I'd probably prefer option 2, and use the test entry point name as the anchor 
to make them correlate.


https://github.com/llvm/llvm-project/pull/208173
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to