JonasToth added inline comments.

================
Comment at: clang-tidy/bugprone/StreamInt8Check.cpp:26
+                    
hasDeclaration(cxxRecordDecl(hasName("std::basic_ostream")))))))),
+        hasArgument(1, expr(hasType(hasCanonicalType(
+                    anyOf(asString("signed char"),
----------------
You can use `bind` for the `expr` and get `Offender` from it.


================
Comment at: clang-tidy/bugprone/StreamInt8Check.cpp:41
+        if (Name == "uint8_t") {
+            diag(Offender->getLocStart(), "streaming uint8_t");
+            break;
----------------
The duplicated `diag` can be removed. You can use placeholders in `diag` and 
make the if include both types.
See 
https://github.com/llvm-mirror/clang-tools-extra/blob/master/clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp#L246

I think having a list of possible typedefnames would be nice. Some projects 
might not use the standard ones (e.g. Qt?).


================
Comment at: docs/ReleaseNotes.rst:62
+  
<http://clang.llvm.org/extra/clang-tidy/checks/bugprone-stream-int8_t.html>`_ 
check
+
 - New module `fuchsia` for Fuchsia style checks.
----------------
Eugene.Zelenko wrote:
> Please move to new checks section in alphabetical order and add one statement 
> description (usually first statement from documentation).
Since the branch occured it might be better to rebase first. Then the Release 
Notes are empty.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D41740



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

Reply via email to