forked from OSchip/llvm-project
We have to ensure we have the canonical type to do this. This is but
one instance of a large problem. assert for non-canoical types would help track down these things. llvm-svn: 85956
This commit is contained in:
parent
c789dd7d9d
commit
96638affa6
|
@ -1098,7 +1098,8 @@ Sema::BuildDeclarationNameExpr(SourceLocation Loc, NamedDecl *D,
|
|||
// - a constant with integral or enumeration type and is
|
||||
// initialized with an expression that is value-dependent
|
||||
else if (const VarDecl *Dcl = dyn_cast<VarDecl>(VD)) {
|
||||
if (Dcl->getType().getCVRQualifiers() == Qualifiers::Const &&
|
||||
if (Context.getCanonicalType(Dcl->getType()).getCVRQualifiers()
|
||||
== Qualifiers::Const &&
|
||||
Dcl->getInit()) {
|
||||
ValueDependent = Dcl->getInit()->isValueDependent();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue