[Diagnostics] Diagnose misused xor as pow
authorDavid Bolvansky <david.bolvansky@gmail.com>
Sun, 18 Aug 2019 19:14:14 +0000 (19:14 +0000)
committerDavid Bolvansky <david.bolvansky@gmail.com>
Sun, 18 Aug 2019 19:14:14 +0000 (19:14 +0000)
commit920890e26812f808a74c60ebc14cc636dac661c1
treee4ea00cd262c5410780b19d10c72082280980507
parentc944438dfdbd6de9785f4652244e80d194f40b92
[Diagnostics] Diagnose misused xor as pow

Summary:
Motivation:
https://twitter.com/jfbastien/status/1139298419988549632
https://twitter.com/mikemx7f/status/1139335901790625793
https://codesearch.isocpp.org/cgi-bin/cgi_ppsearch?q=10+%5E&search=Search

Reviewers: jfb, rsmith, regehr, aaron.ballman

Reviewed By: aaron.ballman

Subscribers: lebedev.ri, Quuxplusone, erik.pilkington, riccibruno, dexonsmith, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D63423

llvm-svn: 369217
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaExpr.cpp
clang/test/SemaCXX/warn-xor-as-pow.cpp [new file with mode: 0644]