]> granicus.if.org Git - clang/commit
Refactor template type diffing
authorRichard Trieu <rtrieu@google.com>
Thu, 14 Jan 2016 22:56:39 +0000 (22:56 +0000)
committerRichard Trieu <rtrieu@google.com>
Thu, 14 Jan 2016 22:56:39 +0000 (22:56 +0000)
commitb05834feafecd4b3f8e33d3d943c092d394036e2
tree63b455f2a3b232293bc82211295ca3d21fd9fc19
parent0fa4bacd11f4d0e2706dabf2348134151284650c
Refactor template type diffing

1) Instead of using pairs of From/To* fields, combine fields into a struct
TemplateArgInfo and have two in each DiffNode.
2) Use default initialization in DiffNode so that the constructor shows the
only field that is initialized differently on construction.
3) Use Set and Get functions per each DiffKind to make sure all fields for the
diff is set.  In one case, the Expr fields were not set.
4) Don't print boolean literals for boolean template arguments.  This prevents
printing 'false aka 0'

Only #3 has a functional change, which is reflected in the test change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257831 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ASTDiagnostic.cpp
test/Misc/diag-template-diffing.cpp