[cfe-commits] r61165 - in /cfe/trunk: include/clang/AST/Expr.h lib/Sema/SemaExpr.cpp lib/Sema/SemaNamedCast.cpp test/SemaCXX/type-dependent-exprs.cpp
Douglas Gregor
dgregor at apple.com
Thu Dec 18 10:31:37 PST 2008
On Dec 18, 2008, at 7:22 PM, Sebastian Redl wrote:
> Douglas Gregor wrote:
>> Author: dgregor
>> Date: Wed Dec 17 16:52:20 2008
>> New Revision: 61165
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=61165&view=rev
>> Log:
>> Delay semantic analysis of the C++ names casts when the
>> subexpression is type-dependent or the destination type is dependent.
>> + // If the type is dependent, we won't do the semantic analysis
>> now.
>> + // FIXME: should we check this in a more fine-grained manner?
>> + bool TypeDependent = DestType->isDependentType() || Ex-
>> >isTypeDependent();
>> +
>>
> What do you have in mind?
Here's one example: if the destination type of a dynamic_cast
expression is a non-dependent type that is neither a reference nor a
pointer type, we could produce that error while we're in the template
definition instead of waiting until the instantiation.
- Doug
More information about the cfe-commits
mailing list