aaron.ballman added inline comments.

================
Comment at: lib/AST/Expr.cpp:2302
+              cast<VarDecl>(DRE->getDecl())->hasLocalStorage()) &&
+            !isa<CallExpr>(CE->getSubExpr()->IgnoreParens())) {
           return CE->getSubExpr()->isUnusedResultAWarning(WarnE, Loc,
----------------
Does this properly handle calls through function pointers (which usually have 
implicit casts)?
```
[[nodiscard]] volatile char &(*fp)();
void g() {
  (void)fp(); // No diagnostic here, either?
}
```


https://reviews.llvm.org/D39075



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

Reply via email to