diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2011-10-13 22:18:05 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2011-10-13 22:18:05 +0000 |
commit | a722170eb95ddbf6b1223b6739b93058d996e05d (patch) | |
tree | 6ebaf58f58567d34018450bb0b5832186e982b1a /clang/test | |
parent | 51862b3890db908a624f6bc8b7203a9a31477930 (diff) | |
download | bcm5719-llvm-a722170eb95ddbf6b1223b6739b93058d996e05d.tar.gz bcm5719-llvm-a722170eb95ddbf6b1223b6739b93058d996e05d.zip |
Implement the first piece of a -Wc++98-compat flag so that people can build in
C++11 mode but keep their sources compatible with C++98. This patch implements
the -Wc++98-compat-variadic-templates sub-flag and -Wc++98-compat to include
it.
llvm-svn: 141898
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/SemaCXX/cxx98-compat.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/cxx98-compat.cpp b/clang/test/SemaCXX/cxx98-compat.cpp new file mode 100644 index 00000000000..37815d47971 --- /dev/null +++ b/clang/test/SemaCXX/cxx98-compat.cpp @@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++0x -Wc++98-compat -verify %s + +template<typename ...T> // expected-warning {{variadic templates are incompatible with C++98}} +class Variadic1 {}; + +template<template<typename> class ...T> // expected-warning {{variadic templates are incompatible with C++98}} +class Variadic2 {}; + +template<int ...I> // expected-warning {{variadic templates are incompatible with C++98}} +class Variadic3 {}; |