[PATCH] D12359: New warning -Wnonconst-parameter when a pointer parameter can be const

Daniel Marjamäki via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 23 05:34:04 PDT 2015


danielmarjamaki updated this revision to Diff 35482.
danielmarjamaki marked 9 inline comments as done.
danielmarjamaki added a comment.

With the previous patch there was much noise when building Clang. I have fixed many false positives with improved handling of C++ code. However I have not been able to properly handle templates yet.

With this patch, no -Wnonconst-parameter diagnostics are written for C++ code. I hope that it will be possible to fix the noise for C++ code later and enable this diagnostic for C++ code also.


http://reviews.llvm.org/D12359

Files:
  include/clang/AST/DeclBase.h
  include/clang/Basic/DiagnosticGroups.td
  include/clang/Basic/DiagnosticSemaKinds.td
  include/clang/Parse/Parser.h
  include/clang/Sema/Sema.h
  lib/Parse/ParseDeclCXX.cpp
  lib/Parse/ParseExpr.cpp
  lib/Parse/ParseExprCXX.cpp
  lib/Parse/ParseStmt.cpp
  lib/Sema/SemaDecl.cpp
  lib/Sema/SemaExpr.cpp
  lib/Sema/SemaLambda.cpp
  lib/Sema/SemaOpenMP.cpp
  lib/Sema/SemaTemplateInstantiateDecl.cpp
  lib/Serialization/ASTReaderDecl.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12359.35482.patch
Type: text/x-patch
Size: 18740 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150923/db4b1d8c/attachment-0001.bin>


More information about the cfe-commits mailing list