summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/Decl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index aeb7963f900..bcb9f05ca3c 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -2282,7 +2282,7 @@ bool VarDecl::isUsableInConstantExpressions(ASTContext &Context) const {
// declaration is encountered...
const VarDecl *DefVD = nullptr;
const Expr *Init = getAnyInitializer(DefVD);
- if (!Init || Init->isValueDependent())
+ if (!Init || Init->isValueDependent() || getType()->isDependentType())
return false;
// ... if it is a constexpr variable, or it is of reference type or of
// const-qualified integral or enumeration type, ...
OpenPOWER on IntegriCloud