Change '|' to '&' in conditional.
authorRichard Trieu <rtrieu@google.com>
Wed, 31 Jul 2019 04:41:05 +0000 (04:41 +0000)
committerRichard Trieu <rtrieu@google.com>
Wed, 31 Jul 2019 04:41:05 +0000 (04:41 +0000)
Bitwise-or with a non-zero constant will always evaluate to true.  Switch to
bitwise-and which will only evalute to true if the specified bit is set in the
other operand.

llvm-svn: 367386

lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp

index 664c142..d56d77a 100644 (file)
@@ -735,7 +735,7 @@ SymbolFilePDB::ResolveSymbolContext(const lldb_private::Address &so_addr,
       resolve_scope & eSymbolContextLineEntry) {
     auto cu_sp = GetCompileUnitContainsAddress(so_addr);
     if (!cu_sp) {
-      if (resolved_flags | eSymbolContextVariable) {
+      if (resolved_flags & eSymbolContextVariable) {
         // TODO: Resolve variables
       }
       return 0;