Kaydet (Commit) d4ad86da authored tarafından Stephan Bergmann's avatar Stephan Bergmann

...in case this ever gets used with an unsigned APSInt of bitwidth < 7

Change-Id: Ic9436529321e523edd25d0f83ac09a0e22a44013
üst a8cd9968
...@@ -1191,7 +1191,7 @@ void StringConstant::handleOUStringCtor( ...@@ -1191,7 +1191,7 @@ void StringConstant::handleOUStringCtor(
&& e3->getArg(0)->IgnoreParenImpCasts()->isIntegerConstantExpr( && e3->getArg(0)->IgnoreParenImpCasts()->isIntegerConstantExpr(
res, compiler.getASTContext())) res, compiler.getASTContext()))
{ {
if (res.getSExtValue() > 0 && res.getSExtValue() <= 127) { if (res.getZExtValue() > 0 && res.getZExtValue() <= 127) {
report( report(
DiagnosticsEngine::Warning, DiagnosticsEngine::Warning,
("in call of %0, replace OUString constructed from a (non-NUL)" ("in call of %0, replace OUString constructed from a (non-NUL)"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment