r202006 - Use a more conventional logical op instead of bitwise and

Alp Toker alp at nuanti.com
Sun Feb 23 20:35:58 PST 2014


Author: alp
Date: Sun Feb 23 22:35:58 2014
New Revision: 202006

URL: http://llvm.org/viewvc/llvm-project?rev=202006&view=rev
Log:
Use a more conventional logical op instead of bitwise and

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

Modified: cfe/trunk/lib/Lex/Preprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Preprocessor.cpp?rev=202006&r1=202005&r2=202006&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/Preprocessor.cpp (original)
+++ cfe/trunk/lib/Lex/Preprocessor.cpp Sun Feb 23 22:35:58 2014
@@ -627,7 +627,7 @@ bool Preprocessor::HandleIdentifier(Toke
   // name of a macro.
   // FIXME: This warning is disabled in cases where it shouldn't be, like
   //   "#define constexpr constexpr", "int constexpr;"
-  if (II.isCXX11CompatKeyword() & !DisableMacroExpansion) {
+  if (II.isCXX11CompatKeyword() && !DisableMacroExpansion) {
     Diag(Identifier, diag::warn_cxx11_keyword) << II.getName();
     // Don't diagnose this keyword again in this translation unit.
     II.setIsCXX11CompatKeyword(false);





More information about the cfe-commits mailing list