Class SemanticQueries


  • public class SemanticQueries
    extends Object
    This class exposes semantic queries about C++ code to clients such as code analysis.
    Since:
    5.5
    • Constructor Detail

      • SemanticQueries

        public SemanticQueries()
    • Method Detail

      • isCopyOrMoveConstructor

        public static boolean isCopyOrMoveConstructor​(ICPPConstructor constructor)
      • isMoveConstructor

        public static boolean isMoveConstructor​(ICPPConstructor constructor)
      • isCopyConstructor

        public static boolean isCopyConstructor​(ICPPConstructor constructor)
      • isCopyAssignmentOperator

        public static boolean isCopyAssignmentOperator​(ICPPMethod method)
        Since:
        6.9
      • isCopyOrMoveAssignmentOperator

        public static boolean isCopyOrMoveAssignmentOperator​(ICPPMethod method)
        Since:
        6.9
      • isMoveAssignmentOperator

        public static boolean isMoveAssignmentOperator​(ICPPMethod method)
        Since:
        6.9
      • getPureVirtualMethods

        public static ICPPMethod[] getPureVirtualMethods​(ICPPClassType classType)
        Returns all pure virtual methods of a class. Inherited pure virtual methods that have not been implemented are also returned. NOTE: The method produces complete results for template instantiations but doesn't take into account base classes and methods dependent on unspecified template parameters.
        Parameters:
        classType - the class whose pure virtual methods should be returned
        Returns:
        an array containing all pure virtual methods of the class
        Since:
        6.4
      • isUnknownBuiltin

        public static boolean isUnknownBuiltin​(IProblemBinding binding,
                                               IASTNode node)
        Returns whether a problem binding represents a name resolution error due to an unknown built-in. Importantly, this will not return true for a misuse of a known builtin, which we want to diagnose.
        Parameters:
        binding - The problem binding to test.
        node - Any node in the AST. Used to access the AST root.
        Since:
        6.3