[PATCH] [Analyzer] Individual options for checkers #2

Gábor Horváth xazax.hun at gmail.com
Wed Mar 4 05:21:01 PST 2015


Thank you for the review.

Changes since last revision:

- Improved the comments as you recommended.
- Added a public function to query options as string values and appropriate test cases.
- Added some more test cases to package and checker options.
- Added more context to the diff.
- Updated to current head.

Regarding the options validation on the frontend:
Indeed, it would be nicer to use a clang method to check if a string is an identifier however I did not found a nice way to do that. The only way I came up with was to create a raw lexer and lex the option string. If you consider that better than using a RegEx I will alter the patch accordingly.


http://reviews.llvm.org/D7905

Files:
  include/clang/Basic/DiagnosticDriverKinds.td
  include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
  lib/Frontend/CompilerInvocation.cpp
  lib/StaticAnalyzer/Checkers/Checkers.td
  lib/StaticAnalyzer/Checkers/MallocChecker.cpp
  lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
  test/Analysis/free.c
  test/Analysis/malloc-annotations.c
  test/Analysis/outofbound.c
  test/Analysis/undef-buffers.c
  unittests/CMakeLists.txt
  unittests/Makefile
  unittests/StaticAnalyzer/AnalyzerOptionsTest.cpp
  unittests/StaticAnalyzer/CMakeLists.txt
  unittests/StaticAnalyzer/Makefile

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7905.21192.patch
Type: text/x-patch
Size: 28748 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150304/255f17ca/attachment.bin>


More information about the cfe-commits mailing list