diff options
author | Erich Keane <erich.keane@intel.com> | 2020-06-24 12:49:33 -0700 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2020-06-24 12:50:25 -0700 |
commit | 56b530d92c42e962a1828e14783601d2861ba353 (patch) | |
tree | dcbd6af2e0d2c00daa965e82822da0939bee68fe /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 53cf53023cbeb47d03fb9937ab3d06181eec8843 (diff) | |
download | llvm-56b530d92c42e962a1828e14783601d2861ba353.zip llvm-56b530d92c42e962a1828e14783601d2861ba353.tar.gz llvm-56b530d92c42e962a1828e14783601d2861ba353.tar.bz2 |
Fix a pair of wtype-limits and 3 wparentheses warnings from 29125ddf1
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index debd793..6838d4a 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -129,7 +129,6 @@ static llvm::Optional<unsigned> normalizeSimpleEnum(OptSpecifier Opt, unsigned TableIndex, const ArgList &Args, DiagnosticsEngine &Diags) { - assert(TableIndex >= 0); assert(TableIndex < SimpleEnumValueTablesSize); const SimpleEnumValueTable &Table = SimpleEnumValueTables[TableIndex]; @@ -149,7 +148,6 @@ static llvm::Optional<unsigned> normalizeSimpleEnum(OptSpecifier Opt, static const char *denormalizeSimpleEnum(CompilerInvocation::StringAllocator SA, unsigned TableIndex, unsigned Value) { - assert(TableIndex >= 0); assert(TableIndex < SimpleEnumValueTablesSize); const SimpleEnumValueTable &Table = SimpleEnumValueTables[TableIndex]; for (int I = 0, E = Table.Size; I != E; ++I) @@ -3932,7 +3930,7 @@ void CompilerInvocation::generateCC1CommandLine( ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, \ METAVAR, VALUES, SPELLING, ALWAYS_EMIT, \ KEYPATH, DEFAULT_VALUE, IS_POSITIVE) \ - if (FLAGS & options::CC1Option && \ + if ((FLAGS) & options::CC1Option && \ (ALWAYS_EMIT || this->KEYPATH != DEFAULT_VALUE)) \ Args.push_back(SPELLING); @@ -3940,7 +3938,7 @@ void CompilerInvocation::generateCC1CommandLine( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \ HELPTEXT, METAVAR, VALUES, SPELLING, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, \ NORMALIZER_RET_TY, NORMALIZER, DENORMALIZER, TABLE_INDEX) \ - if ((FLAGS & options::CC1Option) && \ + if (((FLAGS) & options::CC1Option) && \ (ALWAYS_EMIT || this->KEYPATH != DEFAULT_VALUE)) { \ if (Option::KIND##Class == Option::SeparateClass) { \ Args.push_back(SPELLING); \ |