summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-04-02 06:26:44 +0000
committerAnders Carlsson <andersca@mac.com>2010-04-02 06:26:44 +0000
commitdb0a965eca2e07f48e189170a796e49653a46971 (patch)
tree0b991db1b6e77155f7b4030634869b967042dfc7 /clang/test
parent7b3f2788a18602ed346a08411e13010ae3befc7a (diff)
downloadbcm5719-llvm-db0a965eca2e07f48e189170a796e49653a46971.tar.gz
bcm5719-llvm-db0a965eca2e07f48e189170a796e49653a46971.zip
If a constructor is a dependent context, just set the base and member initializers as they are written. Fixes a bug where we wouldn't show initialization order warnings when instantiating.
llvm-svn: 100180
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaTemplate/instantiate-member-initializers.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/SemaTemplate/instantiate-member-initializers.cpp b/clang/test/SemaTemplate/instantiate-member-initializers.cpp
index eecb445ea92..e0594347f26 100644
--- a/clang/test/SemaTemplate/instantiate-member-initializers.cpp
+++ b/clang/test/SemaTemplate/instantiate-member-initializers.cpp
@@ -10,14 +10,14 @@ A<int> a0;
A<void*> a1; // expected-note{{in instantiation of member function 'A<void *>::A' requested here}}
template<typename T> struct B {
- // FIXME: This should warn about initialization order
- B() : b(1), a(2) { }
+ B() : b(1), // expected-warning {{member 'b' will be initialized after}}
+ a(2) { } // expected-note {{field a}}
int a;
int b;
};
-B<int> b0;
+B<int> b0; // expected-note {{in instantiation of member function 'B<int>::B' requested here}}
template <class T> struct AA { AA(int); };
template <class T> class BB : public AA<T> {
OpenPOWER on IntegriCloud