[llvm] r340252 - [llvm] NFC: Fix assert condition and suppress warning

Kirill Bobyrev via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 21 00:23:45 PDT 2018


Author: omtcyfz
Date: Tue Aug 21 00:23:45 2018
New Revision: 340252

URL: http://llvm.org/viewvc/llvm-project?rev=340252&view=rev
Log:
[llvm] NFC: Fix assert condition and suppress warning

As mentioned by andreadb, assert condition is wrong and causes
GCC warning.

Related Revision: https://reviews.llvm.org/D50839

Modified:
    llvm/trunk/include/llvm/Support/YAMLTraits.h

Modified: llvm/trunk/include/llvm/Support/YAMLTraits.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/YAMLTraits.h?rev=340252&r1=340251&r2=340252&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/YAMLTraits.h (original)
+++ llvm/trunk/include/llvm/Support/YAMLTraits.h Tue Aug 21 00:23:45 2018
@@ -533,7 +533,7 @@ inline bool isNumeric(StringRef S) {
     }
   }
 
-  assert(FoundExponent && "Should have found exponent at this point.");
+  assert(State == FoundExponent && "Should have found exponent at this point.");
   if (S.empty())
     return false;
 




More information about the llvm-commits mailing list