[PATCH] D23279: clang-reorder-fields
Daniel Jasper via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 31 01:31:21 PDT 2016
djasper added inline comments.
================
Comment at: clang-reorder-fields/ReorderFieldsAction.cpp:181
@@ +180,3 @@
+ assert(InitListEx && "Init list expression is null");
+ // we care only about brace initializations
+ // which have valid source locations
----------------
Write full sentences:
// We care only about brace initializations which have valid source locations.
Same for all the other comments you just added.
Also, it'd be cool if the comment would say why we only care about init list exprs with valid source locations or in which cases the source locations won't be valid.
================
Comment at: clang-reorder-fields/ReorderFieldsAction.cpp:185
@@ +184,3 @@
+ return true;
+ const auto *SyntacticForm = InitListEx->getSyntacticForm();
+ // getSyntacticForm() may return nullptr indicating that
----------------
Can you make this
if (const auto *SyntacticForm = InitListEx->getSyntacticForm())
InitListEx = SyntacticForm;
?
Repository:
rL LLVM
https://reviews.llvm.org/D23279
More information about the cfe-commits
mailing list