PiotrZSL added inline comments.

================
Comment at: 
clang-tools-extra/clang-tidy/readability/RedundantDeclarationCheck.cpp:86
+              Result.Nodes.getNodeAs<LinkageSpecDecl>("extern");
+          Extern && !Extern->hasBraces())
+        BeginLoc = Extern->getExternLoc();
----------------
carlosgalvezp wrote:
> This can be removed, leaving it as:
> 
> ```
> if (const auto *Extern = ... && !Extern->hasBraces())
> ```
If you mean:
```
 if (const auto *Extern =
              Result.Nodes.getNodeAs<LinkageSpecDecl>("extern");
          !Extern->hasBraces())
````

then no, it cannot be like this because Extern can be null.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146904/new/

https://reviews.llvm.org/D146904

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

Reply via email to