]> granicus.if.org Git - clang/commit
Add some overloads so that floating point literals can be AST matched properly.
authorDaniel Jasper <djasper@google.com>
Tue, 3 Feb 2015 09:45:52 +0000 (09:45 +0000)
committerDaniel Jasper <djasper@google.com>
Tue, 3 Feb 2015 09:45:52 +0000 (09:45 +0000)
commit68f8dbd948dd097375c7e49df54322991625183f
tree8ec78302fd7f8c2976882400c47a801cefc532dd
parenta1311366decdac3a9d9405a4d6fdf697cef08a10
Add some overloads so that floating point literals can be AST matched properly.

I am not entirely sure whether the implemented sematics are ideal. In
particular, should floatLiteral(equals(0.5)) match "0.5f" and should
floatLiteral(equals(0.5f)) match "0.5". With the overloads in this
patch, the answer to both questions is yes, but I am happy to change
that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227956 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/ASTMatchers/ASTMatchersInternal.h
unittests/ASTMatchers/ASTMatchersTest.cpp