r314748 - Remove an assertion I added from the refactoring of pasteTokens (https://reviews.llvm.org/rL314747).

Faisal Vali via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 2 18:20:40 PDT 2017


Author: faisalv
Date: Mon Oct  2 18:20:40 2017
New Revision: 314748

URL: http://llvm.org/viewvc/llvm-project?rev=314748&view=rev
Log:
Remove an assertion I added from the refactoring of pasteTokens (https://reviews.llvm.org/rL314747).
  - it made the bots v angry!

I'm not exactly sure why the assertion doesn't hold - if anyone has any insight - would appreciate it.

Thanks!

Modified:
    cfe/trunk/lib/Lex/TokenLexer.cpp

Modified: cfe/trunk/lib/Lex/TokenLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/TokenLexer.cpp?rev=314748&r1=314747&r2=314748&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/TokenLexer.cpp (original)
+++ cfe/trunk/lib/Lex/TokenLexer.cpp Mon Oct  2 18:20:40 2017
@@ -537,10 +537,6 @@ bool TokenLexer::pasteTokens(Token &LHST
              "Token at this Index must be ## or part of the MSVC 'L "
              "#macro-arg' pasting pair");
 
-  assert(std::is_trivial<Token>::value &&
-          !std::memcmp(&LHSTok, &TokenStream[CurIdx - 1], sizeof(Token)) &&
-         "LHSTok must equal the token preceding the hashhash");
-
   // MSVC: If previous token was pasted, this must be a recovery from an invalid
   // paste operation. Ignore spaces before this token to mimic MSVC output.
   // Required for generating valid UUID strings in some MS headers.




More information about the cfe-commits mailing list