[PATCH] D148381: [Clang] Implement the 'counted_by' attribute
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 13 11:38:45 PDT 2023
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
More information about the cfe-commits
mailing list