-Wno-error disables WarningsAsErrors instead of
mistakenly being treated like -Werror
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78987
91177308-0d34-0410-b5e6-
96231b3b80d8
}
if (Specifier == 0) {
- Diags.setWarningsAsErrors(true);
+ Diags.setWarningsAsErrors(isPositive);
continue;
}
// RUN: clang-cc %s -Werror=#warnings 2>&1 | grep "error:" &&
// -Wno-error= overrides -Werror. rdar://3158301
-// RUN: clang-cc %s -Werror -Wno-error=#warnings 2>&1 | grep "warning:"
+// RUN: clang-cc %s -Werror -Wno-error=#warnings 2>&1 | grep "warning:" &&
+
+// -Wno-error overrides -Werror. PR4715
+// RUN: clang-cc %s -Werror -Wno-error 2>&1 | grep "warning:"
#warning foo