Simplify handling of direct initializers by letting Sema::AddInitializerToDecl...
Simplify handling of direct initializers by letting Sema::AddInitializerToDecl handle conversions, instead of using Sema::ActOnCXXTypeConstructExpr. Additional benefit is that diagnostics are the same for both direct-initialization and copy-initialization. In the case of "int x( expression );": -The Init expression of VarDecl 'x' will be the expression inside the parentheses. -VarDecl::hasCXXDirectInitializer for VarDecl 'x' will return true to let clients distinguish from "int x = expression ;". llvm-svn: 57219
Loading
Please register or sign in to comment