rsmith added a comment. We should also warn on:
- `and` or `bitand` used as a ref-qualifier in a member function declaration - `xor` used to declare a block pointer type or block pointer literal - `bitand` used as address-of and `and` used to form a GNU address-of-label - `compl` used to name a destructor Of these, I think it's somewhat important to handle ref-qualifiers and probably block pointer types at around the same time that this patch lands (though it doesn't need to be part of this patch) for consistency among "type operators". ================ Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:1551 +def warn_declare_references_with_symbols : Warning< + "use '%select{&|&&}0' when declaring %select{lvalue|rvalue and forwarding}1 references">, + InGroup<DiagGroup<"declare-references-with-symbols">>; ---------------- Drop the "and forwarding" part; a forwarding reference is a kind of rvalue reference, and distinguishing them here will lead to confusion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107292/new/ https://reviews.llvm.org/D107292 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits