[clang] [WIP][Modules] Delay deserialization of preferred_name attribute at r… (PR #122726)
Ilya Biryukov via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 14 01:46:41 PST 2025
================
@@ -4925,6 +4930,11 @@ void ASTRecordWriter::AddAttr(const Attr *A) {
Record.push_back(A->isRegularKeywordAttribute());
#include "clang/Serialization/AttrPCHWrite.inc"
+
+ if (A->getKind() == attr::PreferredName)
+ // Record the actual size of preferred_name attribute (-1 to count the
----------------
ilya-biryukov wrote:
LLVM Style Guide covers this situation and suggests to have braces when there are comments in the single branch, see https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements.
Could you add braces here?
The `if` above is a bit more borderline, but I'd also suggest adding braces there.
https://github.com/llvm/llvm-project/pull/122726
More information about the cfe-commits
mailing list