[all-commits] [llvm/llvm-project] 2cc584: [clang][sema] Ignore xor-used-as-pow if both sides...
tbaederr via All-commits
all-commits at lists.llvm.org
Thu Feb 25 07:31:57 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2cc58463caf4c8a43c2954e4206d3647c762ba30
https://github.com/llvm/llvm-project/commit/2cc58463caf4c8a43c2954e4206d3647c762ba30
Author: Timm Bäder <tbaeder at redhat.com>
Date: 2021-02-25 (Thu, 25 Feb 2021)
Changed paths:
M clang/lib/Sema/SemaExpr.cpp
M clang/test/SemaCXX/warn-xor-as-pow.cpp
Log Message:
-----------
[clang][sema] Ignore xor-used-as-pow if both sides are macros
This happens in codebases a lot, which use xor where both sides are
macros. Using xor in that case is not the common error-prone 2^6 code
that the warning was introduced for.
Don't diagnose such a use of xor.
Differential Revision: https://reviews.llvm.org/D97445
More information about the All-commits
mailing list