summaryrefslogtreecommitdiffstats
path: root/clang/test/FixIt/fixit-cxx0x.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2014-10-02 23:13:51 +0000
committerFariborz Jahanian <fjahanian@apple.com>2014-10-02 23:13:51 +0000
commitb91c5d6a79665c9028f15669dc41b5973b9fd8f8 (patch)
tree10280a0264c8f5e06807e0dd2f2e1f6495886d34 /clang/test/FixIt/fixit-cxx0x.cpp
parenta3f58694b5c0fa2af552d70220da787dc6d7e890 (diff)
downloadbcm5719-llvm-b91c5d6a79665c9028f15669dc41b5973b9fd8f8.tar.gz
bcm5719-llvm-b91c5d6a79665c9028f15669dc41b5973b9fd8f8.zip
Patch to warn if 'override' is missing
for an overriding method if class has at least one 'override' specified on one of its methods. Reviewed by Doug Gregor. rdar://18295240 (I have already checked in all llvm files with missing 'override' methods and Bob Wilson has fixed a TableGen of FastISel so no warnings are expected from build of llvm after this patch. I have already verified this). llvm-svn: 218925
Diffstat (limited to 'clang/test/FixIt/fixit-cxx0x.cpp')
-rw-r--r--clang/test/FixIt/fixit-cxx0x.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/FixIt/fixit-cxx0x.cpp b/clang/test/FixIt/fixit-cxx0x.cpp
index 49a05ff8d1e..7830071748e 100644
--- a/clang/test/FixIt/fixit-cxx0x.cpp
+++ b/clang/test/FixIt/fixit-cxx0x.cpp
@@ -24,7 +24,7 @@ namespace SemiCommaTypo {
int o;
struct Base {
- virtual void f2(), f3();
+ virtual void f2(), f3(); // expected-note {{overridden virtual function is here}}
};
struct MemberDeclarator : Base {
int k : 4,
@@ -33,7 +33,7 @@ namespace SemiCommaTypo {
char c, // expected-error {{expected ';' at end of declaration}}
typedef void F(), // expected-error {{expected ';' at end of declaration}}
F f1,
- f2 final,
+ f2 final, // expected-warning {{'f2' overrides a member function but is not marked 'override'}}
f3 override, // expected-error {{expected ';' at end of declaration}}
};
}
OpenPOWER on IntegriCloud