[PATCH] Correctly detect colon in bit fields. Fixes PR17333.
Alexander Kornienko
alexfh at google.com
Thu Oct 10 06:39:35 PDT 2013
================
Comment at: lib/Format/TokenAnnotator.cpp:335
@@ -335,1 +334,3 @@
Contexts.back().FirstObjCSelectorName = Tok->Previous;
+ } else if (Tok->Next && Tok->Next->is(tok::numeric_constant)) {
+ Tok->Type = TT_BitFieldColon;
----------------
Daniel Jasper wrote:
> Tok->Next == CurrentToken, so I think we should use that consistently.
>
> Probably not important, but maybe move this down at least past the range-based for loop.. This would be valid code AFAICT:
>
> vector<vector<int>> V;
> for (int i : 4[V]) {
> }
>
Done. Done.
http://llvm-reviews.chandlerc.com/D1884
BRANCH
svn
ARCANIST PROJECT
clang
More information about the cfe-commits
mailing list