Prazek added a comment. Nice check! :)
================ Comment at: clang-tidy/misc/IstreamOverflowCheck.cpp:59-61 + if (ConstType) { + ArraySize = ConstType->getSize(); + } ---------------- same here ================ Comment at: clang-tidy/misc/IstreamOverflowCheck.cpp:78-80 + if (!Arg->isIntegerConstantExpr(WidthSize, Context)) { + llvm::errs() << "Couldn't get width() size.\n"; + } ---------------- debug? ================ Comment at: clang-tidy/misc/IstreamOverflowCheck.cpp:111-116 + if (HasWidthCall && WidthSize != 0) { + Width = WidthSize; + } + if (HasSetwCall && SetwSize != 0) { + Width = SetwSize; + } ---------------- please remove unnecessary braces ================ Comment at: clang-tidy/misc/IstreamOverflowCheck.cpp:125-132 + if (HasSetwCall) { + diag(SetwCall->getLocation(), "std::setw called here", + DiagnosticIDs::Note); + } + if (HasWidthCall) { + diag(WidthCall->getExprLoc(), "width called here", + DiagnosticIDs::Note); ---------------- same here Repository: rL LLVM https://reviews.llvm.org/D29839 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits