ABataev added inline comments.

================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:11992-11993
                                 ->getCanonicalDecl();
+          assert(ParamPositions.find(PVD) != ParamPositions.end());
           Pos = ParamPositions[PVD];
         }
----------------
ABataev wrote:
> Better to use `count()` or `contain()` (do not remember which one is defined 
> for DenseMap), also add messages to asserts.
Or, if you already using `find`, better to do something like:
```
auto It = ParamPositions.find(PVD);
assert(It != ParamPositions.end() && "...");
Pos = It->second;
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122338/new/

https://reviews.llvm.org/D122338

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to