Patch to Bugzilla 31373

Erik Viktorsson via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 6 05:15:58 PDT 2017


Committing a patch to Bugzilla 31373<https://bugs.llvm.org/show_bug.cgi?id=31373>
A novice programmer so hopefully it complies with the coding policy.

I had to disable an assert in lib/CodeGen/CGExpr.cpp since it requires that all expressions are marked as Used or referenced, which is not possible if we want the ShouldDiagnoseUnusedDecl to return true (thus trigger the warn_unused_variable  warning).

The reason I removed the assert statement is because it causes five tests to fail. These test are the following:


*       clang -cc1 -triple i386-unknown-unknown -mllvm -inline-threshold=1024 -O3 -emit-llvm temp-order.cpp

*       clang -cc1 -debug-info-kind=limited -std=c++11 -emit-llvm debug-info-scope.cpp

*       clang -cc1 -std=c++1z -triple x86_64-apple-macosx10.7.0 -emit-llvm cxx1z-init-statement.cpp

*       clang -cc1 -triple x86_64-apple-darwin10 -emit-llvm condition.cpp

*       clang -cc1 -emit-llvm cxx-condition.cpp

/E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171006/62e196f9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CGExpr.patch
Type: application/octet-stream
Size: 799 bytes
Desc: CGExpr.patch
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171006/62e196f9/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SemaExprCXX.patch
Type: application/octet-stream
Size: 655 bytes
Desc: SemaExprCXX.patch
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171006/62e196f9/attachment-0001.obj>


More information about the cfe-commits mailing list