summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@google.com>2011-10-13 22:18:05 +0000
committerJeffrey Yasskin <jyasskin@google.com>2011-10-13 22:18:05 +0000
commita722170eb95ddbf6b1223b6739b93058d996e05d (patch)
tree6ebaf58f58567d34018450bb0b5832186e982b1a /clang/test
parent51862b3890db908a624f6bc8b7203a9a31477930 (diff)
downloadbcm5719-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.cpp10
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 {};
OpenPOWER on IntegriCloud