[PATCH] D48291: [analyzer][UninitializedObjectChecker] Fixed captured lambda variable name

George Karpenkov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 26 17:15:24 PDT 2018


george.karpenkov added a comment.

Few more nits.



================
Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:691
 
+StringRef getVariableName(const FieldDecl *Field) {
+  // If \p Field is a captured lambda variable, Field->getName() will return
----------------
Is this a member method? Then it should be prefixed with a class name.
Currently it looks like you have a member method without an implementation and a separate C-style function?


================
Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:692
+StringRef getVariableName(const FieldDecl *Field) {
+  // If \p Field is a captured lambda variable, Field->getName() will return
+  // with an empty string. We can however acquire it's name by iterating over
----------------
Doxygen-style comments in LLVM start with a triple slash, and are located above the function. Then the tools for autocompletion (e.g. clangd) can pick them up.


https://reviews.llvm.org/D48291





More information about the cfe-commits mailing list