[PATCH] D138583: Create unused non-trivially-destructible check in clang-tidy

2022-11-24 Thread Andrei via Phabricator via cfe-commits
ankineri added a comment. I do agree that having it as part of `-Wunused-variable` is better on many aspects, but I have a few concerns about it. The proposed check can be applied to any type including STL ones such as `std::string`, all as per codebase owner's choice. Adding this attribute to S

[PATCH] D138583: Create unused non-trivially-destructible check in clang-tidy

2022-11-24 Thread Andrei via Phabricator via cfe-commits
ankineri requested review of this revision. ankineri added a comment. `-Wunused-variable` does not detect unused non-trivially-destructible objects because they may be used for RAII, i.e. { scoped_lock lock(&global_mutex); critical_section(); } `lock` here is not an unused variable

[PATCH] D138583: Create unused non-trivially-destructible check in clang-tidy

2022-11-23 Thread Andrei via Phabricator via cfe-commits
ankineri created this revision. ankineri added a reviewer: sammccall. Herald added a subscriber: carlosgalvezp. Herald added a reviewer: njames93. Herald added a project: All. ankineri requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commi

[PATCH] D32543: [X86] Clang option -fuse-init-array has no effect when generating for MCU target

2017-05-04 Thread Andrei via Phabricator via cfe-commits
AndreiGrischenko updated this revision to Diff 97866. AndreiGrischenko added a comment. Thanks Craig for the good advice. You are right I can check llc with MCU triple using option -use-ctors. Please see updated patch. https://reviews.llvm.org/D32543 Files: llvm/lib/Target/X86/X86TargetMachi

[PATCH] D32543: [X86] Clang option -fuse-init-array has no effect when generating for MCU target

2017-04-27 Thread Andrei via Phabricator via cfe-commits
AndreiGrischenko added a comment. In https://reviews.llvm.org/D32543#738595, @ahatanak wrote: > Do you need a front-end test? Since the changes are in the backend, I think > it's better to add the test to the backend (using llc). Yes, changes are in the backend, but they fix interface between

[PATCH] D32543: [X86] Clang option -fuse-init-array has no effect when generating for MCU target

2017-04-26 Thread Andrei via Phabricator via cfe-commits
AndreiGrischenko created this revision. Our runtime for MCU X86 target supports .init_array section for globals that should be dynamically initialized. But default Clang generates .ctors section and even if it has option -fuse-init-array, the option has no effect if set explicitly in a command-l