aaron.ballman added inline comments. ================ Comment at: test/clang-tidy/cppcoreguidelines-pro-bounds-array-to-pointer-decay.cpp:13 @@ +12,3 @@ + +void pointerfun(int* p); +void arrayfun(int p[]); ---------------- > Currently, the diag is > ``` > diag(MatchedCast->getExprLoc(), "do not (implicitly) convert an array to a > pointer"); > ``` > should I make the parenthesis conditional?
The core guideline only says to diagnose for implicit decay, so I think we should not diagnose in this case. Perhaps the wording could be, "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit decay instead"? ================ Comment at: test/clang-tidy/cppcoreguidelines-pro-bounds-array-to-pointer-decay.cpp:18 @@ +17,3 @@ + +void f() +{ ---------------- Formatting ================ Comment at: test/clang-tidy/cppcoreguidelines-pro-bounds-array-to-pointer-decay.cpp:41 @@ +40,3 @@ + +const char* g() +{ ---------------- Formatting (may want to just run clang-format over the file). http://reviews.llvm.org/D13640 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits