diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-11-14 22:40:45 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-11-14 22:40:45 +0000 |
commit | 00f5d8927b6f89e68f271c0e42ac30ccbfea2e35 (patch) | |
tree | f7a110817d61cd6b6490b3e4e4915944b52d996b /clang/lib/AST/Expr.cpp | |
parent | d840e40113db0ef0c904357002218de5f541f654 (diff) | |
download | bcm5719-llvm-00f5d8927b6f89e68f271c0e42ac30ccbfea2e35.tar.gz bcm5719-llvm-00f5d8927b6f89e68f271c0e42ac30ccbfea2e35.zip |
DR408: If a static data member of incomplete array type is declared in a class
template, that member has a dependent type (even if we can see the definition
of the member of the primary template), because the array size could change in
a member specialization.
Patch by Karthik Bhat!
llvm-svn: 194740
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
-rw-r--r-- | clang/lib/AST/Expr.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index 8bbf2ff5464..9055ddac35e 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -315,6 +315,9 @@ static void computeDeclRefDependence(const ASTContext &Ctx, NamedDecl *D, Var->getDeclContext()->isDependentContext()) { ValueDependent = true; InstantiationDependent = true; + TypeSourceInfo *TInfo = Var->getFirstDecl()->getTypeSourceInfo(); + if (TInfo->getType()->isIncompleteArrayType()) + TypeDependent = true; } return; |