Use llvm::array_lengthof to replace sizeof(array)/sizeof(array[0]).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186300 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/CommentCommandTraits.cpp b/lib/AST/CommentCommandTraits.cpp
index 6baf4a9..01bd12e 100644
--- a/lib/AST/CommentCommandTraits.cpp
+++ b/lib/AST/CommentCommandTraits.cpp
@@ -75,7 +75,7 @@
   
   SmallVector<const CommandInfo *, 2> BestCommand;
   
-  int NumOfCommands = sizeof(Commands) / sizeof(CommandInfo);
+  const int NumOfCommands = llvm::array_lengthof(Commands);
   for (int i = 0; i < NumOfCommands; i++)
     HelperTypoCorrectCommandInfo(BestCommand, Typo, &Commands[i]);