If I understand the UML 2.5.1 spec correctly, the definitions and constraints for UMLClassDiagram and UMLComponentDiagram are identical and furthermore the set of things those diagrams may show are identical.
So whether I call a diagram a class or component diagram is a matter of taste and clarity.
Have I missed something?
The diagrams themselves, and their constraints, are defined concisely in Annex B:
Page 728
B.7.10 UMLComponentDiagram [Class]
B.7.10.1 Description See Annex A. B.7.10.2 Generalizations UMLStructureDiagram B.7.10.3 Constraints • no_modelElement inv: modelElement->isEmpty()
Page 726
B.7.6 UMLCLassDiagram [Class]
B.7.6.1 Description See Annex A. B.7.6.2 Generalizations UMLStructure Diagram B.7.6.3 Constraints • no modelElement UMLClassDiagrams must have no modelElements. inv: modelElement->isEmpty ( )
Annex A does not disambiguate them. They both realise Structure Diagram, and (Annex A, page 685) they may both contain Structured Classifiers.
Anything that can be shown for a component on a component diagram, can also be shown of a class on a class diagram: any StructuredClassifier can have internal structure (p 183), Ports, Provided and Required Interfaces with multiplicity=*, and show those as lollipops and sockets (pages 185-186).