compnerd added inline comments.

================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3204
       if (StackProtectorLevel) {
-        CmdArgs.push_back("-stack-protector-buffer-size");
-        // FIXME: Verify the argument is a valid integer.
-        CmdArgs.push_back(Args.MakeArgString(Str.drop_front(16)));
+        auto BufferSize = Str.drop_front(16);
+        if (IsInteger(BufferSize)) {
----------------
I really am not a fan of the `16` here.  Why not just use `split` and split on 
`=`?  Or use [constexpr] `strlen`?


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3209
+        } else
+          D.Diag(clang::diag::err_invalid_ssp_buffer_size);
       }
----------------
Please consistently use the braces (either applied to both or on neither).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116722

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

Reply via email to