public class TypeHelper extends Object
Modifier and Type | Method and Description |
---|---|
static IType |
createType(IASTDeclarator declarator) |
static boolean |
shouldBePassedByReference(IType type,
IASTTranslationUnit ast)
Returns
true if it is preferable to pass parameters of the given type to methods
by reference, not by value. |
public static boolean shouldBePassedByReference(IType type, IASTTranslationUnit ast)
true
if it is preferable to pass parameters of the given type to methods
by reference, not by value. A parameter should be passed by reference if it is
a class
, struct
, or union
, and either has a nontrivial
copy constructor or nontrivial destructor, or is larger than pointer.type
- the type in question.ast
- the AST used as a context.true
is passing by reverence is preferable.public static IType createType(IASTDeclarator declarator)
Copyright (c) IBM Corp. and others 2004, 2020. All Rights Reserved.