diff options
Diffstat (limited to 'lib/AST/CommentCommandTraits.cpp')
-rw-r--r-- | lib/AST/CommentCommandTraits.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AST/CommentCommandTraits.cpp b/lib/AST/CommentCommandTraits.cpp index 6baf4a9dc6..01bd12e5fe 100644 --- a/lib/AST/CommentCommandTraits.cpp +++ b/lib/AST/CommentCommandTraits.cpp @@ -75,7 +75,7 @@ CommandTraits::getTypoCorrectCommandInfo(StringRef Typo) const { 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]); |