[PATCH] D63889: Check possible warnings on global initializers for reachability

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 22 15:47:20 PDT 2019


nickdesaulniers added inline comments.


================
Comment at: clang/include/clang/Sema/Sema.h:1698
+    }
+    return nullptr;
+  }
----------------
Does:
`return DeclForInitializer.empty() ? DeclForInitializer.back() : nullptr;`
fit on one line?


================
Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:2036
+          // Can this block be reached from the entrance?
+          if (!cra->isReachable(&AC.getCFG()->getEntry(), block)) {
+            AllReachable = false;
----------------
I'm not sure that `analyzed`, `block`, or `cra` follow the naming conventions used throughout the codebase.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63889





More information about the cfe-commits mailing list