[cfe-commits] r56096 - in /cfe/trunk: lib/Sema/SemaStmt.cpp test/SemaCXX/condition.cpp

Neil Booth neil at daikokuya.co.uk
Thu Sep 11 15:08:01 PDT 2008

Argiris Kirtzidis wrote:-

> CheckCXXBooleanCondition follows the convention of other check functions  
> (CheckInitializerTypes, CheckSingleInitializer, CheckCastTypes, etc)  
> which is that it doesn't just receive the expression to check, but a  
> reference to it so that it can replace it with another expression as  
> needed. It replaces the given Expr node with an implicit cast expr node,  
> and returns false if it was successful. If it can't convert to bool and  
> a diagnostic was emitted, it returns true (works similar to the other  
> check functions).

I looked into the function and couldn't see it, but looking again
I see the called function CheckAssignmentConstraints is doing it.

The naming convention is confusing, but it seems to be widespread,
so perhaps not worth changing.


More information about the cfe-commits mailing list