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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to