[PATCH] D43798: [analyzer] UndefinedAssignment: Fix warning message on implicit copy/move constructors.
Devin Coughlin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 27 13:50:46 PST 2018
dcoughlin accepted this revision.
dcoughlin added a comment.
This revision is now accepted and ready to land.
LGTM. I have a suggestion for a slight modification of the diagnostic text inline.
================
Comment at: test/Analysis/implicit-ctor-undef-value.cpp:12
+// missing. Specify which field is being assigned.
+class C { // expected-warning{{Value assigned to field 'y' is garbage or undefined}}
+ // expected-note at -1{{Value assigned to field 'y' is garbage or undefined}}
----------------
I think it would be good to mention that this assignment is happening in an implicit constructor, since that is probably not obvious to most users.
How about: "Value assigned to field 'y' in implicit constructor is garbage or undefined".
https://reviews.llvm.org/D43798
More information about the cfe-commits
mailing list