NoQ added a comment.

Thanks, works now! Apart from the minor comment on the hanging header file in 
the tests, this looks good and i have no further nits :)

//*summons @dcoughlin to have a look at English in the warning messages*//



================
Comment at: test/Analysis/virtualcall.cpp:15-21
+#if PUREONLY
+       // expected-warning-re@-2 {{{{^}}Call to pure virtual function during 
construction}}
+       // expected-note-re@-3 {{{{^}}Call to pure virtual function during 
construction}}
+#else 
+       // expected-warning-re@-5 {{{{^}}Call to virtual function during 
construction}}
+       // expected-note-re@-6 {{{{^}}Call to virtual function during 
construction}}
 #endif
----------------
I think it might be worth it to highlight that the function is pure virtual 
even in non-pure-only mode (if you have time for that).


================
Comment at: test/Analysis/virtualcall.cpp:137-141
-#include "virtualcall.h"
+class Y {
+public:
+  virtual void foobar();
+  void fooY() {
+    F f1;
+    foobar(); 
+#if !PUREONLY
+       // expected-warning-re@-2 {{{{^}}Call to virtual function during 
construction}}
+       // expected-note-re@-3 {{{{^}}Call to virtual function during 
construction}}
+#endif
+  }
+  Y() { fooY(); }
+#if !PUREONLY
+       // expected-note-re@-2 {{{{^}}This constructor of an object of type 'Y' 
has not returned when the virtual method was called}}
+       // expected-note-re@-3 {{{{^}}Calling 'Y::fooY'}}
+#endif
+};
 
-#define AS_SYSTEM
-#include "virtualcall.h"
-#undef AS_SYSTEM
----------------
There used to be a test case in this header; we should restore the test or 
remove the file if it's no longer relevant.


https://reviews.llvm.org/D34275



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to