[PATCH] D27726: [analyzer] Refer to macro names in diagnostics for macros representing a literal
Anna Zaks via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 13 12:50:49 PST 2016
zaks.anna created this revision.
zaks.anna added reviewers: dergachev.a, dcoughlin.
zaks.anna added a subscriber: cfe-commits.
When a macro expending to a literal is used in a comparison, use the macro name in the diagnostic rather than the literal. This improves readability of path notes.
Added tests for various macro literals that could occur. Only BOOl, Int, and NULL tests have changed behavior with this patch.
https://reviews.llvm.org/D27726
Files:
include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h
lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
test/Analysis/Inputs/system-header-simulator-objc.h
test/Analysis/Inputs/system-header-simulator.h
test/Analysis/diagnostics/macros.cpp
test/Analysis/diagnostics/macros.m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27726.81277.patch
Type: text/x-patch
Size: 9819 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161213/8d9276ac/attachment-0001.bin>
More information about the cfe-commits
mailing list