This revision was automatically updated to reflect the committed changes.
Closed by commit rGfcbc613ad8b7: Make "#pragma clang attribute"
support uninitialized attribute. (authored by jcai19).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78693/new/
jcai19 updated this revision to Diff 259652.
jcai19 added a comment.
Update test cases and documentation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78693/new/
https://reviews.llvm.org/D78693
Files:
clang/docs/LanguageExtensions.rst
clang/i
jcai19 added a comment.
Thank you all for the comments. I just realized I forgot to update clang
documentation. Added that too. Thanks.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78693/new/
https://reviews.llvm.org/D78693
___
jfb accepted this revision.
jfb added inline comments.
Comment at: clang/test/Parser/pragma-attribute.cpp:190
+#pragma clang attribute pop
+#pragma clang attribute push([[clang::uninitialized]], apply_to = variable) //
expected-error {{attribute 'uninitialized' can't be applied
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM!
Comment at: clang/test/CodeGenCXX/trivial-auto-var-init-attribute.cpp:38-50
+// UNINIT-LABEL: test_pragma_attribute_uninitialized_f2(
+// UNINIT: al
jfb added a comment.
Looks pretty good to me. Not my areas of expertise so I’d like to have others
look too. Thanks for doing this!
Comment at: clang/test/Parser/pragma-attribute.cpp:190
+#pragma clang attribute pop
+#pragma clang attribute push([[clang::uninitialized]], apply
jcai19 created this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
When using -ftrivial-auto-var-init=* options to initiate automatic
variables in a file, to disable initialization on some variables,
currently we have to manually annotate the variables with uninit