[PATCH] D137826: [clang] Allow comparing pointers to string literals
Tom Honermann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 15 13:00:22 PST 2022
tahonermann added inline comments.
================
Comment at: clang/lib/AST/ExprConstant.cpp:12951-12954
+ // ObjC's @encode()
+ if (isa<ObjCEncodeExpr>(E->getLHS()->IgnoreParenImpCasts()) ||
+ isa<ObjCEncodeExpr>(E->getRHS()->IgnoreParenImpCasts()))
return Error(E);
----------------
A comment to explain this change would be helpful. It isn't intuitive (for me anyway) why Objective-C's `@encode` would require special handling here. Was this needed to avoid a test failure?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137826/new/
https://reviews.llvm.org/D137826
More information about the cfe-commits
mailing list