PR20693. Patch by Anders Rönnholm.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216075
91177308-0d34-0410-b5e6-
96231b3b80d8
case Stmt::StringLiteralClass: {
const StringLiteral *StringLit1 = cast<StringLiteral>(Stmt1);
const StringLiteral *StringLit2 = cast<StringLiteral>(Stmt2);
- return StringLit1->getString() == StringLit2->getString();
+ return StringLit1->getBytes() == StringLit2->getBytes();
}
case Stmt::MemberExprClass: {
const MemberExpr *MemberStmt1 = cast<MemberExpr>(Stmt1);
else if (x++) // no-warning
;
}
+
+void test_warn_wchar() {
+ const wchar_t * a = 0 ? L"Warning" : L"Warning"; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
+}
+void test_nowarn_wchar() {
+ const wchar_t * a = 0 ? L"No" : L"Warning";
+}