[llvm] 242e04a - Fix Wparentheses gcc warning. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 28 05:59:36 PDT 2020
Author: Simon Pilgrim
Date: 2020-04-28T13:59:14+01:00
New Revision: 242e04ab27600b54e276e4bf5f38d118b0537fd4
URL: https://github.com/llvm/llvm-project/commit/242e04ab27600b54e276e4bf5f38d118b0537fd4
DIFF: https://github.com/llvm/llvm-project/commit/242e04ab27600b54e276e4bf5f38d118b0537fd4.diff
LOG: Fix Wparentheses gcc warning. NFC.
Wrap the 'anyof' hasAttribute checks so that we don't get precedence warnings with the assertion message.
Added:
Modified:
llvm/lib/IR/AsmWriter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index 8a2777cf496d..1afc5c1fd928 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -4197,8 +4197,9 @@ void AssemblyWriter::writeAttribute(const Attribute &Attr, bool InAttrGroup) {
return;
}
- assert(Attr.hasAttribute(Attribute::ByVal) ||
- Attr.hasAttribute(Attribute::Preallocated) && "unexpected type attr");
+ assert((Attr.hasAttribute(Attribute::ByVal) ||
+ Attr.hasAttribute(Attribute::Preallocated)) &&
+ "unexpected type attr");
if (Attr.hasAttribute(Attribute::ByVal)) {
Out << "byval";
More information about the llvm-commits
mailing list