aaron.ballman added inline comments.

================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:857
+  if (IsDynamic) {
+    const LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel =
+        getLangOpts().getStrictFlexArraysLevel();
----------------
nickdesaulniers wrote:
> aaron.ballman wrote:
> > We don't generally use top-level const on local variables.
> Do we explicitly document this in the style guide? This came up for me 
> recently in a code review (cc @jyknight ).
> https://llvm.org/docs/CodingStandards.html
It's the prevailing style in our files rather than a hard rule. In Clang, we 
seem to have organically landed on "const members are fine, const locals are 
not fine, do not use globals". Our const-correctness story is terrible and if 
we had better const correct interfaces, I think we'd have landed somewhere 
different.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148381

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

Reply via email to