[PATCH] D15444: [clang-modernize] AddOverride: tests for handling throw() and noexcept() specifiers

Adrian ZgorzaƂek via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 11 13:52:24 PST 2015


adek05 updated this revision to Diff 42568.
adek05 added a comment.

Moved tests to clang-tidy test suite following Eugene.Zelenko suggestion.


http://reviews.llvm.org/D15444

Files:
  test/clang-tidy/modernize-use-override.cpp

Index: test/clang-tidy/modernize-use-override.cpp
===================================================================
--- test/clang-tidy/modernize-use-override.cpp
+++ test/clang-tidy/modernize-use-override.cpp
@@ -37,6 +37,9 @@
 
   virtual void cv() const volatile;
   virtual void cv2() const volatile;
+
+  virtual void ne() noexcept(false);
+  virtual void t() throw();
 };
 
 struct SimpleCases : public Base {
@@ -104,6 +107,14 @@
   virtual void o() __attribute__((unused));
   // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: prefer using
   // CHECK-FIXES: {{^}}  void o() override __attribute__((unused));
+
+  virtual void ne() noexcept(false);
+  // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: prefer using
+  // CHECK-FIXES: {{^}}  void ne() noexcept(false) override;
+
+  virtual void t() throw();
+  // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: prefer using
+  // CHECK-FIXES: {{^}}  void t() throw() override;
 };
 
 // CHECK-MESSAGES-NOT: warning:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15444.42568.patch
Type: text/x-patch
Size: 961 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151211/29af801b/attachment.bin>


More information about the cfe-commits mailing list