[PATCH] D97187: [Clang][Sema] Warn when function argument is less aligned than parameter
Diogo N. Sampaio via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 2 12:49:08 PST 2021
dnsampaio accepted this revision.
dnsampaio added a comment.
This revision is now accepted and ready to land.
LGTM . Just a few coding style nits to fix. But please wait a couple of days to see if someone else has anything else to say.
================
Comment at: clang/lib/Sema/SemaChecking.cpp:4475
+ if (ParamTy->isIncompleteType() || ArgTy->isIncompleteType())
+ return;
+ CharUnits ParamAlign = Context.getTypeAlignInChars(ParamTy);
----------------
empty line after return.
================
Comment at: clang/lib/Sema/SemaChecking.cpp:4545
+ auto *FT = FDecl->getFunctionType();
+ if (FT && isa<FunctionProtoType>(FT))
+ Proto = cast<FunctionProtoType>(FDecl->getFunctionType());
----------------
Follow clang-tidy.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97187/new/
https://reviews.llvm.org/D97187
More information about the cfe-commits
mailing list