[PATCH] D105501: [PowerPC] Power ISA features for Semachecking
Lei Huang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 12 11:37:10 PDT 2021
lei added inline comments.
================
Comment at: clang/lib/Sema/SemaChecking.cpp:3278
+ StringRef DiagArg = "") {
+ if (!S.Context.getTargetInfo().hasFeature(FeatureToCheck)) {
+ if (!DiagArg.empty()) {
----------------
may I suggest early exit instead?
```
if (S.Context.getTargetInfo().hasFeature(FeatureToCheck))
return false;
if (DiagArg.empty())
S.Diag(TheCall->getBeginLoc(), DiagID) << TheCall->getSourceRange();
else
S.Diag(TheCall->getBeginLoc(), DiagID) << DiagArg << TheCall->getSourceRange();
return true;
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105501/new/
https://reviews.llvm.org/D105501
More information about the llvm-commits
mailing list