diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-01-09 22:31:44 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-01-09 22:31:44 +0000 |
commit | c8a79033bab12eb73d6deae8dc12c7451b548212 (patch) | |
tree | a2d691ad024df8b9224f54eb6a7690e4284950ad /clang/test/FixIt/fixit.cpp | |
parent | 65518014e25774c8ea6e81301f5ce9e5e8b15466 (diff) | |
download | bcm5719-llvm-c8a79033bab12eb73d6deae8dc12c7451b548212.tar.gz bcm5719-llvm-c8a79033bab12eb73d6deae8dc12c7451b548212.zip |
Extend the diagnostic for a ',' at the end of a declaration where a ';' was
intended to cover C++ class definitions.
llvm-svn: 147808
Diffstat (limited to 'clang/test/FixIt/fixit.cpp')
-rw-r--r-- | clang/test/FixIt/fixit.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/FixIt/fixit.cpp b/clang/test/FixIt/fixit.cpp index 31ef18e4048..f7bf35b09e3 100644 --- a/clang/test/FixIt/fixit.cpp +++ b/clang/test/FixIt/fixit.cpp @@ -125,6 +125,19 @@ AD oopsMoreCommas() { AD ad, // expected-error {{expected ';' at end of declaration}} return ad; } +struct MoreAccidentalCommas { + int a : 5, + b : 7, + : 4, // expected-error {{expected ';' at end of declaration}} + char c, // expected-error {{expected ';' at end of declaration}} + double d, // expected-error {{expected ';' at end of declaration}} + MoreAccidentalCommas *next, // expected-error {{expected ';' at end of declaration}} +public: + int k, // expected-error {{expected ';' at end of declaration}} + friend void f(MoreAccidentalCommas) {} + int k2, // expected-error {{expected ';' at end of declaration}} + virtual void g(), // expected-error {{expected ';' at end of declaration}} +}; template<class T> struct Mystery; template<class T> typedef Mystery<T>::type getMysteriousThing() { // \ |