diff options
author | Daniel Jasper <djasper@google.com> | 2013-03-13 17:13:53 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-03-13 17:13:53 +0000 |
commit | 6a365aaa057a8c445d25344c0433726c752b3e7d (patch) | |
tree | a7311cda36c5471ae8a3053a09b2b63276a333e5 /unittests/Format/FormatTest.cpp | |
parent | 3258d4b3fb5922027747217e5e6f81a11878600d (diff) |
Fix incorrect cast identification.
Before: int a = sizeof(int *)+ b;"
After: int a = sizeof(int *) + b;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176957 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 17aeacae5c..4e54212f99 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -2044,6 +2044,8 @@ TEST_F(FormatTest, FormatsCasts) { verifyFormat("virtual void foo(int *) override;"); verifyFormat("virtual void foo(char &) const;"); verifyFormat("virtual void foo(int *a, char *) const;"); + verifyFormat("int a = sizeof(int *) + b;"); + verifyFormat("int a = alignof(int *) + b;"); } TEST_F(FormatTest, FormatsFunctionTypes) { |