[PATCH] D72212: [Sema] Improve -Wrange-loop-analysis warnings
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 7 13:46:56 PST 2020
MaskRay added inline comments.
================
Comment at: clang/test/SemaCXX/warn-range-loop-analysis-trivially-copyable.cpp:6
+ struct Record {
+ volatile int a;
+ int b;
----------------
`test_POD` can be dropped. It does not add test coverage.
"Struct with a volatile member no longer a POD" is a MSVC bug. https://stackoverflow.com/questions/59103157/struct-with-a-volatile-member-no-longer-a-pod-according-to-msvc
================
Comment at: clang/test/SemaCXX/warn-range-loop-analysis-trivially-copyable.cpp:37
+
+void test_TriviallyCopyable() {
+ struct Record {
----------------
`test_TriviallyCopyable` can also be dropped.
Or you can add volatile to `test_TriviallyCopyable_64_bytes`
================
Comment at: clang/test/SemaCXX/warn-range-loop-analysis-trivially-copyable.cpp:88
+
+void test_TrivialABI() {
+ struct [[clang::trivial_abi]] Record {
----------------
`test_TrivialABI` can be dropped. It does not add test coverage.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72212/new/
https://reviews.llvm.org/D72212
More information about the cfe-commits
mailing list