Clang Project

clang_source_code/test/Sema/warn-documentation-unknown-command.cpp
1// RUN: %clang_cc1 -std=c++11 -fsyntax-only -Wdocumentation-unknown-command -verify %s
2// RUN: %clang_cc1 -std=c++11 -fsyntax-only -Werror -Wno-documentation-unknown-command %s
3
4// expected-warning@+1 {{unknown command tag name}}
5/// aaa \unknown
6int test_unknown_comand_1;
7
8// expected-warning@+1 {{unknown command tag name 'retur'; did you mean 'return'?}}
9/// \retur aaa
10int test_unknown_comand_2();
11
12// RUN: c-index-test -test-load-source all -Wdocumentation-unknown-command %s > /dev/null 2> %t.err
13// RUN: FileCheck < %t.err -check-prefix=CHECK-RANGE %s
14// CHECK-RANGE: warn-documentation-unknown-command.cpp:5:9:{5:9-5:17}: warning: unknown command tag name
15// CHECK-RANGE: warn-documentation-unknown-command.cpp:9:5:{9:5-9:11}: warning: unknown command tag name 'retur'; did you mean 'return'?
16