Index: test/clang-tidy/check_clang_tidy_fix.sh =================================================================== --- test/clang-tidy/check_clang_tidy_fix.sh +++ test/clang-tidy/check_clang_tidy_fix.sh @@ -19,5 +19,6 @@ if grep -q CHECK-MESSAGES ${INPUT_FILE}; then FileCheck -input-file=${TEMPORARY_FILE}.msg ${INPUT_FILE} \ - -check-prefix=CHECK-MESSAGES -implicit-check-not="warning:" || exit $? + -check-prefix=CHECK-MESSAGES -implicit-check-not="{{warning|error}}:" \ + || exit $? fi Index: test/clang-tidy/redundant-smartptr-get.cpp =================================================================== --- test/clang-tidy/redundant-smartptr-get.cpp +++ test/clang-tidy/redundant-smartptr-get.cpp @@ -1,17 +1,19 @@ // RUN: $(dirname %s)/check_clang_tidy_fix.sh %s misc-redundant-smartptr-get %t // REQUIRES: shell +#define NULL __null + namespace std { template -class unique_ptr { +struct unique_ptr { T& operator*() const; T* operator->() const; T* get() const; }; template -class shared_ptr { +struct shared_ptr { T& operator*() const; T* operator->() const; T* get() const; Index: test/clang-tidy/use-override.cpp =================================================================== --- test/clang-tidy/use-override.cpp +++ test/clang-tidy/use-override.cpp @@ -82,8 +82,8 @@ // CHECK-MESSAGES-NOT: warning: -void SimpleCases::i() {} -// CHECK-FIXES: {{^void SimpleCases::i\(\) {}}} +void SimpleCases::c() {} +// CHECK-FIXES: {{^void SimpleCases::c\(\) {}}} SimpleCases::~SimpleCases() {} // CHECK-FIXES: {{^SimpleCases::~SimpleCases\(\) {}}} @@ -176,7 +176,7 @@ // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: Use exactly // CHECK-FIXES: {{^ VIRTUAL void d\(\) OVERRIDE;}} -#define FUNC(name, return_type) return_type name() +#define FUNC(return_type, name) return_type name() FUNC(void, e); // CHECK-FIXES: {{^ FUNC\(void, e\);}} @@ -209,13 +209,18 @@ }; struct IntantiateWithoutUse : public UnusedMemberInstantiation {}; +struct Base2 { + virtual ~Base2() {} + virtual void a(); +}; + // The OverrideAttr isn't propagated to specializations in all cases. Make sure // we don't add "override" a second time. template -struct MembersOfSpecializations : public Base { +struct MembersOfSpecializations : public Base2 { void a() override; // CHECK-MESSAGES-NOT: warning: // CHECK-FIXES: {{^ void a\(\) override;}} }; template <> void MembersOfSpecializations<3>::a() {} -void f() { MembersOfSpecializations<3>().a(); }; +void ff() { MembersOfSpecializations<3>().a(); };