xazax.hun added inline comments.

================
Comment at: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:975
+      if (Op->getOpcode() == UO_AddrOf)
+        if (Op->getSubExpr()->isLValue()) {
+          Ex = Op->getSubExpr()->IgnoreParenCasts();
----------------
Maybe you could move this condition one level up with &&?


================
Comment at: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:977
+          Ex = Op->getSubExpr()->IgnoreParenCasts();
+          while (true) {
+            if (const auto *ME = dyn_cast<MemberExpr>(Ex)) {
----------------
Can't you writhe this like:

```
while (const auto *ME = dyn_cast<MemberExpr>(Ex)) {
              Ex = ME->getBase()->IgnoreParenCasts();
      }
```

?




https://reviews.llvm.org/D31982



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

Reply via email to