[PATCH] D54281: [clang-tidy] fix PR39583 - ignoring ParenCast for string-literals in pro-bounds-array-to-pointer-decay
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 9 08:53:56 PST 2018
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM aside from a minor commenting nit.
================
Comment at: test/clang-tidy/cppcoreguidelines-pro-bounds-array-to-pointer-decay.cpp:44
+const char *g2() {
+ return ("clang"); // OK, ParenCast hides the literal-pointer decay
+}
----------------
Remove "Cast" as this is not a cast. It's a ParenExpr.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D54281
More information about the cfe-commits
mailing list