]> granicus.if.org Git - clang/commit
clang-format: Fix __attribute__ being treated as decl name.
authorDaniel Jasper <djasper@google.com>
Mon, 6 Jul 2015 11:30:34 +0000 (11:30 +0000)
committerDaniel Jasper <djasper@google.com>
Mon, 6 Jul 2015 11:30:34 +0000 (11:30 +0000)
commit174220cf7ca637fd0db518705399fa761afc1a05
tree4a1bfab49e10bdae31d021d764ea108f67f4c27c
parent67e271c99f2cb5a76a74fe4d0da05499edde2ded
clang-format: Fix __attribute__ being treated as decl name.

__attribute__ was treated as the name of a function definition, with the
tokens in parentheses being the parameter list. This formats incorrectly
with AlwaysBreakAfterDefinitionReturnType. Fix it by treating
__attribute__ like decltype.

Patch by Strager Neds, thank you.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241439 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTest.cpp