From a3ec1a32674c3e783768ed220272d4afbec7a914 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Tue, 25 Nov 2014 12:32:14 +0000 Subject: [PATCH] clang-tidy: [misc-use-override] Add testcase with reversed attribute order llvm-svn: 222755 --- clang-tools-extra/test/clang-tidy/misc-use-override.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clang-tools-extra/test/clang-tidy/misc-use-override.cpp b/clang-tools-extra/test/clang-tidy/misc-use-override.cpp index 33c686a..d2e5a82 100644 --- a/clang-tools-extra/test/clang-tidy/misc-use-override.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-use-override.cpp @@ -26,6 +26,7 @@ struct Base { virtual void j() const; virtual MustUseResultObject k(); virtual bool l() MUST_USE_RESULT UNUSED; + virtual bool n() MUST_USE_RESULT UNUSED; virtual void m(); }; @@ -76,6 +77,10 @@ public: // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: Prefer using // CHECK-FIXES: {{^ bool l\(\) override MUST_USE_RESULT UNUSED;}} + virtual bool n() UNUSED MUST_USE_RESULT; + // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: Prefer using + // CHECK-FIXES: {{^ bool n\(\) override UNUSED MUST_USE_RESULT;}} + virtual void m() override final; // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: Annotate this // CHECK-FIXES: {{^ void m\(\) final;}} -- 2.7.4