[cfe-commits] r85956 - /cfe/trunk/lib/Sema/SemaExpr.cpp
Mike Stump
mrs at apple.com
Tue Nov 3 14:20:01 PST 2009
Author: mrs
Date: Tue Nov 3 16:20:01 2009
New Revision: 85956
URL: http://llvm.org/viewvc/llvm-project?rev=85956&view=rev
Log:
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.
Modified:
cfe/trunk/lib/Sema/SemaExpr.cpp
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=85956&r1=85955&r2=85956&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Tue Nov 3 16:20:01 2009
@@ -1098,7 +1098,8 @@
// - 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();
}
More information about the cfe-commits
mailing list