whisperity added inline comments.

================
Comment at: 
clang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.cpp:85
+  if (TypePtr->isEnumeralType())
+    InitializationString = "";
+  else if (TypePtr->isIntegerType())
----------------
Also, if we're using //Optional//, this could also be `= nullptr` instead, and 
then we have the state when the //Optional// `hasValue()` but the value itself 
is null. In all other cases, it //both// `hasValue()` and the value is non-null.
This would also eliminate the need for the `strlen` call.


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

https://reviews.llvm.org/D106431

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

Reply via email to