[PATCH] D14274: Add alloc_size attribute to clang
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 28 05:47:24 PDT 2016
aaron.ballman added inline comments.
================
Comment at: include/clang/Basic/Attr.td:753
@@ +752,3 @@
+ let Args = [IntArgument<"ElemSizeParam">, IntArgument<"NumElemsParam", 1>];
+ let TemplateDependent = 1;
+ let Documentation = [AllocSizeDocs];
----------------
I don't see any C++ tests involving templates; can you add some?
================
Comment at: test/SemaCXX/constant-expression-cxx11.cpp:1171
@@ -1170,3 +1170,3 @@
int l : n3; // expected-error {{constant expression}} expected-note {{read of non-const variable}}
- int m : t.n; // expected-error {{constant expression}} expected-note {{read of non-constexpr variable}}
+ int m : t.n; // expected-warning{{width of bit-field 'm' (42 bits)}}
};
----------------
This change seems out of place for a test that doesn't use alloc_size anywhere. Can you explain why this test has changed?
http://reviews.llvm.org/D14274
More information about the cfe-commits
mailing list