Index: clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.cpp =================================================================== --- clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.cpp +++ clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.cpp @@ -59,7 +59,8 @@ implicitCastExpr(unless(hasParent(arraySubscriptExpr())), unless(hasParentIgnoringImpCasts(explicitCastExpr())), unless(isInsideOfRangeBeginEndStmt()), - unless(hasSourceExpression(stringLiteral()))) + unless(hasSourceExpression(stringLiteral())), + unless(hasDescendant(predefinedExpr()))) .bind("cast"), this); } Index: test/clang-tidy/cppcoreguidelines-pro-bounds-array-to-pointer-decay.cpp =================================================================== --- test/clang-tidy/cppcoreguidelines-pro-bounds-array-to-pointer-decay.cpp +++ test/clang-tidy/cppcoreguidelines-pro-bounds-array-to-pointer-decay.cpp @@ -45,3 +45,10 @@ void *a[2]; f2(static_cast(a)); // OK, explicit cast } + +void cstringfun(const char *s); +void bug28480() { + cstringfun(__PRETTY_FUNCTION__); //OK, predefined macro + cstringfun(__func__); //OK, predefined macro + cstringfun(__FUNCTION__); //OK, predefined macro +}