]> granicus.if.org Git - clang/commit
[ASTMatchers][NFC] integerLiteral(): Mention negative integers in
authorClement Courbet <courbet@google.com>
Tue, 11 Jul 2017 15:45:22 +0000 (15:45 +0000)
committerClement Courbet <courbet@google.com>
Tue, 11 Jul 2017 15:45:22 +0000 (15:45 +0000)
commite575997e85ce57a89dd5ba926dac7f40e7fffe76
tree22906b1f49c8626863aef7f158752227006b78b2
parent1e30b7a60a9a2bfc5657b59bfe8cab0bec8ef957
[ASTMatchers][NFC] integerLiteral(): Mention negative integers in
documentation.

Trying to match integerLiteral(-1) will silently fail, because an numeric
literal is always positive.
- Update the documentation to explain how to match negative numeric
  literals.
- Add a unit test.

Differential Revision: https://reviews.llvm.org/D35196

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307663 91177308-0d34-0410-b5e6-96231b3b80d8
docs/LibASTMatchersReference.html
include/clang/ASTMatchers/ASTMatchers.h
unittests/ASTMatchers/ASTMatchersNodeTest.cpp