[PATCH] D107292: [clang] adds warning to alert user when they use alternative tokens as references
Christopher Di Bella via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 2 10:03:39 PDT 2021
cjdb created this revision.
cjdb added a reviewer: aaron.ballman.
cjdb requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Although the alternative tokens `bitand` and `and` _can_ respectively be
used in place of `&` and `&&` for declarations, this is arguably misuse
of the tokens in contemporary programming. As of this commit, Clang will
warn—by default—when a programmer attempts to declare a name using
alternative tokens in place of reference symbols.
Depends on D107291 <https://reviews.llvm.org/D107291>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D107292
Files:
clang/include/clang/Basic/DiagnosticParseKinds.td
clang/lib/Parse/ParseDecl.cpp
clang/test/Parser/cxx-decl.cpp
clang/test/Parser/cxx0x-decl.cpp
clang/test/Parser/warn-declare-references-with-symbols.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107292.363511.patch
Type: text/x-patch
Size: 6021 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210802/e02e06e2/attachment-0001.bin>
More information about the cfe-commits
mailing list