зеркало из https://github.com/microsoft/clang-1.git
Use array_lengthof instead of sizeof trickery.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156104 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
c968334510
Коммит
f9e156c774
|
@ -219,8 +219,7 @@ void Compilation::initCompilationForDiagnostics(void) {
|
|||
// to avoid emitting warnings about unused args.
|
||||
OptSpecifier OutputOpts[] = { options::OPT_o, options::OPT_MD,
|
||||
options::OPT_MMD };
|
||||
for (unsigned i = 0, e = sizeof(OutputOpts)/sizeof(OutputOpts[0]); i != e;
|
||||
++i) {
|
||||
for (unsigned i = 0, e = llvm::array_lengthof(OutputOpts); i != e; ++i) {
|
||||
if (TranslatedArgs->hasArg(OutputOpts[i]))
|
||||
TranslatedArgs->eraseArg(OutputOpts[i]);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче