Lines Matching refs:tab_width
33 next_tab_stop (unsigned int vis_column, unsigned int tab_width) in next_tab_stop() argument
35 vis_column = ((vis_column + tab_width) / tab_width) * tab_width; in next_tab_stop()
52 unsigned int tab_width) in get_visual_column() argument
91 vis_column = next_tab_stop (vis_column, tab_width); in get_visual_column()
113 unsigned int tab_width) in get_first_nws_vis_column() argument
132 vis_column = next_tab_stop (vis_column, tab_width); in get_first_nws_vis_column()
186 unsigned int tab_width) in detect_intervening_unindent() argument
194 if (get_first_nws_vis_column (file, line, &line_vis_column, tab_width)) in detect_intervening_unindent()
297 const unsigned int tab_width = cpp_opts->tabstop; in should_warn_for_misleading_indentation() local
344 &guard_line_first_nws, tab_width)) in should_warn_for_misleading_indentation()
404 &next_stmt_line_first_nws, tab_width)) in should_warn_for_misleading_indentation()
408 &body_line_first_nws, tab_width)) in should_warn_for_misleading_indentation()
412 &guard_line_first_nws, tab_width)) in should_warn_for_misleading_indentation()
496 vis_column, tab_width)) in should_warn_for_misleading_indentation()
632 const unsigned int tab_width = 8; in test_next_tab_stop() local
634 ASSERT_EQ (next_tab_stop (0, tab_width), 8); in test_next_tab_stop()
635 ASSERT_EQ (next_tab_stop (1, tab_width), 8); in test_next_tab_stop()
636 ASSERT_EQ (next_tab_stop (7, tab_width), 8); in test_next_tab_stop()
638 ASSERT_EQ (next_tab_stop (8, tab_width), 16); in test_next_tab_stop()
639 ASSERT_EQ (next_tab_stop (9, tab_width), 16); in test_next_tab_stop()
640 ASSERT_EQ (next_tab_stop (15, tab_width), 16); in test_next_tab_stop()
642 ASSERT_EQ (next_tab_stop (16, tab_width), 24); in test_next_tab_stop()
643 ASSERT_EQ (next_tab_stop (17, tab_width), 24); in test_next_tab_stop()
644 ASSERT_EQ (next_tab_stop (23, tab_width), 24); in test_next_tab_stop()
653 const unsigned int tab_width, in assert_get_visual_column_succeeds() argument
667 &actual_first_nws, tab_width); in assert_get_visual_column_succeeds()
693 const unsigned int tab_width) in assert_get_visual_column_fails() argument
705 &actual_first_nws, tab_width); in assert_get_visual_column_fails()
737 const unsigned int tab_width = 8; in test_get_visual_column() local
743 ASSERT_GET_VISUAL_COLUMN_SUCCEEDS (file, line, 1, tab_width, 0, 0); in test_get_visual_column()
744 ASSERT_GET_VISUAL_COLUMN_SUCCEEDS (file, line, 2, tab_width, 1, 1); in test_get_visual_column()
745 ASSERT_GET_VISUAL_COLUMN_SUCCEEDS (file, line, 3, tab_width, 2, 2); in test_get_visual_column()
747 ASSERT_GET_VISUAL_COLUMN_SUCCEEDS (file, line, 4, tab_width, 3, 2); in test_get_visual_column()
749 ASSERT_GET_VISUAL_COLUMN_SUCCEEDS (file, line, 8, tab_width, 7, 2); in test_get_visual_column()
750 ASSERT_GET_VISUAL_COLUMN_FAILS (file, line, 9, tab_width); in test_get_visual_column()
756 ASSERT_GET_VISUAL_COLUMN_SUCCEEDS (file, line, 1, tab_width, 0, 0); in test_get_visual_column()
757 ASSERT_GET_VISUAL_COLUMN_SUCCEEDS (file, line, 2, tab_width, 8, 8); in test_get_visual_column()
758 ASSERT_GET_VISUAL_COLUMN_SUCCEEDS (file, line, 3, tab_width, 9, 9); in test_get_visual_column()
760 ASSERT_GET_VISUAL_COLUMN_SUCCEEDS (file, line, 4, tab_width, 10, 9); in test_get_visual_column()
762 ASSERT_GET_VISUAL_COLUMN_SUCCEEDS (file, line, 8, tab_width, 14, 9); in test_get_visual_column()
763 ASSERT_GET_VISUAL_COLUMN_FAILS (file, line, 9, tab_width); in test_get_visual_column()