diff options
| author | Zachary Turner <zturner@google.com> | 2017-10-09 15:46:13 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2017-10-09 15:46:13 +0000 |
| commit | bd3a9dbabb0d125b5de2772641c24a348f237502 (patch) | |
| tree | 326d1545b29581409680788c1f395fbc1d7f729e /llvm/test | |
| parent | 2a61a821a0fe1270dbf12778972910cb9a8dadcb (diff) | |
| download | bcm5719-llvm-bd3a9dbabb0d125b5de2772641c24a348f237502.tar.gz bcm5719-llvm-bd3a9dbabb0d125b5de2772641c24a348f237502.zip | |
[llvm-rc] Have the tokenizer discard single & block comments.
This allows rc files to have comments. Eventually we should
just use clang's c preprocessor, but that's a bit larger
effort for minimal gain, and this is straightforward.
Differential Revision: https://reviews.llvm.org/D38651
llvm-svn: 315207
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/tools/llvm-rc/Inputs/tokens.rc | 8 | ||||
| -rw-r--r-- | llvm/test/tools/llvm-rc/tokenizer.test | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-rc/Inputs/tokens.rc b/llvm/test/tools/llvm-rc/Inputs/tokens.rc index 20619149bb0..217d6017a9d 100644 --- a/llvm/test/tools/llvm-rc/Inputs/tokens.rc +++ b/llvm/test/tools/llvm-rc/Inputs/tokens.rc @@ -3,6 +3,14 @@ He11o LLVM "RC string test.",L"Another RC string test.'&{",42,100 +Block Comment Ident /*block /* // comment */ ifier +Line Comment // Identifier /* + +/* Multi line + block + comment */ + +Multiple /* comments */ on /* a */ single // line ":))" diff --git a/llvm/test/tools/llvm-rc/tokenizer.test b/llvm/test/tools/llvm-rc/tokenizer.test index 08c01a2fe73..99cd0f24b50 100644 --- a/llvm/test/tools/llvm-rc/tokenizer.test +++ b/llvm/test/tools/llvm-rc/tokenizer.test @@ -34,4 +34,13 @@ ; CHECK-NEXT: Int: 42; int value = 42 ; CHECK-NEXT: Comma: , ; CHECK-NEXT: Int: 100; int value = 100 +; CHECK-NEXT: Identifier: Block +; CHECK-NEXT: Identifier: Comment +; CHECK-NEXT: Identifier: Ident +; CHECK-NEXT: Identifier: ifier +; CHECK-NEXT: Identifier: Line +; CHECK-NEXT: Identifier: Comment +; CHECK-NEXT: Identifier: Multiple +; CHECK-NEXT: Identifier: on +; CHECK-NEXT: Identifier: single ; CHECK-NEXT: String: ":))" |

